- #1

- 260

- 21

- Homework Statement
- Use least squares to find the orthogonal projection of u onto the subspace of R4 spanned by the vectors v1, v2, and v3.

- Relevant Equations
- u = (0,5,4,0) v1 = (6,0,0,1) v2 = (0,1,-1,0) v3 = (1,1,0,-6)

I'm a little confused how to do this homework problem, I can't seem to obtain the correct answer. I took my vectors v1, v2, and v3 and set up a matrix. So I made my matrix:

V = [ (6,0,0,1)

u = [ (0,5,4,0)

I then went to solve using least squares. So I ended up doing V

I took that, obtained my augmented matrix:

[ (37,0,0)

I solved it and everything worked fine, I got the answers: x

I noticed to that I could use QR factorization of V then solve Q

However, the solution requires four components. I am unsure of where I am going wrong with this problem, any help would be appreciated.

V = [ (6,0,0,1)

^{T}, (0,1,-1,0)^{T}, (1,1,0,-6)^{T}] and then I hadu = [ (0,5,4,0)

^{T}].I then went to solve using least squares. So I ended up doing V

^{T}V = V^{T}u.I took that, obtained my augmented matrix:

[ (37,0,0)

^{T}, (0,2,1)^{T}, (0,1,38)^{T}, (0,1,5)^{T}].I solved it and everything worked fine, I got the answers: x

_{1}= 0, x_{2}= 11/25, x_{3}= 3/25.I noticed to that I could use QR factorization of V then solve Q

^{T}u and the least squares solution would be x' satisfies Rx = Q^{T}u, we can then obtain our answer, but again this solution only has three components, why is the solution asking for four?However, the solution requires four components. I am unsure of where I am going wrong with this problem, any help would be appreciated.