Advanced Linear Algebra
Linear transformations
Matrices as functions that move space
In Lesson 13 a matrix was a grid of numbers with a rule for multiplying. This lesson tells you what those numbers mean. A linear transformation is a function that takes the whole plane and re-draws it - but only in the tame, disciplined ways where grid lines stay straight, stay parallel, and stay evenly spaced, and the origin never budges. Every such re-drawing of 2-D space, no matter how twisted it looks, is captured by just four numbers: a matrix. Drag two arrows below and watch space itself bend to follow.
The one-line idea
Linear = grid lines stay straight and evenly spaced
Out of all the ways you could distort a rubber sheet, transformations earn the name linear when they obey two rules. First, they respect addition - transforming a sum is the same as transforming the parts and adding. Second, they respect scaling - stretching a vector then transforming equals transforming then stretching:
Geometrically these two algebraic rules cash out as a picture you can check by eye: lines stay lines (no curving), parallel lines stay parallel, evenly spaced tick marks stay evenly spaced, and - because - the origin is nailed in place. That last fact is why sliding the whole plane sideways (a translation) is not linear: it drags the origin along with it.
The matrix is just where and land
Here is the trick that makes those four numbers appear. Any vector is built from the two basis vectors and by scaling and adding: . Feed that through a linear map and the two rules let you pull the transformation inside the sum:
So the output is completely determined by the two landing spots and . Stack them as the columns of a matrix and you get exactly the machine from Lesson 13:
Four numbers pin down the fate of an infinite plane. In the demo, the two arrows you drag are the two columns: move 's tip and you rewrite the left column; move 's tip and you rewrite the right one.
The shaded cell is the image of the unit square; its area equals |det|. The dashed outline is the original square (area 1). Push ĵ around to the other side of î and the whole plane turns inside-out - the determinant goes negative and the little "F" reads backwards.
The aha: the determinant is that shaded area - with a sign
A small zoo of transformations
Every preset button above is a famous matrix. Once you read matrices as "where the basis lands," each one is memorable rather than mysterious:
Rotation and shear keep every area intact (); scaling multiplies area by ; reflection preserves area but reverses handedness (). To do one transformation then another, you compose them - and composition is exactly matrix multiplication: applying then is the single matrix . This is why Lesson 13 defined matmul the strange way it did, and why order matters (): spinning then stretching is not the same as stretching then spinning.
Determinant, kernel, and image
import numpy as np
# columns are where î and ĵ land -- that IS the matrix
i_hat = np.array([1, 0]) # î stays put
j_hat = np.array([1, 1]) # ĵ slides right -> a shear
M = np.column_stack([i_hat, j_hat]) # [[1, 1], [0, 1]]
v = np.array([2, 1])
Mv = M @ v # = 2*i_hat + 1*j_hat = [3, 1]
np.linalg.det(M) # 1.0 -> area unchanged, orientation kept
R = np.array([[-1, 0], [0, 1]]) # reflect across the y-axis
np.linalg.det(R) # -1.0 -> orientation flipped, space inside-outCheck yourself
A transformation's matrix has determinant -2. Applying it must:
Every linear transformation is forced to leave which point exactly where it is?
Recall: what the two columns of a transformation matrix mean, and what the size and sign of its determinant tell you.
Try to state it, then check.
Lock it in
- A linear transformation redraws the plane keeping grid lines straight, parallel, and evenly spaced, with the origin nailed in place - which is why a translation is not linear.
- The columns of its matrix are where the basis vectors land: , so .
- The determinant is the signed area of the image of the unit square: is the area-scaling factor and a negative sign flips orientation.
- collapses space onto a line (a nonzero kernel), so the map loses information and is not invertible.
- Doing one transformation then another is matrix multiplication - apply then is - which is why order matters and .
Primary source
Ask your teacher