Part V · Linear algebra Chapter 35 of 60
Matrices as transformations
Four numbers in two columns can rotate the plane, stretch it, skew it, reflect it in a mirror or squash it flat onto a line. Let’s learn to read a matrix as the blueprint of a deformation: chain deformations together, undo them, and tell from a single number how much area changes.
Builds on: 15 · Complex numbers 22 · Vectors and coordinates
You will learn
- see the transformation in a matrix, and write down the matrix of a transformation: the columns are the images of e₁ and e₂
- multiply matrices as a composition of transformations and remember why the order matters
- understand the determinant as a signed area factor and find the inverse of a 2 × 2 matrix
The last chapter ended with the simplest map of the complex plane, multiplication by a number. Multiplying by $a = p + qi$ means rotating the plane about zero through the angle $\arg a$ and stretching it by a factor of $|a|$. One goes to the point $a$, that is, to $(p, q)$, and the imaginary unit $i$ goes to $ia = -q + pi$, the point $(-q, p)$: the same segment, turned through a right angle. A square grid goes to a square grid. The squares get bigger and turn, but they stay squares.
Such a map has two levers, and they’re linked: wherever you turn the first, the second follows, a quarter turn further on. Let’s break the link. Let the point $(1, 0)$ go anywhere at all, and the point $(0, 1)$ anywhere too, independently of the first. The squares stop being squares: they stretch, skew, turn inside out, or even squash into a segment. All these deformations, rotations, stretches, reflections, shears, projections, are written with four numbers in two columns. The chapter is laid out as a workshop: we’ll take apart how this notation works, learn to chain deformations together and undo them, and at the end go out into space.
One convention before we start. From this chapter on, vectors are written in bold, $\mathbf v$ instead of $\vec v$, as is usual in linear algebra. The coordinates of a vector are written as a column: $\mathbf v = \left(\begin{smallmatrix} v_1 \\ v_2 \end{smallmatrix}\right)$, and in running text, so as not to break the line, in a row with commas: $(1, -1)$ means the column $\left(\begin{smallmatrix} 1 \\ -1 \end{smallmatrix}\right)$. The unit vectors along the axes, called $\vec i$ and $\vec j$ in chapter 22, are now called $\mathbf e_1 = (1, 0)$ and $\mathbf e_2 = (0, 1)$.
Two levers
Which transformations of the plane are we going to study? Multiplication by a complex number suggests the answer. It respects addition and multiplication by real numbers: $a(z + w) = az + aw$ and $a(cz) = c(az)$. These are the two properties we’ll demand.
A map $L$ that assigns vectors to vectors is called linear if for any vectors $\mathbf u$, $\mathbf v$ and any number $c$
$$L(\mathbf u + \mathbf v) = L\mathbf u + L\mathbf v, \qquad L(c\mathbf v) = c\,L\mathbf v.$$
A linear map of the plane to itself (or of space to itself) is also called a linear transformation.
The definition immediately shows how such a transformation behaves. The origin stays put: $L\mathbf 0 = L(0 \cdot \mathbf v) = 0 \cdot L\mathbf v = \mathbf 0$. The line through the point $\mathbf p$ in the direction $\mathbf d$ consists of the points $\mathbf p + t\mathbf d$, and these go to the points $L\mathbf p + t\,L\mathbf d$. That’s again a line with direction $L\mathbf d$, if $L\mathbf d \ne \mathbf 0$, or a single point, if $L\mathbf d = \mathbf 0$. Parallel lines share a direction, so their images are parallel too. Points spaced at equal steps along a line, $t = 0, 1, 2, \dots$, go to points at equal steps. So a square grid turns into a grid of identical parallelograms, with the origin staying put. That’s the portrait of a linear transformation.
Which of these transformations of the plane isn’t linear?
A linear transformation has to keep the origin in place, while a translation moves it to the point $(1, 0)$. Checking against the definition: $L(\mathbf u + \mathbf v) = \mathbf u + \mathbf v + \mathbf e_1$, while $L\mathbf u + L\mathbf v = \mathbf u + \mathbf v + 2\mathbf e_1$. Translations belong to the neighbouring class of affine transformations: linear plus a shift by a constant vector.
The main property of a linear transformation: it’s determined entirely by where the two vectors $\mathbf e_1$ and $\mathbf e_2$ go. Two levers control the whole plane.
If $L$ is a linear transformation of the plane, then for any vector $\mathbf v = (v_1, v_2)$
$$L\mathbf v = v_1\,L\mathbf e_1 + v_2\,L\mathbf e_2.$$
Conversely, for any two vectors $\mathbf a_1$ and $\mathbf a_2$ the formula $L\mathbf v = v_1\mathbf a_1 + v_2\mathbf a_2$ defines a linear transformation that takes $\mathbf e_1$ to $\mathbf a_1$ and $\mathbf e_2$ to $\mathbf a_2$.
The trick is to read a vector as a route on a square grid. A linear transformation carries the route over to its own skewed grid, step by step.
So there are exactly as many linear transformations of the plane as there are pairs of vectors $(\mathbf a_1, \mathbf a_2)$, and each is given by four numbers, the coordinates of these vectors. Take the levers in your hands.
A blueprint in two columns
Since a transformation is given by two vectors, it’s convenient to write their coordinates side by side: the first as a column on the left, the second as a column on the right.
A matrix is a rectangular table of numbers. The matrix of a linear transformation $A$ of the plane is a $2 \times 2$ table whose first column holds the coordinates of the vector $A\mathbf e_1$ and whose second column holds the coordinates of $A\mathbf e_2$:
$$A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \qquad A\mathbf e_1 = \begin{pmatrix} a \\ c \end{pmatrix}, \quad A\mathbf e_2 = \begin{pmatrix} b \\ d \end{pmatrix}.$$
The entry in row $i$ and column $j$ is written $a_{ij}$.
The matrix and the transformation are denoted by the same letter: $A\mathbf v$ is the image of the vector $\mathbf v$. By the two-levers theorem it’s computed like this.
The right side of the formula gives the familiar “row times column” rule: to get the $i$th coordinate of $A\mathbf v$, go along the $i$th row of the matrix and down the column $\mathbf v$, multiplying the numbers in pairs, and add. That’s the dot product of the row with the vector. But it’s more useful to think in columns: the result is a combination of the columns of the matrix with coefficients from $\mathbf v$.
The humblest matrix moves nothing: it leaves $\mathbf e_1$ and $\mathbf e_2$ in place.
The identity matrix $I = \left(\begin{smallmatrix} 1 & 0 \\ 0 & 1 \end{smallmatrix}\right)$ is the matrix of the identity transformation: $I\mathbf v = \mathbf v$ for every $\mathbf v$. Some books denote it $E$. Similar matrices, with ones on the main diagonal and zeros elsewhere, exist in every size $n \times n$.
Find $A\mathbf v$ for $A = \left(\begin{smallmatrix} 1 & -2 \\ 3 & 0 \end{smallmatrix}\right)$ and $\mathbf v = (2, 1)$.
By columns: $A\mathbf v = 2\,(1, 3) + 1\,(-2, 0) = (2 - 2, 6 + 0) = (0, 6)$. By rows it’s the same: $1 \cdot 2 + (-2) \cdot 1 = 0$ and $3 \cdot 2 + 0 \cdot 1 = 6$.
A linear transformation takes $\mathbf e_1$ to $(2, 1)$ and $\mathbf e_2$ to $(-1, 3)$. Where does it take the vector $(3, -2)$?
No matrix is needed; the two-levers theorem is enough: the image is $3\,(2, 1) - 2\,(-1, 3) = (6 + 2, 3 - 6) = (8, -3)$.
A catalogue of deformations
Now any familiar transformation can be written as a matrix almost without calculation: it’s enough to ask where it sends $\mathbf e_1$ and $\mathbf e_2$. Rotation through the angle $\varphi$ takes $\mathbf e_1$ to $(\cos\varphi, \sin\varphi)$ and $\mathbf e_2$ to $(-\sin\varphi, \cos\varphi)$; that’s exactly what was proved in the chapter on symmetry. The other rows of the catalogue are obtained the same way.
| Transformation | Matrix |
|---|---|
| Scaling by a factor of $k$ | $\left(\begin{smallmatrix} k & 0 \\ 0 & k \end{smallmatrix}\right)$ |
| Stretch along the $x$-axis by a factor of $k$ | $\left(\begin{smallmatrix} k & 0 \\ 0 & 1 \end{smallmatrix}\right)$ |
| Rotation through the angle $\varphi$ | $\left(\begin{smallmatrix} \cos\varphi & -\sin\varphi \\ \sin\varphi & \cos\varphi \end{smallmatrix}\right)$ |
| Reflection in the line through $O$ at angle $\alpha$ to the $x$-axis | $\left(\begin{smallmatrix} \cos 2\alpha & \sin 2\alpha \\ \sin 2\alpha & -\cos 2\alpha \end{smallmatrix}\right)$ |
| Shear along the $x$-axis | $\left(\begin{smallmatrix} 1 & k \\ 0 & 1 \end{smallmatrix}\right)$ |
| Orthogonal projection onto the line through $O$ at angle $\alpha$ | $\left(\begin{smallmatrix} \cos^2\alpha & \sin\alpha\cos\alpha \\ \sin\alpha\cos\alpha & \sin^2\alpha \end{smallmatrix}\right)$ |
| Multiplication by $p + qi$ | $\left(\begin{smallmatrix} p & -q \\ q & p \end{smallmatrix}\right)$ |
Projection onto the line with unit vector $\mathbf u = (\cos\alpha, \sin\alpha)$ takes a vector $\mathbf v$ to its shadow $(\mathbf u \cdot \mathbf v)\,\mathbf u$ (chapter 22). For $\mathbf v = \mathbf e_1$ the shadow is $\cos\alpha \cdot \mathbf u = (\cos^2\alpha, \sin\alpha\cos\alpha)$: that’s the first column. Reflection takes $\mathbf v$ to $2(\mathbf u \cdot \mathbf v)\,\mathbf u - \mathbf v$: the shadow laid off twice, minus the vector itself; hence the columns $(2\cos^2\alpha - 1, 2\sin\alpha\cos\alpha) = (\cos 2\alpha, \sin 2\alpha)$ and $(\sin 2\alpha, -\cos 2\alpha)$, matching the formula from chapter 23. The last row is the previous chapter: $(p + qi)(x + yi) = (px - qy) + (qx + py)i$, so $\mathbf e_1$ goes to $(p, q)$ and $\mathbf e_2$ to $(-q, p)$.
The shear along the $x$-axis with factor $k$ is the transformation $(x, y) \mapsto (x + ky, y)$. Each point moves parallel to the $x$-axis, and the higher it stands, the further it moves. That’s how a stack of paper skews if you push its top sheet. Don’t confuse a shear with a translation: a translation moves all points by the same amount, while a shear leaves the $x$-axis in place.
The shear shows well how a linear transformation works. It doesn’t change area: a square turns into a parallelogram with the same base and the same height (chapter on area). But angles and lengths change, so a shear isn’t a rigid motion. In the workshop above it’s one of the presets.
The conveyor
Put two transformations one after the other: first $B$, then $A$. The vector $\mathbf v$ first goes to $B\mathbf v$, and that goes to $A(B\mathbf v)$. The chain is linear again: $A(B(\mathbf u + \mathbf v)) = A(B\mathbf u + B\mathbf v) = A(B\mathbf u) + A(B\mathbf v)$, and likewise with a factor. So it has a matrix of its own.
The product of matrices $AB$ is the matrix of the transformation “first $B$, then $A$”: $(AB)\mathbf v = A(B\mathbf v)$ for every $\mathbf v$.
The letters are read from right to left, as in the notation $f(g(x))$ from the chapter on functions: whatever acts first stands closer to the vector.
The $j$th column of the matrix $AB$ is $A$ times the $j$th column of $B$. In coordinates, the entry in row $i$ and column $j$ is the $i$th row of $A$ times the $j$th column of $B$.
The columns of a matrix are the images of the vectors $\mathbf e_1$ and $\mathbf e_2$. By the definition of the product $(AB)\mathbf e_j = A(B\mathbf e_j)$, and $B\mathbf e_j$ is the $j$th column of $B$. It remains to multiply $A$ by this column by the “row times column” rule.
The example shows the main oddity of matrix arithmetic: $AB$ and $BA$ can differ. Putting on socks and then shoes isn’t the same as shoes and then socks. On the other hand, brackets can be placed any way you like.
For any matrices $A$, $B$, $C$ of the same size, $(AB)C = A(BC)$.
Both sides are matrices of the same transformation. For any vector $\mathbf v$, by the definition of the product, $\bigl((AB)C\bigr)\mathbf v = (AB)(C\mathbf v) = A\bigl(B(C\mathbf v)\bigr)$ and $\bigl(A(BC)\bigr)\mathbf v = A\bigl((BC)\mathbf v\bigr) = A\bigl(B(C\mathbf v)\bigr)$: in both cases $C$ acts first, then $B$, then $A$. The transformations agree on all vectors, so their matrices agree too, since the columns of a matrix are the images of $\mathbf e_1$ and $\mathbf e_2$.
$A$ is rotation through $90^\circ$ anticlockwise, $B$ reflection in the $x$-axis. Are $AB$ and $BA$ the same?
$AB$: the reflection leaves $\mathbf e_1$ in place, and the rotation sends it to $\mathbf e_2$; the reflection takes $\mathbf e_2$ to $-\mathbf e_2$, and the rotation takes that to $\mathbf e_1$. We get $AB = \left(\begin{smallmatrix} 0 & 1 \\ 1 & 0 \end{smallmatrix}\right)$, reflection in the line $y = x$. While $BA = \left(\begin{smallmatrix} 0 & -1 \\ -1 & 0 \end{smallmatrix}\right)$ is reflection in the line $y = -x$.
Sometimes the order doesn’t matter. Two rotations about the origin commute: the angles simply add. All matrices of the form $\left(\begin{smallmatrix} p & -q \\ q & p \end{smallmatrix}\right)$ commute too: they multiply like the complex numbers $p + qi$, and multiplication of complex numbers is commutative. So the complex numbers live inside the $2 \times 2$ matrices, as a small corner where the arithmetic is the familiar one.
The area meter
The matrix $A$ turns the unit square with sides $\mathbf e_1$ and $\mathbf e_2$ into the parallelogram on its columns $(a, c)$ and $(b, d)$. We already know how to find its area: chapter 22 proved that it equals $|ad - bc|$, and the number $ad - bc$ itself has a sign: plus if the second column points to the left of the first, minus if to the right. In the chapter on systems the same expression appeared as the determinant of a system, $\Delta$. It’s time to give it its name for good.
The determinant of the matrix $A = \left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)$ is the number $\det A = ad - bc$. It’s also written like this: $\left|\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right|$.
An ordered pair of non-collinear vectors has an orientation: positive if the shortest rotation from the first vector to the second is anticlockwise, as from $\mathbf e_1$ to $\mathbf e_2$, and negative if it’s clockwise. The sign of $\det A$ tells whether $A$ preserves the orientation of the pair $(\mathbf e_1, \mathbf e_2)$. If $\det A < 0$, the transformation turns the plane inside out, like a mirror: a right glove becomes a left one.
The square is only the beginning. Why does the area of any figure change by the same factor? Because any figure can be assembled from small squares, and the transformation changes all the squares in the same way.
A linear transformation with matrix $A$ takes any figure of area $S$ to a figure of area $|\det A| \cdot S$.
The trick is that the transformation changes all the little squares of a grid in the same way: each turns into a copy of the same parallelogram.
A triangle of area $6$ undergoes the transformation with matrix $\left(\begin{smallmatrix} 4 & 1 \\ 2 & 3 \end{smallmatrix}\right)$. What’s the area of the image?
$\det A = 4 \cdot 3 - 1 \cdot 2 = 10$, so the area is multiplied by $10$ and becomes $60$. The image of the triangle is a triangle again: segments go to segments.
The last experiment in the widget is more than an observation. The determinant depends continuously on the columns, and to go from positive to negative it has to pass through zero. So no smooth movement of the levers will turn the boat into its mirror image without squashing it on the way. In the same way, a glove can’t be turned into one for the other hand by rotating it on a table top.
Now chains. If $B$ multiplies areas by $|\det B|$ and then $A$ by $|\det A|$, the whole chain multiplies them by the product. The same with orientation: two mirrors in a row restore it. All this fits into one equation.
For any $2 \times 2$ matrices $A$ and $B$: $\det(AB) = \det A \cdot \det B$.
The trick is to measure the area of a parallelogram in cells of the skewed grid: in it the columns of $AB$ stand where the columns of $B$ stood in the square grid.
How are $\det(2A)$ and $\det A$ related for a $2 \times 2$ matrix $A$?
The matrix $2A$ is $A$ followed by scaling by a factor of $2$, and the scaling quadruples areas: $\det(2A) = \det(2I)\det A = 4\det A$. Straight from the formula: $(2a)(2d) - (2b)(2c) = 4(ad - bc)$. In space, scaling multiplies volumes by $8$, and for $3 \times 3$ matrices $\det(2A) = 8\det A$.
A special case is a zero determinant. Then the columns lie on one line, the image of the square is squashed into a segment, and the whole plane into a line (or, for the zero matrix, into a point).
A square matrix with zero determinant is called singular. Its transformation squashes the plane into a line or a point and sends some non-zero vector to zero: if $ad - bc = 0$, then $A\,(d, -c) = (ad - bc, cd - dc) = \mathbf 0$ and $A\,(-b, a) = (-ab + ba, -cb + da) = \mathbf 0$, and at least one of these vectors is non-zero unless $A$ is the zero matrix.
One more operation will be needed in the coming chapters. If the rows and columns of a matrix swap roles, we get the transpose $A^{\mathsf T}$: $\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)^{\mathsf T} = \left(\begin{smallmatrix} a & c \\ b & d \end{smallmatrix}\right)$. A column vector becomes a row after transposing, and the dot product can be written as a product of matrices: $\mathbf x^{\mathsf T}\mathbf y = x_1y_1 + x_2y_2$. In the university chapters it’s written $\langle \mathbf x, \mathbf y\rangle$.
For any $2 \times 2$ matrix $A$, $\det A^{\mathsf T} = \det A$.
The matrix $A^{\mathsf T} = \left(\begin{smallmatrix} a & c \\ b & d \end{smallmatrix}\right)$ has determinant $ad - cb$, and that’s the same number as $ad - bc$. Geometrically: the parallelogram on the rows of a matrix has the same signed area as the parallelogram on its columns. For $3 \times 3$ matrices we’ll check the same equation in the section on space; it holds for matrices of any size, because in the general formula for the determinant rows and columns play equal roles.
Reverse gear
Can every transformation be undone? A rotation through $30^\circ$ is undone by a rotation through $-30^\circ$, a threefold stretch by a threefold squeeze, a shear to the right by a shear to the left. But projection onto the $x$-axis can’t be undone: the points $(2, 5)$ and $(2, -1)$ both land on $(2, 0)$, and from the image there’s no telling where the point came from.
A matrix $A^{-1}$ is called the inverse of a square matrix $A$ if $A^{-1}A = AA^{-1} = I$: doing $A$ and then $A^{-1}$ is the same as doing nothing, and vice versa. A matrix that has an inverse is called invertible.
The matrix $A = \left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)$ is invertible if and only if $\det A \ne 0$, and then
$$A^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}.$$
The idea: swap the diagonal entries and change the sign of the others, and you get a matrix that almost undoes $A$, erring only by the factor $\det A$.
Write $A^{*} = \left(\begin{smallmatrix} d & -b \\ -c & a \end{smallmatrix}\right)$ and multiply by the “row times column” rule: $AA^{*} = \left(\begin{smallmatrix} ad - bc & -ab + ba \\ cd - dc & -cb + da \end{smallmatrix}\right) = (ad - bc)\,I$, and in exactly the same way $A^{*}A = \left(\begin{smallmatrix} da - bc & db - bd \\ -ca + ac & -cb + ad \end{smallmatrix}\right) = (ad - bc)\,I$. If $\det A \ne 0$, divide by it: the matrix $\frac{1}{\det A}A^{*}$ satisfies both equations of the definition, that is, it’s the inverse of $A$.
If $\det A = 0$, then, as we’ve seen, $A\mathbf w = \mathbf 0$ for some $\mathbf w \ne \mathbf 0$. If $A$ had an inverse, we’d get $\mathbf w = I\mathbf w = A^{-1}(A\mathbf w) = A^{-1}\mathbf 0 = \mathbf 0$, a contradiction. This also shows that for $\det A \ne 0$ the transformation is one-to-one: $A\mathbf u = A\mathbf v$ implies $\mathbf u = A^{-1}A\mathbf u = A^{-1}A\mathbf v = \mathbf v$. We used this fact in the proof about area.
The inverse matrix solves systems of equations. The system $3x + y = 7$, $x + 2y = 4$ is a single vector equation $A\mathbf x = \mathbf b$ with $A = \left(\begin{smallmatrix} 3 & 1 \\ 1 & 2 \end{smallmatrix}\right)$ and $\mathbf b = (7, 4)$. We’re looking for the vector that $A$ sends to $\mathbf b$. Multiply both sides on the left by $A^{-1}$: $\mathbf x = A^{-1}\mathbf b = \frac15\,(2 \cdot 7 - 4, -7 + 3 \cdot 4) = (2, 1)$. Check: $3 \cdot 2 + 1 = 7$, $2 + 2 \cdot 1 = 4$. If $A^{-1}\mathbf b$ is written out in letters, we get exactly Cramer’s rule from chapter 11, and the condition $\Delta \ne 0$ from there now reads: the transformation doesn’t squash the plane.
Solve the system $2x + y = 5$, $3x + 2y = 8$ using the inverse matrix. Write the answer as a point $(x, y)$.
$A = \left(\begin{smallmatrix} 2 & 1 \\ 3 & 2 \end{smallmatrix}\right)$, $\det A = 4 - 3 = 1$, so $A^{-1} = \left(\begin{smallmatrix} 2 & -1 \\ -3 & 2 \end{smallmatrix}\right)$, a matrix of integers. Then $\mathbf x = A^{-1}\,(5, 8) = (10 - 8, -15 + 16) = (2, 1)$. Check: $4 + 1 = 5$, $6 + 2 = 8$.
How do you undo a chain? In the morning you put on socks, then shoes. In the evening you take them off in the reverse order: first shoes, then socks. It’s the same with matrices.
If the matrices $A$ and $B$ are invertible, then the product $AB$ is invertible too, and $(AB)^{-1} = B^{-1}A^{-1}$.
The trick is to walk the conveyor backwards: the operation done last is undone first.
You can get your hand in with matrix calculations, multiplying by a vector, products, determinants and inverses, in the trainer. And the solver will take any matrix of your own apart step by step.
The third dimension
In space everything works the same way, only there are three levers. A linear transformation of space is determined by the images of the vectors $\mathbf e_1 = (1, 0, 0)$, $\mathbf e_2 = (0, 1, 0)$, $\mathbf e_3 = (0, 0, 1)$; the proof of the two-levers theorem goes through word for word with three. The matrix is a $3 \times 3$ table of three columns $A\mathbf e_1$, $A\mathbf e_2$, $A\mathbf e_3$, multiplication by a vector is the same combination of columns, the product the same composition. The cube with sides $\mathbf e_1$, $\mathbf e_2$, $\mathbf e_3$ turns into a parallelepiped on the three columns.
Rotation through the angle $\varphi$ about the $z$-axis leaves $\mathbf e_3$ in place and rotates the $xy$-plane, so its matrix is the matrix of a plane rotation framed by zeros and a one: $\left(\begin{smallmatrix} \cos\varphi & -\sin\varphi & 0 \\ \sin\varphi & \cos\varphi & 0 \\ 0 & 0 & 1 \end{smallmatrix}\right)$. Projection onto the $xy$-plane sends $\mathbf e_3$ to zero: $\left(\begin{smallmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{smallmatrix}\right)$.
The role of area is played by volume. The parallelepiped on the vectors $\mathbf a$, $\mathbf b$, $\mathbf c$ has volume “base area times height”, and the cross product from chapter 22 lets us compute it from coordinates.
The volume of the parallelepiped on the vectors $\mathbf a$, $\mathbf b$, $\mathbf c$ equals $|\det A|$, where $A$ is the matrix with columns $\mathbf a$, $\mathbf b$, $\mathbf c$, and the $3 \times 3$ determinant is computed by the rule of Sarrus:
$$\det A = a_1b_2c_3 + b_1c_2a_3 + c_1a_2b_3 - c_1b_2a_3 - a_1c_2b_3 - b_1a_2c_3.$$
The sign of $\det A$ is positive if the triple $\mathbf a$, $\mathbf b$, $\mathbf c$ is right-handed, like $\mathbf e_1$, $\mathbf e_2$, $\mathbf e_3$, and negative if it’s left-handed.
The trick is that the cross product $\mathbf a \times \mathbf b$ gives both the area of the base (by its length) and the direction of the height.
All the theorems about area carry over to volume word for word, only with little cubes instead of little squares: a transformation of space multiplies volumes by $|\det A|$, and $\det(AB) = \det A \cdot \det B$. And the equation $\det A^{\mathsf T} = \det A$ for $3 \times 3$ can be seen from the rule of Sarrus: transposing swaps the roles of rows and columns and takes each of the six products to a product from the same list with the same sign.
Where next
Solving the system $A\mathbf x = \mathbf b$ means finding the vector that the transformation $A$ sends to $\mathbf b$, that is, undoing the transformation. For two unknowns the formula for the inverse matrix was enough. But in January 1801 the astronomer Giuseppe Piazzi found a new heavenly body, Ceres, followed it for a few weeks and lost it in the glare of the Sun. To compute its orbit from a handful of observations, the twenty-four-year-old Gauss solved systems with many unknowns. Formulas with determinants are hopeless here: a $20 \times 20$ determinant, written out on the pattern of the rule of Sarrus, consists of $20! \approx 2.4 \cdot 10^{18}$ products, and a computer doing a billion multiplications a second would take more than seventy years to compute them. How to undo a transformation in a few thousand operations is the subject of chapter 36.