What is the equation to estimate a b vector that is outside of the column space of A?
A xhat = p
p is the projection of the b vector onto the column space
Equation for xhat
xhat = (A^TA)^-1 A^T b
Equation for p (projection of b onto the column space)
p = [A (A^TA)^-1 A^T] b
Equation for P (projection matrix)
P = A (A^TA)^-1 A^T
Equation for e (error vector)
e = b - Axhat
Equation for finding E with partial derivatives
E=||A(xhat)-b||^2
Take partials of E with respect to xhat, set them equal to zero (to minimize E) and solve for the components of the xhat matrix.