Matrices
Coordinate representation of linear maps; why matrix multiplication is defined the way it is.
about 8 min
Start from a problem
A linear map is determined by the images of a basis. But to evaluate a map, store it, and compose two maps, we need a notation that turns these operations into mechanical arithmetic.
Matrices are that notation. The "row times column" rule for multiplication looks odd; this section shows it is the only natural choice.
In the previous experiment you dragged and , and the matrix below changed with them. Watch how: the coordinates of are the first column, those of the second. A matrix is nothing but the two image vectors written side by side.
Since a linear map is determined by the images of a basis, writing those images as columns of a table records the map completely. "Matrix times vector" should be "evaluate the map", and "matrix times matrix" should be "compose the maps". If so, the odd-looking definition of matrix multiplication stops being odd.
Definitions
Let be linear and the standard basis. The matrix of is the array whose -th column is the coordinate vector of :
For and , is the linear combination of the columns of :
If is the matrix of , then for all .
, so by linearity .
Why matrix multiplication is defined this way
For of size and of size , is the matrix whose -th column is , i.e.
If has matrix and has matrix , then has matrix .
is linear (check both properties). Its -th column is , the -th column of .
That is the whole origin of "row times column". Immediate consequences:
- Associativity , because composition of maps is associative. No sums need expanding.
- Non-commutativity : rotating then stretching differs from stretching then rotating. Try it in the experiment.
- The identity matrix is the identity map, .
The determinant
In the experiment the unit square becomes a parallelogram whose area depends on the matrix.
The signed area of the parallelogram spanned by and is . It is negative exactly when reverses orientation (the turn from to changes from counter-clockwise to clockwise).
Let , , and the counter-clockwise quarter-turn of . The area is times the signed projection of onto : . The projection is positive when lies on the counter-clockwise side of .
.
Geometrically: turns the unit square into a parallelogram of area , and multiplies the area of any region by (it sends every small grid cell to the same parallelogram, and any region's area is a limit of sums of cells). So multiplies area by ; orientation signs multiply likewise.
is invertible iff , and then .
is the "Collapse" preset: the plane is flattened onto a line (or a point), information is lost, nothing can be undone.
. Matrix multiplication is composition: means apply first, then (acting on a vector to the right, touches it first). Writing the factors in the wrong order is the most common mistake.
Application
Counter-clockwise rotation by : , ; as columns, Expanding yields the angle-addition formulas: matrix multiplication turns them into the triviality "rotate by , then by ".
One sentence suffices: the columns of a matrix are where the basis vectors go. Every definition and theorem about matrices can be re-derived from that sentence and linearity. The next section, Eigenvalues, asks: is there a vector whose direction the map leaves unchanged?