If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Subspace projection matrix example

Example of a transformation matrix for a projection onto a subspace. Created by Sal Khan.

## Want to join the conversation?

• I have one question.

Is A (A^T A) ^(-1) A^T equal to A A^(-1) A^T^(-1) A^T and equal to I I and equal to I?

I am confused with the projection matrix. • The property (AB)^-1=(B)^-1*(A)^-1 is valid only when both A and B are invertible and when matrix multiplication between them is defined.

If A is invertible, then it follows that A^T is also invertible. Their product A^T A is defined because the number of rows in A^T is equal to the number of columns in A. In such a case, the simplification A (A^T A) ^(-1) A^T =A A^(-1) A^T^(-1) A^T=I would be valid. So the projection of x onto the column space is simply x.

In fact, this makes since because when A is invertible, the system Ax=b has a unique solution for every b in Rn. This implies that the columns of A are a basis for Rn(since they are linearly independent and they span Rn) and that therefore any projection of an arbitrary vector x onto the subspace spanned by the columns of A is simply x, since x is already in the columns space of A.

However, If A is not invertible, then apparently there are some elements of Rn that are not in the column space of A, and so it makes since to speak of the projection of arbitrary vectors into C(A), which can be computed using the projection matrix A (A^T A) ^(-1) A^T. Keep in mind that even if A itself is not invertible, A^T A is invertible since A consists of linearly independent columns.
• So the final transformation matrix at is symmetric. Is there anything significant about this? Will it always be symmetric? • Yes it will be symmetric.
If A is axb, then A' is bxa. So A'A is bxb inverse(A'A) is still bxb... A * inverse(A'A) * A' gives axa matrix.
Since in this case we are dealing with R4, we expect a vector of R4 as input so the final transformation matrix has 4 columns. In general the projection will be a vector in R4 so the matrix is 4x4. But the interesting thing here is that the 3rd row is zero. So the projection matrix takes a vector in R4 and returns a vector in R4 whose 3rd component is 0 (so it is kind of like in R3).
Why is the 3rd row all zeroes? note that all the basis of V have zeroes in the 3rd position, So this subspace can span vectors that have components in 1s, 2nd and 4th dimension only. So if you project something onto V, you are bound to lose the 3rd component (9which is what we find from the matrix which has 3rd row full of zeroes only).

To conclude: yes the transformation matrix is symmetric as it is a general matrix that transforms R4 vectors to R4... but some components of the output vector might be zero making them vectors of a smaller subspace.
• How can we find projection of a vector in R4 on R2 ?
(1 vote) • R2 isn't a subspace of R4, it's an entirely separate vector space; so you can't. However, if you're asking how we can find the projection of a vector in R4 onto the plane spanned by the î and ĵ basis vectors, then all you need to do is take the [x y z w] form of the vector and change it to [x y 0 0]. For example:
`S = span(î, ĵ)`
`v = [2 3 7 1]`
`proj(v onto S) = [2 3 0 0]`
(1 vote)
• What if you try to project a vector in R5 onto this subspace? How would you multiply the 1x5 vector by a 4x4 matrix
(1 vote) • Does anyone have an good cookie recipes? 