Scroll to turn the page
Linear Algebra · College Linear Algebra
every matrix is a function of space
Chapter 1 used a matrix to store a system. This chapter reads it the other way: a matrix is a machine that takes in a vector and puts out another, . Fed every vector of the plane at once, it moves the whole plane.
The figure carries the grid paper through three matrices in turn: a shear, a stretch, then a turn. However the paper is pushed, its lines stay straight, parallel lines stay parallel and evenly spaced lines stay evenly spaced, and the origin never moves. Those are the marks of a linear transformation.
The red and blue arrows are where the two unit vectors and land. They are the matrix's columns, and they fix everything else: each point of the grid is so many steps of one plus so many of the other.
Everything a computer draws in 2D or 3D, from a font to a film frame, is placed this way, by multiplying coordinates by matrices.
sums and multiples go through
A transformation T from to assigns to each vector x in an image in . It is linear when, for all vectors and scalars,
Every matrix transformation is linear, because and . A linear map always sends 0 to 0, so , a slide, is not linear.
The figure applies to , and their sum :
The parallelogram on u and v is carried to the parallelogram on Au and Av, its diagonal to its diagonal. That is all linearity says, drawn: linear maps carry parallelograms to parallelograms. Combining the two rules, : a linear map respects every linear combination. Engineers call this the superposition principle.
its columns are the images of e₁ and e₂
Every vector is a combination of the unit vectors, , so by linearity . Knowing where the unit vectors go tells where everything goes.
So every linear transformation from to is a matrix transformation, by its standard matrix
To find a matrix, ask where each unit vector lands and write the answers as columns. The figure's four:
The rotation's columns are and , so its exact entries are and .
A transformation is one-to-one if no two vectors share an image, which for a matrix means its columns are linearly independent. It is onto if every vector of is an image, which means its columns span . The projection is neither: it flattens the plane onto the x-axis, sending ⟨1, 0⟩ and ⟨1, 1⟩ to the same place and nothing off the axis.
multiplying is doing one, then the other
Matrices of the same size add entry by entry and multiply by scalars entry by entry. The interesting operation is the product. Applying B, then A, sends x to ; the single matrix that does both is the product AB, whose columns are A times the columns of B:
Entry by entry this is the row–column rule: the (i, j) entry of AB is row i of A dotted with column j of B. AB exists when A has as many columns as B has rows: an m × n times an n × p is m × p.
Order matters. Let A turn the plane 90° and B shear it:
Shearing then turning (AB, left) and turning then shearing (BA, right) leave the flag in different places. In general , and does not mean . What does hold: , , and the identity I changes nothing.
The transpose swaps rows and columns, and reverses products: . Powers are repeated products: .
undoing a transformation
A square matrix A is invertible when some matrix undoes it: . Then has exactly one solution for each b, .
For a 2 × 2 matrix with , swap the diagonal, negate the rest and divide by . The figure's matrix has :
In the figure A carries the flag, and the point x = ⟨1, 1⟩ to b = ⟨3, 2⟩; then brings both home.
For larger matrices, row-reduce A beside I: if A reduces to I, the same steps turn I into , and if it doesn't, A has no inverse.
Inverses reverse products, like taking off socks and shoes: . Also and .
many questions, one answer
For a square n × n matrix A, the following are either all true or all false:
For square matrices, then, one-to-one and onto come together. The figure shows what failing looks like. has columns on one line, since . It crushes the whole plane onto that line (blue): every output is a multiple of ⟨2, 1⟩, so has no solution for any b off it.
And it is not one-to-one: every multiple of ⟨−2, 1⟩ (red) lands on 0, since . Whole lines of points collapse to single points. Nothing can unflatten the plane: S has no inverse.
elimination, saved for reuse
Row reduction without swaps writes A as LU: U is the echelon form, upper triangular, and L is lower triangular with 1s on its diagonal, holding the multipliers elimination used.
Here elimination subtracted 2 × row 1 from row 2, and that 2 sits in L. As transformations, A = LU means U acts first (a stretch and a shear along the x-axis), then L (a shear along the y-axis), as the figure shows.
To solve with , solve two triangular systems, each by substitution:
Check: . Why bother? Factoring an n × n matrix costs about arithmetic operations, once; each new b then costs only about . Engineering software solving the same system for thousands of right-hand sides (loads on a bridge, inputs to a circuit) factors once and reuses L and U.
one more coordinate, and moves become products
A 2 × 2 matrix can turn, reflect, shear and stretch, but never slide: it always fixes the origin. Graphics needs slides too, so it gives each point a third coordinate, 1. In these homogeneous coordinates (x, y) is , and a slide by (h, k) is a matrix:
Now every move is a 3 × 3 matrix, and a sequence of moves is one product. To turn the flag 90° about the point (2, 1) instead of the origin: slide (2, 1) to the origin, turn, slide back. Reading right to left,
Check one corner: the flag's corner at (3, 1) goes to , a quarter turn about (2, 1).
3D graphics uses 4 × 4 matrices the same way, with a fourth coordinate; graphics chips multiply millions of points by them every frame. The figures in this book are drawn that way.