Lecture 5: The Determinant and Its Properties
These notes are interactive: click a section title to open it, click any dotted term to unfold its exact definition or statement in place, click ▸ Proof to expand a proof, and try the exercises — answers are checked instantly.
5.1 The determinant, found by elimination
Lecture 4 ended with a question. Deciding whether a square matrix is invertible costs a full elimination; is there a single number, computed straight from the entries, that answers the question? For matrices the answer was already hiding in the inverse formula: the quantity . In this section we watch that number appear when elimination is run on a general matrix, and we record how it reacts to row operations. Those reactions are what the rest of the lecture builds on.
Let . Recall from the invertibility theorem that is invertible exactly when an echelon form of has two pivots.
Case . One replacement clears the first column: The first pivot is ; there is a second pivot exactly when . Notice that the product of the two diagonal entries is .
Case . If also the first column is zero and is not invertible; then too. If , swap the rows: which has two pivots exactly when , that is, when , and because . The product of the diagonal entries is now , the negative of : the swap flipped the sign.
In every case, is invertible if and only if .
The determinant of is the number
A matrix is invertible if and only if .
This is the conclusion of the elimination example, which covered every case.
□Let be .
- Swapping the two rows changes the sign of the determinant.
- Multiplying one row by a scalar multiplies the determinant by .
- Adding a multiple of one row to the other leaves the determinant unchanged.
- .
Each is a one-line computation. (1) . (2) , and similarly for the second row. (3) , and similarly when a multiple of the second row is added to the first. (4) .
□The proposition explains the example. Elimination uses replacements, which do not change the determinant, and swaps, which only change its sign; when it stops, the matrix is triangular and its determinant is the product of its diagonal entries. So with the sign recording the number of swaps. That sentence is the blueprint for every size: we will define for matrices, prove that it obeys the same four rules, and then compute it by elimination.
What is ?
.
A matrix has . Let be obtained from by swapping its rows and then multiplying the new first row by . What is ?
The swap gives ; scaling a row by multiplies by .
5.2 The determinant and its row properties
For larger matrices we need a formula that reduces to when and obeys the same rules under row operations. The cleanest definition is recursive: an determinant is a signed combination of determinants, one for each entry of the first row. The definition is easy to state and easy to use on small matrices; the work is in proving that it really obeys the rules. Once that is done, we will almost never expand by the definition again.
The determinant is defined, and its properties are proved, by mathematical induction, a method we will use several more times. Suppose that for each integer we have a statement , for example ``the determinant of every matrix is linear in each row''. To prove for all it suffices to prove two things:
- Base case: is true.
- Inductive step: for every , if is true, then is true.
A recursive definition works the same way: we say what the object is for , and, for each , how to build it for size out of objects of size , which are already defined. The determinant below is defined in exactly this way, and the theorem on its basic properties that follows is proved by induction on .
Let be an matrix with . For , the minor is the matrix obtained from by deleting row and column .
The determinant of an matrix is defined recursively. For , . For , This is called the expansion along the first row. Each minor is smaller than , so the recursion ends at matrices. We also write for .
For the minors are and , so the definition gives , agreeing with the determinant.
For ,
Expanding of size along its first row, and then each minor, There are six terms. Each is a product of three entries, one from each row and one from each column, and there is one term for each of the ways to choose the columns. In the same way an determinant, fully expanded, has terms: for , and about for . Full expansion is a definition, not a method of computation.
For every the determinant of matrices has the following properties. Write for the determinant of the matrix whose rows are .
- Linear in each row. For every , all rows and , and all scalars ,
- Alternating. If , swapping two rows changes the sign of the determinant.
- Normalized. .
All three are proved by induction on .
(3) . For , the first row of is and the minor in position is , so the expansion gives , using the inductive hypothesis .
(1) For this is . Let and assume part (1) for matrices. If , the minors do not involve row , so each is a fixed number, and each term is linear in the entry . Hence the sum is linear in row , since a linear combination of linear functions is linear. If , the entries do not change, and row of appears (with one entry deleted) as row of each minor . By the inductive hypothesis each is linear in that row, and the combination , with fixed coefficients, is again linear.
(2) For this is part (1) of the proposition. Let , assume part (2) for matrices, and let be with rows swapped. There are three cases.
Both rows below the first (). Row is unchanged, and each minor is with two rows swapped. By the inductive hypothesis for every , so .
Rows and . The idea is to expand twice, first along row and then along row , and to collect the resulting terms according to the two columns that rows and use. For two columns let be the matrix obtained from by deleting rows and columns ; it is built from rows of only.
Step 1: expand along row . By definition, .
Step 2: expand each minor along its first row. The first row of is row of with the entry removed; its entries are the with . Because column has been deleted, sits in column of if , and in column if . Deleting from its first row and the column that contains amounts to deleting rows and columns from , so the minor that goes with is if and if . Hence
Step 3: substitute. Putting step 2 into step 1 gives one term for each ordered pair of different columns: column supplies the entry from row and column the entry from row . Multiplying the two signs, the term is
Step 4: group the terms in pairs. Fix two columns . Exactly two of the terms use these two columns: , which is , and , which is . They share the factor and have opposite signs, so together they contribute Every term of step 3 lies in exactly one such pair, so a signed sum, over all pairs of columns, of a determinant from rows times an determinant from the remaining rows. For example, when each is the single entry of row in the third column, and the formula reads multiplying out gives the six terms of the general determinant.
Step 5: compare with . Swapping rows and does not touch rows , so has the same matrices . But each block of is the corresponding block of with its two rows swapped, so its determinant has the opposite sign, by the proposition. Applying the formula of step 4 to , every term changes sign, and .
Rows and . Swapping rows and , then rows and , then rows and again, carries the rows in positions to , which is the swap of rows and . Each of the three swaps is covered by the previous two cases and changes the sign, so the total effect is .
□Let be .
- If has two equal rows, then .
- If has a zero row, then .
- Scaling: multiplying a row of by multiplies by .
- Replacement: adding times row to row () does not change .
- Swap: exchanging two rows multiplies by .
(1) Swapping the two equal rows does not change , but by the alternating property it changes the sign of ; so and . (2) and (3) are linearity in that row with the row written as , respectively . (4) By linearity in row , the new determinant is , where is with row replaced by row ; has two equal rows, so by (1). (5) is the alternating property.
□The cofactor of an matrix is the number The signs form a checkerboard, with in position . In this notation the definition of the determinant reads .
For every matrix with and every row index , This is the expansion along row .
Move row to the top by swapping it with row , then with row , and so on: swaps, which keep the other rows in their original order. By the alternating property the new matrix has . Its first row is row of , and deleting its first row and column gives exactly . Expanding along its first row, so
□The expansion along a row explains a formula familiar from calculus and physics. For the cross product is the vector and the dot product of is the number , the row–column product of with .
Now let be the matrix with rows , , , and expand along row . The cofactors of that row are computed from rows and alone: These are exactly the three entries of : the cross product is the vector of cofactors of the third row. So the expansion along row reads for every . The mnemonic from calculus, a “determinant” with in its first row and , below, is the same bookkeeping: expanding it formally along the first row produces the same three determinants with the same signs, as the coefficients of . (It is not a determinant in our sense, since its first row holds vectors, not numbers.)
The familiar properties of the cross product are now properties of the determinant.
- Perpendicular to both factors. Taking gives a matrix with two equal rows, so by the corollary on row operations; likewise .
- Antisymmetric. Swapping rows and changes the sign of the determinant for every , so . Taking compares the entries, so ; in particular .
- Volume. By the transpose theorem and the volume theorem, both proved later in this lecture, the triple product is, up to sign, the volume of the parallelepiped spanned by :
- Length. Write for the length of , and suppose . Taking in (3), the volume is . That parallelepiped has as base the parallelogram spanned by and , and, by (1), height ; so its volume is also the area of that parallelogram times . Dividing, is the area of the parallelogram spanned by and .
Expand along the first row:
.
A matrix has row equal to twice row . What is its determinant?
By linearity in row , the determinant is times that of a matrix with two equal rows.
5.3 Computing determinants by elimination
The row properties turn Gaussian elimination into a determinant calculator. Elimination needs only replacements and swaps to reach an echelon form; replacements leave the determinant alone and swaps flip its sign. A square echelon form is triangular, and the determinant of a triangular matrix is simply the product of its diagonal. So the determinant costs no more than one elimination, and along the way we get, for every , the invertibility test that gave us for .
If is upper triangular (all entries below the diagonal are zero) or lower triangular (all entries above the diagonal are zero), then
By induction on ; the case is clear. Let .
Lower triangular. The first row is , so the expansion along it has the single term , and is lower triangular with diagonal . By the inductive hypothesis .
Upper triangular. The last row is , so the expansion along row has the single term , and is upper triangular with diagonal . By the inductive hypothesis .
□Let be , and reduce to an echelon form using only row replacements and row swaps. Then is upper triangular and Moreover, is invertible if and only if .
Such a reduction always exists: Gaussian elimination chooses a pivot by a swap and clears below it by replacements, and never needs to scale. Each replacement leaves the determinant unchanged and each swap multiplies it by , so . A square matrix in echelon form is upper triangular, since the leading entry of row lies in column or further right; so the triangular lemma gives the formula.
If has pivots, they sit exactly on the diagonal, so every and . If has fewer than pivots, its last row is zero, so and . By the invertibility theorem, pivots is the same as invertibility.
□Let . The entry is , so begin with a swap, starting from : Two swaps, so , and . In particular is invertible. Expanding along the first row would have required four determinants.
For , the replacements , give rows and , and then produces a zero row. So and is not invertible: the rows are dependent, since .
In applications one often needs the numbers for which fails to be invertible. By the theorem, these are the roots of the polynomial .
For , the formula gives With letters in the matrix, elimination must avoid dividing by an expression that could be zero. Here the entry in the second row avoids it: the replacement , which does not change the determinant, clears the first entry of row : the same polynomial. So is singular exactly for and .
For , expansion along the first row is quickest, because of the zero: which vanishes for and .
What is the determinant of ?
Upper triangular: multiply the diagonal entries.
Let . The polynomial has two roots. What is the larger one?
.
5.4 Products, inverses, and transposes
Lecture 4 showed that row operations are multiplications by elementary matrices, and that every invertible matrix is a product of them. We now know exactly how each elementary operation changes the determinant. Put the two facts together and the determinant turns out to respect products: . Everything else in this section, including expansion along any column, follows from that rule. From then on columns are as useful as rows, and column operations evaluate the Vandermonde determinant in a few lines.
Let be an elementary matrix. Then if swaps two rows, if multiplies a row by , and if adds a multiple of one row to another. Moreover, for every matrix ,
is after one row operation, and , so the three values follow from the corollary on row operations. By the lemma of Lecture 4, is after the same row operation, so by the same corollary is , , or respectively, which is in each case.
□For matrices and ,
not invertible. Then is not invertible either: if had an inverse , then , and by the one-sided inverse remark would be invertible. So both sides are , by the elimination theorem.
invertible. By Lecture 4, with each elementary. Applying the lemma times, The same computation with gives , and substituting proves the rule.
□For and we have and , and has determinant . The determinant does not respect sums: has determinant , not . Nor does it respect scalars in the naive way: scaling all rows by gives .
If is invertible, then For every square and every , .
. The statement about powers is the product rule applied times, with .
□For every matrix , .
If is not invertible, neither is (if were invertible, so would be , by the arithmetic of inverses), and both determinants are . If is invertible, write ; then by the transpose rule for products. For an elementary , : a swap matrix and a scaling matrix equal their own transposes, and the transpose of a replacement matrix (a single off-diagonal entry ) is again a replacement matrix, with determinant . So by the product rule .
□Since the columns of are the rows of , the transpose theorem turns every statement about rows into one about columns: the determinant is linear in each column, changes sign when two columns are swapped, is unchanged when a multiple of one column is added to another, and is when the columns are dependent.
For every matrix with and every column index , This is the expansion along column ; together with the expansion along any row, a determinant may be expanded along whichever row or column is most convenient.
Column of is row of , and the minor of in position is the transpose of , so its determinant is by the transpose theorem. Expanding along row of and using the transpose theorem once more, .
□Let . Every row has at least two nonzero entries, but column has only one, the entry in position , with sign . Expanding along column , In the matrix, column has the single nonzero entry , in position with sign , so expanding along it, . Expanding along any row would have required at least two determinants.
Column operations are the natural tool for determinants whose entries are powers. For real numbers , let . We make the first row : subtract times column from column , and then times column from column . By the column properties neither step changes the determinant. (The order matters: column is changed first, while column still holds .) Since and , Now the factors are in plain sight. Expanding along the first row leaves a determinant whose first row has the factor and whose second row has the factor ; taking them out by linearity in each row, Hence is invertible exactly when , , are distinct. (This is why a parabola through three points with distinct -values always exists and is unique.)
The general Vandermonde matrix. For real numbers , the Vandermonde matrix has row equal to : Its determinant is the product of all differences with the larger index first: For , with , this is the formula just found. In particular is invertible exactly when are distinct.
The same column operations prove the formula for every , by induction on . For the determinant is . Let and assume the formula for size . For , in this order, subtract times column from column . Each step is a column replacement, which does not change the determinant, and when column is changed, column still holds its original entries . So for the entry becomes , and the first row becomes : Expanding along the first row leaves the matrix whose rows are for . Taking the factor out of each row leaves exactly , so By the inductive hypothesis the last determinant is the product of all with ; together with the factors in front, this is the product over all .
Let and be matrices with and . What is ?
for a matrix , and .
An invertible matrix satisfies and . What is ?
and give .
5.5 Determinants and volume
The determinant has a geometric meaning, and it is the reason the determinant appears in multivariable calculus. The columns of a matrix span a parallelogram; the columns of a matrix span a slanted box. Their area and volume are . The reason is that area and volume obey the same rules as the determinant: sliding one edge along another does not change the size, stretching an edge by multiplies it by , and the unit square or cube has size .
The parallelogram spanned by and the parallelepiped spanned by are the sets If the spanning vectors are dependent, the set is flat (it lies in a line, or in a plane), and its area, respectively volume, is .
Let be and be . Then
We use four facts about area and volume from geometry: (V1) the unit square and the unit cube have size ; (V2) multiplying one spanning vector by multiplies the size by ; (V3) replacing one spanning vector by () does not change the size, because the set slides parallel to the face spanned by the other vectors and keeps its base and height (see the figure); (V4) the order of the spanning vectors does not matter.
The number of the matrix of spanning vectors obeys the same four rules, by the column properties: , scaling a column by multiplies by , adding a multiple of one column to another does not change it, and a swap changes only the sign.
If the columns are dependent, the set is flat and , so both sides are . Otherwise the matrix is invertible, and its transpose can be row reduced to the identity; transposing, the matrix itself can be reduced to the identity by column operations of the three kinds. Each column operation changes the size and by the same factor, and at the end both equal . Therefore they were equal at the start.
□The parallelogram spanned by and has area . The parallelepiped spanned by , , has volume
Let with of size , or , and let be the parallelogram () or parallelepiped () spanned by . Then the image is the parallelogram (respectively parallelepiped) spanned by , and
By linearity, , so carries onto the set spanned by the vectors . With , those vectors are the columns of , so by the volume theorem and the product rule .
□The same factor works for regions of any shape. Let with of size , or , and let be any region that has an area (for ) or a volume (for ). Then has one too, and
We use the idea from calculus of measuring a region by filling it with small squares (or cubes). Recall how area is computed there: cover the plane by a grid of squares of side , add up the areas of the squares that fill the region — a sum of many easy pieces — and then let tend to . The sums approach a single number, and that number is the area of the region. (This is the same limit of sums that defines the integral: the region under a graph is filled by thin rectangles, their areas are added, and the widths are sent to .) To be precise we add up in two ways, over the squares lying inside the region and over all squares meeting it; the first total is at most the area and the second at least it, and as both tend to the same limit, the area. We take that fact from calculus and use it here for both and its image .
The point of the proof is that the grid does the work. A square of the grid is a translate of the square spanned by and , so its image under the linear map is a translate of the parallelogram spanned by and , the columns of . Moving a set does not change its area, so by the previous theorem the same factor for every square of the grid, however small is. Hence each term of the sum for is times the corresponding term of the sum for ; adding up and letting gives . The case is the same with cubes of side , each carried to a parallelepiped of volume .
□For example sends the unit disk, of area , to an ellipse of area . (In multivariable calculus this factor reappears for non-linear maps as well: near each point a differentiable map looks like a linear one, and the determinant of that linear part — the Jacobian determinant — is the local scaling factor in the change-of-variables formula.) A map with flattens space and cannot be undone, in agreement with the invertibility test. The sign of also has a meaning: it is positive when preserves orientation (counterclockwise stays counterclockwise), as for a rotation, where , and negative when reverses it, as for a reflection.
What is the area of the parallelogram spanned by and ?
.
A linear map has matrix with determinant . A region has area . What is the area of ?
Areas are multiplied by .
5.6 Cramer's rule and the adjugate
Because the determinant is linear in each column, it can solve linear systems: when is invertible, each unknown of is a ratio of two determinants. The same idea gives an explicit formula for , built from cofactors, which generalizes the formula of Lecture 4. Neither formula is a good way to compute with large matrices, since elimination is far cheaper, but both are exact formulas, and exact formulas are what one needs to reason about how the solution depends on the entries.
Let be an invertible matrix and . For each , let be the matrix obtained from by replacing column with . Then the unique solution of is given by
Let be the solution, and let be with column replaced by . The columns of are for and in position , so . Row of has the single nonzero entry , in column , and the corresponding minor is ; expanding along row gives . By the product rule, , and .
□The adjugate (or the adjoint) of an matrix is the matrix whose entry is the cofactor : the transpose of the matrix of cofactors. Note the order of the indices.
For every matrix (), Consequently, if , then .
The entry of is . If , this is the expansion of along row . If , let be with row replaced by a copy of row . The cofactors along row do not involve row , so has the same cofactors as , and its row is . Expanding along row gives , because has two equal rows. So .
For , apply this to . The cofactor of is , so , and . Transposing both sides gives . If , dividing by exhibits a two-sided inverse.
□For the cofactors are , , , . So and the theorem gives , which is the formula of Lecture 4, now with a proof of where it comes from.
Take the matrix of the inversion example in Lecture 4 and solve First, . Replacing one column at a time by , so Cramer's rule gives . Check: .
The nine cofactors of are , , , , , , , , , so the same inverse that elimination produced in Lecture 4. (Here is symmetric, so equals the cofactor matrix; in general the transpose matters.)
Use Cramer's rule on the system , . What is ?
and .
Let . What is the entry of the adjugate ?
The entry of is the cofactor .
The invertibility theorem of Lecture 4 gains a sixth condition: is invertible if and only if . And the example with points to the next topic. A nonzero vector with exists exactly when has a nonzero solution, that is, exactly when . Such numbers are the eigenvalues of , and the determinant is how we will find them.
Index of statements
- Example 5.1 (Eliminating a general matrix)
- Definition 5.2 (Determinant of a matrix)
- Theorem 5.3 (The determinant detects invertibility)
- Proposition 5.4 (Row operations and the determinant)
- Remark 5.5 (What the properties buy)
- Remark 5.6 (Mathematical induction)
- Definition 5.7 (Minor)
- Definition 5.8 (Determinant)
- Example 5.9 (Small cases)
- Example 5.10 (The general determinant)
- Theorem 5.11 (The three basic properties)
- Corollary 5.12 (All row operations)
- Definition 5.13 (Cofactor)
- Theorem 5.14 (Cofactor expansion along any row)
- Remark 5.15 (The cross product in )
- Lemma 5.16 (Triangular matrices)
- Theorem 5.17 (Determinant by elimination)
- Example 5.18 (A determinant with two swaps)
- Example 5.19 (Dependent rows)
- Example 5.20 (The matrix )
- Lemma 5.21 (Determinants of elementary matrices)
- Theorem 5.22 (The product rule)
- Example 5.23 (The product rule, and what is not true)
- Corollary 5.24 (Inverses and powers)
- Theorem 5.25 (The transpose)
- Remark 5.26 (Columns behave like rows)
- Theorem 5.27 (Cofactor expansion along any column)
- Example 5.28 (Choosing a good column)
- Example 5.29 (The Vandermonde determinant)
- Definition 5.30 (Parallelogram and parallelepiped)
- Theorem 5.31 (Area and volume)
- Example 5.32 (An area and a volume)
- Theorem 5.33 (How a linear map changes volume)
- Theorem 5.34 (The scaling factor for an arbitrary region)
- Remark 5.35 (Scaling factor and orientation)
- Theorem 5.36 (Cramer's rule)
- Definition 5.37 (Adjugate)
- Theorem 5.38 (The adjugate formula)
- Example 5.39 (Revisiting the inverse)
- Example 5.40 (Cramer's rule and the adjugate for a system)
- Remark 5.41 (Looking ahead)