# Least-squares Approximation

1 min read

whose pseudoinverse is

Multiplying *y* by *A*^{ }, we obtain the coefficient vector

which corresponds to the quadratic polynomial

*F*(*x*) = 1.200 - 0.757*x* 0.214*x*^{2}

as the closest-fitting quadratic to the given data, in a least-squares sense.

As a practical matter, we solve the normal equation (28.33) by multiplying *y* by *A*^{T} and then finding an LU decomposition of *A*^{T} *A*. If *A* has full rank, the matrix *A*^{T} *A* is guaranteed to be nonsingular, because it is symmetric and positive-definite.