Question: Suppose that 4 vectors, v1, v2, v3, and v4 are given in $R^{6}$ and we don’t know whether or not these vectors are linearly independent. Explain how you would find the (projection) matrix which projects onto the subspace S = span {v1, v2, v3, v4}.
Is it correct to say:
First find the basis of S to obtain a linearly independent columns of a matrix A that will span S. Then use the basis vectors as the columns of A. To find the projection matrix we use $P=A(A^{T}A)^{−1}A^{T}$
So I had asked this question somewhere and someone suggested in using least squares. I am assuming because A is 4x6. Then the projection matrix would just be P=Ax. But, if I try finding the least square, x, I would need a $b$ for the equation $A^{T}Ax=A^{T}b$.