The projection of a vector $\vect{x}$ onto a subspace $W$ is the point of $W$ closest to $\vect{x}$. A least squares solution of $A\vect{x} = \vect{b}$ makes $A\vect{x}$ as close as possible to $\vect{b}$, so $A\vect{x}$ is the projection of $\vect{b}$ onto the column space of $A$. Fitting a curve to data is a least squares problem with one equation for each data point. Choose a problem below, enter your own numbers or load an example, and see the picture and the calculations.

View

Top, front, and side views
Top (x–y)
Front (x–z)
Side (y–z)

Calculations