In: Advanced Math
Compute the projection of y = (1, 2, 2, 2, 1) onto span (x1, x2) where
x1 =(1, 1, 1, 1, 1) x2 =(4, 1, 0, 1, 4)
The inner product to use is the usual dot product. (This will compute a best-fitting function that is quadratic with no linear term, fitting to the data (−2, 1),(−1, 2),(0, 2),(1, 2),(2, 1).)