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

# Linear transformation examples: Scaling and reflections

Creating scaling and reflection transformation matrices (which are diagonal). Created by Sal Khan.

## Want to join the conversation?

• I have a question, how do I guarantee that my scaling matrix is going to be linear with the area of the e.g triangle.
• Usually you should just use these two rules:
T(x)+T(y) = T(x+y)
cT(x) = T(cx)
Where T is your transformation (in this case, the scaling matrix), x and y are two abstract column vectors, and c is a constant.
If these two rules work, then you have a linear transformation :)
• Why not just use the A= [-1 2]? Why do we need a 2x2 matrix?
• We need an m x n matrix A to allow a linear transformation from Rn to Rm through Ax = b. In the example, T: R2 -> R2. Hence, a 2 x 2 matrix is needed. If we just used a 1 x 2 matrix A = [-1 2], the transformation Ax would give us vectors in R1.
• Does this still work if I add a translation? Tried mapping a triangle of A(-1,2), B(-1,-2), C(1,2) so that it's flipped across y, then moved 1 unit right and 1 down. I got T(x,y) = (-x+1, y-1) and then
``    [ 0, 1]A = [-1, 0]``

And the result is a triangle which is rotated 90deg clockwise, not flipped and translated!
Edit: the T(A+B) = T(A)+T(B) check fails (as (3,-1) is not equal (4,2))... so maybe adding translation makes it a non-linear transformation? That would be so counterintuitive!
• A translation T(x, y) = (x - 1, y - 1) is not a linear transformation. A simple test to show that a transformation is not linear, is to check if T(0, 0) = 0. Well, in this translation example:
T(0, 0) = (-1, -1) which does not equal 0. Therefore a translation transformation is not a linear transformation.
• Are there any videos that focus on the linear transformation that sends a line to the origin?
• What's a matrix?
• A matrix is a rectangular array of numbers arranged in rows and columns. Each individual number in the matrix is called an element or entry.
• Is there a video on tessellations?
• I'm learning Linear Algebra from this playlist, and I finished the playlist for the first time two days ago, so now I'm rewatching them to appreciate the earlier stuff. Anyway, my question is this:
Would it be wrong to say that as a general rule of thumb that if I want a transformation about something that isn't about an axis, then I should create a new coordinate system with orthonormal vectors? Also, for scaling, that would be generally done by creating a transformation with with eigenvectors?
• at Sal says the "transformation will be mapped to the set in R^3".

I presume "R^2" is intended here. Or do I misunderstand?
• You are correct, Sal made a mistake: a 2x2 matrix as your A for T( x )=A x should map x from R^2 into R^2.
• You give an example of a reflection over an axis - can you work through an example reflecting a shape (using linear algebra) over a non-axis line, please?
• Good question. I don't think that linear transformations do that, because then T(a + b) != T(a) + T(b) and (cT)(a) != T(ca).

For example, if you reflect points around x=4, then T(5) = 3, and T(6) = 2, so T(5) + T(6) = 5, but T(5+6) = T(11) = -3; and:

(3T)(5) = 3(T(5)) = 3*3 = 9, and T(3*5) = T(15) = -7.

(Any errors?)
(1 vote)
• just a request - it would be great to have training exercises for linear algebra as well (similar to the precalculus classes where vectors and matrices get introduced).

the videos themselves are great, but i find things get really drilled down when I'm doing exercises. Many thanks =)