The Matrix of a Linear Transformation
A linear transformation is completely decided by where it sends the basis vectors, because every other vector is built from them. Put in the columns, and that's its matrix.
What the symbols mean
- Where the first axis goes
Column j is the image of the jth standard basis vector.
Explanation
The matrix of a linear transformation is simply a record of where the transformation sends each axis direction. All we're really saying is: if you know where the unit arrows along the axes land, you know where everything lands, because every vector is built out of those arrows. That's good because it turns any geometric move, like "rotate by 30°" or "reflect across this line", into a matrix you can actually compute with. The formula above has just two kinds of pieces: (the standard basis vectors, the unit arrows along each axis, like and in the plane) and (where each of those arrows ends up, which become the columns, in order). It's one column per axis; bear with it.
Why it works. This builds right on the last lesson's point that knowing a few outputs tells you all of them. Any vector can be written as (for example, ), so by linearity , which is exactly with those columns. Notice that last step is the column picture of from earlier in the unit: the weights go on the columns. So every linear transformation from to is a matrix in disguise.
Building matrices geometrically: ask where the unit vectors land. A 90° rotation sends and , so its matrix is . A horizontal shear keeps and tilts to . You don't need a formula for any of these; a quick sketch of where the two arrows go is enough. The same thinking gives the rotation matrix above: turning by lands it at , and turning lands it at .
A common mistake. It's tempting to write as the first row of the matrix, because we read a matrix row by row. It doesn't go there: the images go in as columns. Getting this backward gives you the transpose, which for a rotation is the rotation the other way. A quick check: always picks out the first column of , so that's where has to be.
One-to-one and onto. is one-to-one when the columns are independent (pivot in every column), and onto when the columns span the codomain (pivot in every row). Both come straight from earlier lessons. One-to-one means no two different inputs land on the same output. If two inputs did, then with , and that's exactly a dependence among the columns. Onto means every is an output, which is the "solution for every " question from the lesson.
There's an animation further down where you slide a shear and watch its second column move.
See it
Worked examples
Find the matrix of the reflection across the line .
- 1
Ask where the axis arrows go. Reflecting across swaps the two coordinates, so and .
Practice
Type your answer and check it. Solve them all to complete the lesson.
Give the matrix of rotation by 90° counterclockwise, row by row.
Give the matrix of reflection across the -axis, row by row.
Give the matrix of the horizontal shear sending to and fixing , row by row.
Find .
Is with matrix one-to-one?
A camera rotates an image counterclockwise and then doubles its size. Give the matrix of the combined transformation, row by row.
The hardest one here. Get it, and you've got this lesson.
Find the matrix of the reflection across the line , row by row.
Where it's used
The robot arm lab builds each joint's rotation matrix this way, and camera projection matrices in computer vision are found by asking where the axes go.