Projection onto subspace given set of LI vectors
I want a subroutine to find the Projection Matrix onto a subspace given a set of linearly independent vectors of that subspace. Suppose I have vectors v1,v2,…vn and the Vector space span(vi). How do I get the projection matrix onto that span?
This looks like a homework. I guess you mean orthogonal projection (othewise some information is missing). How would you construct such a matrix mathematically ?