Stretch a photo, shear it, or turn it a quarter turn. Straight lines stay straight, the origin stays put, and evenly spaced grid lines stay evenly spaced. Every motion like that is captured by a small grid of numbers, a matrix, and one number computed from it tells you how much areas grow and whether the picture got flipped. These ideas return later in the course, where a derivative becomes a matrix and the determinant becomes the Jacobian.
Key terms
Matrix notation
Definition An matrix is a rectangular array of real numbers with rows and columns. The entry in row and column is written . A vector in is written as a column, an matrix. If the columns of are the vectors in , we write
Two matrices are equal when they have the same size and equal entries in every position. The identity matrix has on the diagonal and elsewhere. The transpose of an matrix is the matrix with entries , so the rows of become the columns of .
In plain words A matrix is a table of numbers. Rows come first, columns second, both in the size and in the index.
Example The matrix
is , with and . Its columns are and .
Matrix-vector multiplication and linear maps
Definition Let be an matrix with columns and let . The product is the vector in
Equivalently, its th entry is , the dot product of row with . The product is defined only when has as many entries as has columns. A map from to is linear if and for all vectors and scalars . Every map is linear, and every linear map equals for exactly one matrix, its standard matrix, whose th column is .
In plain words The columns of a matrix say where the basis vectors land. Every other vector lands at the same combination of those columns, so the whole grid moves along with them.
Example With from above and ,
The row rule agrees, since and . As a second example, the counterclockwise quarter turn sends to and to , so its standard matrix has columns and .
Composition and the matrix product
Definition Let be and be , with columns . The product is the matrix with columns , so its entries are
It is defined only when the number of columns of equals the number of rows of . With this definition for every in , so is the matrix of the composition that applies first and then . The product is associative, , but in general .
In plain words Multiplying matrices is doing one map after another, and the order is read from right to left.
Example Let be the quarter turn and stretch the direction by ,
Then
Follow to see why they differ. Turning first sends it to , which the stretch leaves alone, giving . Stretching first gives , which the turn sends to . These are the first columns of and .
Linear systems
Definition A system of linear equations in unknowns,
is the single matrix equation , where is the coefficient matrix. The system has a solution exactly when is a linear combination of the columns of . Its solution set is empty, a single point, or infinite. If is one solution, the solutions are exactly the vectors with .
In plain words Solving a system asks which input the map sends to a given output. There may be no such input, exactly one, or a whole line or plane of them.
Example The system , reads
Adding the equations gives , so and then . Check by multiplying, since and .
Invertible matrices
Definition A square matrix is invertible if there is an matrix with . Such a is unique and is written . For a square matrix the following are equivalent. The matrix is invertible. The equation has exactly one solution for every , namely . Only solves . The columns are linearly independent. The determinant is not zero. For a matrix with ,
If and are invertible of the same size, then .
In plain words An invertible map can be undone. Nothing gets squashed, so every output comes from exactly one input.
Example For the coefficient matrix of the system above, , so
the same solution as before. By contrast, the matrix with rows and has . Its columns are parallel, it squashes the plane onto a line, and it has no inverse.
Determinant
Definition The determinant of a matrix is , as above. For a matrix , expansion along the first row gives
For a larger square matrix the determinant is defined the same way, by expanding along the first row into smaller determinants with alternating signs. For square matrices and of the same size, and . Swapping two rows changes the sign, multiplying one row by a number multiplies the determinant by , adding a multiple of one row to another changes nothing, and is invertible exactly when . Because , the same rules hold for columns. For vectors in , the matrix with rows has determinant , the scalar triple product.
In plain words The determinant is one number that tells you whether the matrix squashes space flat, and the next two sections say what its size and sign mean.
Example Expanding along the first row,
Area and volume scaling
Definition Let be a matrix. For every bounded region in the plane that has an area, for example one bounded by finitely many smooth curves, the image has area
For a matrix the same holds with volume in place of area. In particular the unit square goes to the parallelogram spanned by the columns, with area , and the unit cube goes to the parallelepiped spanned by the columns, with volume . When the image is flattened and has area or volume .
In plain words A linear map stretches every area by the same factor, and the absolute value of the determinant is that factor.
Example The matrix with rows and has determinant . It sends the unit square to the parallelogram with corners , , and , whose area is base times height , which is . It sends the unit disk, of area , to an ellipse of area .
Orientation
Definition An ordered basis of is positively oriented if the matrix with columns has positive determinant, and negatively oriented if the determinant is negative. An ordered basis of is positively oriented, or right-handed, when
The standard bases are positively oriented, since . An invertible linear map preserves orientation when and reverses it when .
In plain words The sign of the determinant says whether the map keeps your right hand a right hand or turns it into a mirror image.
Example The reflection matrix with rows and has determinant . Before the map, turning from to is counterclockwise. After it, turning from to is clockwise. In space the ordered triple gives , so it is left-handed, matching .
Basis changes
Definition A basis of is a list of vectors for which the matrix is invertible. Every in then has unique coordinates with , that is
If a linear map has standard matrix , then in coordinates it has matrix , meaning . To convert from coordinates to coordinates in a second basis with matrix , first return to standard coordinates and then solve, so .
In plain words A new basis is a new grid. The coordinates of a point in that grid come from solving one linear system, and a well chosen grid can make a map look much simpler.
Example Take , and . Solving and gives and , and indeed . The map with rows and sends to and to , so
In the new grid the map simply stretches by along and fixes .
Check yourself
- Compute and for the matrices with rows for and for .
Show the answer
Row times column gives
They differ, so the order of the maps matters. Both have determinant , as predicts.
- The matrix with rows and is applied to the triangle with corners , and . What is the area of the image, and is orientation preserved?
Show the answer
The determinant is . The triangle has area , so the image has area . The sign is negative, so the map reverses orientation.
- Find the coordinates of in the basis , .
Show the answer
Solve and . Subtracting gives , then . Check that .