Determinants and volume

6 min read

Two vectors in the plane mark out a parallelogram. Three vectors in 3D mark out a slanted box. The determinant of the matrix whose columns are those vectors is a single number that gives the area or volume of that shape.

This chapter is about computing that number, what its sign means, and what happens when it is zero. Later chapters will use the determinant as the standard way to measure a lattice.

By the end of this chapter, you should know how to compute the determinant of a 2x2 matrix by hand, what detB|\det B| measures geometrically, and why a zero determinant means the columns of BB are linearly dependent.

A parallelogram from two vectors

Take two vectors:

b1=(2,1)b2=(1,3)b_1 = (2, 1)\\ b_2 = (1, 3)

These two vectors, together with the origin, mark out a parallelogram. The four corners are:

(0,0),b1=(2,1),b2=(1,3),b1+b2=(3,4)(0, 0),\quad b_1 = (2, 1),\quad b_2 = (1, 3),\quad b_1 + b_2 = (3, 4)
b₁b₂
b_1 and b_2 are two sides of a parallelogram. The other two sides are parallel copies, meeting at b_1 + b_2 = (3, 4).

How large is that parallelogram? Well, the determinant is how we compute it.

The 2x2 determinant

Put b1b_1 and b2b_2 as the columns of a matrix:

B=[2113]B = \begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}

For any 2x2 matrix:

B=[abcd]B = \begin{bmatrix} a & b \\ c & d \end{bmatrix}

the determinant is defined as:

detB=adbc\det B = ad - bc

For our example:

detB=2311=5\det B = 2 \cdot 3 - 1 \cdot 1 = 5

The number 55 is the signed area of the parallelogram with sides b1b_1 and b2b_2. We will see what "signed" means in a moment. For now, the unsigned area is detB=5|\det B| = 5.

Why this formula gives the area

You do not need to derive the formula to use it, but it is worth seeing why it works in one case. If the two vectors are b1=(a,0)b_1 = (a, 0) along the horizontal axis and b2=(0,d)b_2 = (0, d) along the vertical axis, the parallelogram is a rectangle with sides aa and dd. Its area is adad. The formula gives:

det[a00d]=ad00=ad\det \begin{bmatrix} a & 0 \\ 0 & d \end{bmatrix} = ad - 0 \cdot 0 = ad

When the vectors tilt away from the axes, the bcbc term corrects for the shear. The result is still the area of the parallelogram they span.

Sign and orientation

The determinant can be negative. For:

B=[1331]B = \begin{bmatrix} 1 & 3 \\ 3 & 1 \end{bmatrix}

the determinant is 1133=81 \cdot 1 - 3 \cdot 3 = -8. The parallelogram still has area 88. The negative sign records the order of the two vectors: b1,b2b_1, b_2 in one rotational order gives a positive determinant, and the opposite order gives a negative determinant.

This sign is called the orientation. For measuring how much space the columns enclose, the orientation does not matter, and we take the absolute value detB|\det B|. The sign matters only when the order of the columns carries meaning.

Three vectors and a parallelepiped

The same idea works in 3D. Three vectors in 3D mark out a slanted box called a parallelepiped. The determinant of the 3x3 matrix whose columns are those vectors gives the signed volume of that box. The formula is longer, but the meaning is the same:

detB=volume of the parallelepiped spanned by the columns of B|\det B| = \text{volume of the parallelepiped spanned by the columns of } B

The same pattern continues in higher dimensions: for an n×nn \times n matrix BB, the determinant gives the signed nn-dimensional volume of the shape spanned by its columns. We will rarely compute determinants by hand beyond 2x2, but the geometric meaning is the exact same.

When the determinant is zero

In chapter 4 we said that columns of a matrix are linearly dependent when one column can be written as a linear combination of the others. Geometrically, that means the parallelogram (or parallelepiped) flattens onto a line or plane, and its volume is zero.

The determinant detects this exactly:

detB=0    the columns of B are linearly dependent\det B = 0 \iff \text{the columns of } B \text{ are linearly dependent}

Read the symbol     \iff as "if and only if": each side implies the other.

For example:

B=[1224]B = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}

The columns are (1,2)(1, 2) and (2,4)(2, 4). The second is twice the first, so they are linearly dependent. The determinant confirms it:

detB=1422=0\det B = 1 \cdot 4 - 2 \cdot 2 = 0

Linear independence and non-zero determinant are the same condition. So, whenever we need to check that a set of vectors really describes a full nn-dimensional shape, computing the determinant is the test.

Different parallelograms, same area

Replace b2b_2 with b2+b1b_2 + b_1 to get a new pair:

b1=(2,1),b2=b2+b1=(3,4)b_1 = (2, 1),\quad b_2' = b_2 + b_1 = (3, 4)

The new matrix is:

B=[2314]B' = \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}

with detB=2431=5\det B' = 2 \cdot 4 - 3 \cdot 1 = 5. Same absolute value as before.

At first this can feel wrong. The new vector b2b_2' is longer than b2b_2 (b2=5\|b_2'\| = 5 versus b2=103.16\|b_2\| = \sqrt{10} \approx 3.16), so the new parallelogram should be bigger but it's not. The reason is that the area of a parallelogram is base times perpendicular height, not the product of the two side lengths.

Take b1b_1 as the base. The endpoint of b2b_2 is (1,3)(1, 3) and the endpoint of b2b_2' is (3,4)(3, 4). Both of these points sit on the same line parallel to b1b_1. Adding b1b_1 to b2b_2 shifted the endpoint along that line, but did not change its perpendicular distance from the base. Same base, same height, same area.

b₁b₂
The new parallelogram with sides b_1 and b_2'. b_1 is unchanged, and the opposite side still lies on the same line parallel to b_1 as before, so the perpendicular height (and therefore the area) is unchanged.

The two pairs of vectors mark out different parallelograms, but the area is the same. More generally, adding a multiple of one column of a matrix to another column never changes detB|\det B|, so many different matrices share the same detB|\det B| value.

What to remember

  • The determinant of a square matrix BB is a single number.
  • For a 2x2 matrix [abcd]\begin{bmatrix} a & b \\ c & d \end{bmatrix}, the determinant is adbcad - bc.
  • detB|\det B| is the volume of the parallelepiped spanned by the columns of BB (area in 2D, volume in 3D, nn-volume in nnD).
  • The sign of detB\det B records the orientation of the columns. For measuring size, we take the absolute value.
  • detB=0\det B = 0 if and only if the columns of BB are linearly dependent.
  • Adding a multiple of one column of BB to another column does not change detB|\det B|.