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.

### Course: Linear algebra>Unit 2

Lesson 2: Linear transformation examples

# Expressing a projection on to a line as a matrix vector prod

Expressing a Projection on to a line as a Matrix Vector prod. Created by Sal Khan.

## Want to join the conversation?

• I notice that the determinant of A is 0. Is this just a coincidence or does it mean something?
• Yes, the determinant is 0. That actually shows that the image of the transformation isn't all of ℝ², which we already knew from the fact that the image will always be a line.
• Sal says he previously discussed unit vectors in an earlier video. I have faithfully followed the list and never saw it. Has it been removed or relocated to a different list?

Thanks
• I don't get why Sal can do the thing with the Identity matrix. He applies the transformation to one column at a time, and the columns he does it to it the identity matrix. Why does this work? (Did he do it in a previous video?)
• The proof comes from this video: https://www.khanacademy.org/math/linear-algebra/matrix_transformations/linear_transformations/v/linear-transformations-as-matrix-vector-products

We are using the identity matrix to do the transformation dimension by dimension

If we multiply the vector x by the identity matrix before we do the transformation, we can rewrite Tx as a matrix vector product
Tx =
T[ x1 (1 0) x2 (0 1)] =
[ T (1 0) T(0 1) ] (x1 x2) =
[ T (1 0) T(0 1) ] x

In this lesson we are using the projection as our transformation. Sal skips the part where he breaks the x vector into components and multiplies the components by the identity matrix. He starts with finding the projection matrix and writes the projection as Tx later.
• This was a wonderful lesson. Among other things, the video shows how to form a matrix that projects any vector onto a line (in 2D). How do I extend this process to form a matrix that projects 3D vectors onto a plane?
• This is covered further on in the Linear Algebra videos. I also highly recommend this video from MIT on projections: http://www.youtube.com/watch?v=Y_Ac6KiQ1t0
• The determinant of the matrix Sal created in this video is 0:

(u1^2 x u2^2) - (u1u2 x u2u1) =
(u1u2)^2 - (u1u2)^2 = 0

Is it another coincidence?
• This is not another coincidence. The determinant of a transformation matrix gives the quantity by which the area is scaled. By projecting an object onto a line, we compact the area to zero, so we get a zero determinant.
Having a determinant of zero also means that it is impossible to reverse this operation (since an inverse matrix does not exist). This makes sense, because many points are being mapped to a single point in a projection, which means you lose some information in the process.
• At , Sal asks if the transformation is linear. I have noticed he asks the same question often in other videos. What is the significance of something being linear transformation? What would be the issue if it wasn't linear transformation? Thanks.
• A linear transformation can be defined using a single matrix and has other useful properties. A non-linear transformation is more difficult to define and often lacks those useful properties. Intuitively, you can think of linear transformations as taking a picture and spinning it, skewing it, and stretching/compressing it. Anytime you want those types of effects, linear transformations are wonderful.
• Where has this stuff been all my life? It is so, so cool!
• Wouldn't a projection be a mapping from Rn to Rn-1? Specifically: In your example all the output vectors are on a line, so wouldn't you be in R1?
• Remember that a line in R² is a subset of R², and hence in R². Whether you consider any line in R² to be R¹, you can decide for yourself (see the Cantor-Dedekind axiom: http://en.wikipedia.org/wiki/Cantor–Dedekind_axiom). Anyhow, the conclusion is that a line in R² is in R².
• Why is it useful to know the projection of something on to a line? And what if the vector that we want to find the projection for lies on the other side of the line than what was shown in the video? Is there any projection at all in that case?