My questions is this:
How to find the orthogonal projection of vector y= (7,-4,-1,2) on null space
N(A)
Where A is a matrix
A =
2, 1, 1, 3
3, 2, 2, 1
1, 2, 2, -9
Are you supposed to do this entirely by hand? I used a computer program for half of it.
First, row reduce A, find general solution to Ax = 0, and thus find basis for N(A). I found parametric solution is [-5t,7t-s,s,t] and thus basis is [-5,7,0,1] and [0,-1,1,0].
Put basis as columns in a matrix B.
The orthogonal projection matrix is P = B(B^T B)^-1 B^T.
The orthogonal projection is v = Py = [5,-5,-2,-1]. Check this is in N(A) since Av = 0 and/or v is linear combination of basis vectors.
Check y - v = [2,1,1,3] is in A, so is orthogonal to N(A) and thus v is indeed an orthogonal projection of y.
To me that answer is an error because for v = [0,-3/2,3/2,0] to be an orthogonal projection, by definition
y - v = [7,-4,-1,2] - [0,-3/2,3/2,0] = [7,-5/2,-5/2,2]
must be orthogonal to N(A). But it is not because the dot product with the basis vector [-5,7,0,1] is not zero.
v is an orthogonal projection of y on the subspace spanned by [0,-1,1,0], but not on the subspace N(A).
Either you have not posted the question correctly or the solution you were given is in error. v = 3/2(0,-1,1,0) is not an orthogonal projection on N(A) because y - v = (7,-5/2,-5/2,2) is obviously not orthogonal to N(A). It also does not have the minimum distance to N(A) as an orthogonal projection must. Using the correct solution v = (5,-5,-2,-1), y - v = (2,1,1,3) and the distance is sqrt(15) < sqrt(131/2).
The definition of an orthogonal projection of a vector y on a subspace W is a vector v in W such that y - v is orthogonal to W. It has the additional property that the distance ||y - v|| is the minimum distance from y to W. You should check as I did that the correct solution satisfies the definition and that the incorrect solution does not.
Another related question:
Finding an orthogonal projection of vector y = (4,8,1) on C(A) (columns space)
on A =
( -2 2)
1/3 ( 1 2)
( 2 1)
For this do I need to find the column space?
Cause after rref(A) i get "leading" valuse corresponding to 2 columns, so i get C(A) = A!!!
Why??
I originally said to "confirm C(A) = span(A)." That's what yevi is asking about. But span(A) is the definition of C(A). I edited it to "confirm the columns of A are a basis for C(A)."
I meant if the columns of A are a basis for C(A) then you can compute the projection matrix using A. I agree that the projection vector is not the p you give.