0

How can I have the subspace generated by given vectors in Matlab?

For example, I have vectors $v_1 ,...,v_n$; what is the span of v_i's in Matlab?

And how can I have the matrix that projects every vector on this subspace?

I mean, how can I give some vectors to Matlab and get the projection matrix on the span of vectors?

Can you please shoe me the code? I am really new to Matlab and in need of your help.

Please help me.

Thanks.

1 Answer 1

0

You can use the QR decomposition to get an orthogonalization of the columns of v. Then the projection matrix is Q * Q':

[Q,R] = qr(v, 0); % "economy size" QR decomposition
proj_v = Q * Q';
3
  • The basis is Q, the projection matrix is Q*Q'.
    – rlbond
    Jun 19, 2015 at 22:56
  • what is the span of v_i's in Matlab?
    – user115608
    Jun 20, 2015 at 15:18
  • The column space of matrix Q forms an orthonormal basis that is equal to the span of the v_i's.
    – rlbond
    Jun 21, 2015 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.