Let with and . The Least-Squares Approximation of the system is the solution of the system of equations:
Where is the thin QR Decomposition, furthermore:
where is the QR Decomposition with