The determinant is the one number that says by what factor a square matrix scales area or volume, with a sign for flipping. It is zero exactly when the matrix cannot be undone, and four rules pin it down completely.
Taught in 375/376Apostol, not taughtBeyond the courseApostol 3.1 to 3.17Spagnolie, Lectures 14 and 15MATH 375 HW8 and HW9MATH 375 Midterm 2 (2013 practice exam)MATH 375 Practice Final 2013
Chapter 2.6 ended with a long list of conditions that are all equivalent to a square matrix being invertible. This chapter adds one more, and it is the most useful for quick tests: a single number, the determinant, is non-zero exactly when the matrix is invertible. Spagnolie introduced it in Lecture 14 as “a number that tells us something about invertibility”. The same number has a second meaning. It is the factor by which the matrix stretches area (in the plane) or volume (in space), and it is negative when the matrix flips orientation. We start from that picture, then show that a few natural properties of volume pin the determinant down completely, and then get every formula from them.
Quick checkA 3×3 matrix has only 2 pivots after row reduction. Is it invertible?
A square matrix is invertible exactly when it has a pivot in every column, so that the null space is only O. With only 2 pivots there is a free variable, whatever the shape.Review: the invertible matrix theorem
Quick checkWhich row operation can change the solutions of a system of equations?
Multiplying by 0 erases an equation and cannot be undone. The other three each have an opposite operation, so they never change the solutions.Review: row operations
Quick checkFor matrices A and B, which row of AB is built from row i of A?
Entry (i,j) of AB is row i of A dotted with column j of B. So row i of AB uses only row i of A, and uses all of B.Review: matrix multiplication
Where this came from· Determinants came before matrices
Determinants were invented to solve equations, about 175 years before anyone defined a matrix as a single object. Seki Takakazu in Japan wrote down determinants of sizes up to 5 in 1683. Leibniz, in a letter of 1693, tied the solvability of a small linear system to a determinant being zero. Maclaurin’s Treatise of Algebra (1748, printed after his death) gave the rule for solving 2 by 2 and 3 by 3 systems with determinants. In 1750 Gabriel Cramer published the rule for any number of unknowns, and it carries his name. In 1812 Binet and Cauchy each presented a proof of the product rule to the Paris Institute. Cayley’s memoir of 1858 developed the algebra of matrices as objects in their own right. So the number attached to a square array has a longer history than the array.
The picture
Pick “Reflect” below and press “Apply the map”. The orange square is the image of the unit square. Its area is printed in its middle, and it turns red when the map flips the plane over. Then try the other maps in the list.
map
matrix
ad−bc
what happens to area
Shear
[1011]
1
kept, orientation kept
Stretch
[20021]
1
kept: 2 times longer, half as wide
Reflect
[0110]
−1
kept, orientation flipped (square turns red)
Eigen example
[3012]
6
every area multiplied by 6
Squash to a line
[12121]
0
everything flattened to a line, area 0
The number in the third column is the determinant. For the matrix with columns (a,c) and (b,d), it equals ad−bc. It is the signed area of the parallelogram that the columns span: the image of the unit square. “Signed” means the sign records orientation. Going from ^ to ^ is a counterclockwise quarter turn. If the images of ^ and ^ go from the first to the second clockwise instead, the plane has been turned over like a sheet of paper, and the determinant is negative. Dragging the arrow tips in the viewer changes the matrix, and the area label follows ad−bc. When the determinant is 0 the plane is squashed, there is a whole line of inputs sent to O, and the matrix cannot be inverted. That is the link with chapter 2.6.
The idea, in words
Why ad−bc is the area. Take the parallelogram with vertices O, (a,c), (a+b,c+d), (b,d), and suppose a,b,c,d≥0 and ad≥bc so that it sits as in the picture. It fits in a rectangle of width a+b and height c+d. The corners cut off are two triangles of area 21ac (below and above) and two triangles of area 21bd (left and right), and two rectangles of area bc each. So
area=(a+b)(c+d)−ac−bd−2bc=ad−bc.
This is the picture proof for one case. Below we prove ad−bc from rules, which covers every case at once.
Why every region is scaled by the same number. A linear map sends the unit square to the parallelogram of area det. By linearity it sends each little grid square of side h to a parallelogram of area h2det, translated. Any region is close to a union of little grid squares, so its area is multiplied by det too (this is the idea behind the Jacobian in Unit 6).
Worked example
The map with matrix [[2, 1], [1, 3]] is applied to the triangle with vertices (0, 0), (1, 0), (0, 1). Find the area of the image and say whether orientation is kept.
Solution.
Find the area factor.det[2113]=2⋅3−1⋅1=5. The determinant is the factor by which the map multiplies every area.
Find the original area. The triangle has base 1 and height 1, so its area is 21. We need a region whose area we know before the map acts on it.
Multiply. The image has area 5⋅21=25. Every region is scaled by the same number det, as argued above.
Read the sign.5>0, so orientation is kept. A negative determinant would mean the plane was turned over.
Check directly. The vertices go to (0,0), (2,1) (the first column) and (1,3) (the second column). The area of the triangle on O, (2,1), (1,3) is 21∣2⋅3−1⋅1∣=25. A triangle on O, u, v is half of the parallelogram on u and v, so its area is half of ∣det∣ of the two vectors.
Answer. The image has area 25, and orientation is kept.
Your answerThe matrix [3412] is applied to a disk of area π. What is the area of the image (an ellipse)?
Compute ad−bc first. The disk's own shape does not matter, only its area.
det=3⋅2−1⋅4=2, and every area is multiplied by 2, so the image has area 2π.
Which rules does signed area obey? Let d(A1,…,An) be the signed volume of the box whose edges are the rows A1,…,An. (We use rows, as Apostol does. By a theorem below, columns give the same number.) Four facts about volume are plain from the picture. Apostol (3.2) builds the whole theory from them:
Stretch one edge by t, and the volume is multiplied by t.
Volume adds in one edge. If edge Ak is replaced by Ak+C, the box is the box with edge Ak plus the box with edge C. The two boxes sit side by side and share all the other edges (Apostol’s Figure 3.2).
Two equal edges give a flat box, volume 0.
The unit cube has volume 1.
Why· Why these four rules are enough
They are exactly what row operations in chapter 2.6 need. Rule 1 says what scaling a row does. Rule 3 together with rule 2 says what adding a multiple of one row to another does (nothing), and what swapping does (a sign). Since every matrix can be turned into I by row operations, the four rules decide the value for every matrix. The determinant is therefore not a formula to memorise. It is the only function with these four properties, and every formula in this chapter is a consequence.
In JEE you learned rules such as ”R1→R1+3R2 does not change the determinant” and “swapping two rows changes the sign” by rote. They are consequences of rules 1 to 3 and are proved below. In 3D, Spagnolie (Lecture 14) writes detA=A1⋅(A2×A3): the volume of the box spanned by the three rows is the area of the base ∣A2×A3∣ times the height.
Definitions and theorems
The axioms
Where this came from· Where the four axioms come from
For a long time the determinant was defined by a formula, the sum over permutations that appears at the end of this chapter. Weierstrass, in Berlin lectures from the 1860s (printed in his collected works in 1903), defined it by its properties instead: linear in each row, zero when two rows are equal, equal to 1 on the identity. Kronecker took a similar view, and his lectures on determinants were also printed in 1903. Then every formula becomes a consequence of the properties, and the properties become the thing to understand. Apostol follows this route in his chapter 3, starting from the triple product of vectors in space, and so does Spagnolie. It is the same move as in chapter 2.1, where a vector space is defined by its rules rather than by what its elements look like.
Definition A
Determinant function
Let A1,…,An∈Rn be the rows of a matrix A, and write d(A)=d(A1,…,An). A function d is a determinant function if, for all rows and scalars t:
Homogeneous in each row.d(…,tAk,…)=td(…,Ak,…).
Additive in each row.d(…,Ak+C,…)=d(…,Ak,…)+d(…,C,…).
Zero if two rows are equal.d(A1,…,An)=0 whenever Ai=Aj for some i=j.
Normalised.d(e1,…,en)=1, where ek is the k-th row of the identity matrix (a 1 in position k, zeros elsewhere). So d(I)=1.
Axioms 1 and 2 together say d is linear in each row separately (Spagnolie: multilinear). Axiom 3 is called alternating. Apostol also shows that it is enough to ask for axiom 3 only when two adjacent rows are equal (his Axiom 3’); Spagnolie uses any two rows, and so do we.
In one lineA number-valued function d(A1,…,An) of the rows of an n×n matrix that scales in each row, adds in each row, vanishes when two rows are equal, and equals 1 on the identity.
Why it existsThese are the four properties of signed volume. They are enough to determine the function completely.
We do not yet know that such a function exists, nor that there is only one. First we find out what the axioms force. (Existence is proved at the end of the chapter with the permutation formula. Until then, read “if d exists, then”.) The first four consequences use only axioms 1 to 3.
Adding a multiple of one row to a different row leaves F unchanged.
F=0 if the rows are linearly dependent.
In one lineA function with Axioms 1 to 3 is zero if a row is zero, changes sign when two rows are swapped, is unchanged when a multiple of one row is added to another, and is zero when the rows are dependent.
Why it is trueEach statement is a short computation with linearity in a row and the rule that equal rows give zero.
ProofSpagnolie Lecture 14; Apostol 3.3
The idea: Use linearity to pull a scalar or a sum out of one row. Equal rows make a term vanish. For the swap, put the sum of the two rows in both places.
(1) F(…,O,…)=F(…,0⋅O,…)=0⋅F(…,O,…)=0.
Axiom 1 with t=0: the zero row is 0⋅Ak.
(2) Consider rows i and j and put Ai+Aj in both places. Writing only these two rows, F(Ai+Aj,Ai+Aj)=F(Ai,Ai)+F(Ai,Aj)+F(Aj,Ai)+F(Aj,Aj).
Axiom 2 in the i-th and then the j-th row expands the product of sums into four terms.
The left side and the first and last terms on the right are 0. So 0=F(Ai,Aj)+F(Aj,Ai), that is, F(…Ai…Aj…)=−F(…Aj…Ai…).
Axiom 3: the left side has two equal rows, and so do F(Ai,Ai) and F(Aj,Aj).
(4) Some row is a combination of the others: Ai=∑k=ibkAk with bk=−ck/ci.
Dependent means some combination ∑kckAk=O has a non-zero coefficient, say ci=0. Divide by ci and move the other terms across.
F(…,∑k=ibkAk,…)=∑k=ibkF(…,Ak,…), where Ak sits in position i.
Axioms 1 and 2 expand a sum in one row.
Every term is 0, so F=0.
Each remaining term has the row Ak in position i and also in position k, so Axiom 3 applies.
Proof workshopMatch each line of the swap argument to its reason
Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.
F(Ai+Aj,Ai+Aj)=F(Ai,Ai)+F(Ai,Aj)+F(Aj,Ai)+F(Aj,Aj) (only rows i and j written).
The left side, F(Ai,Ai) and F(Aj,Aj) are all 0.
So 0=F(Ai,Aj)+F(Aj,Ai).
So F(Ai,Aj)=−F(Aj,Ai): swapping two rows multiplies F by −1.
In the picture. Open the viewer above on “Reflect”. The “Reflect” preset is the identity matrix with its two columns swapped. Swapping the columns swaps where ^ and ^ land, which flips the orientation: the square turns red and the sign changes. (The same swap done to the rows has the same effect on the determinant, as the lemma says.) Adding a multiple of one edge to the other, Aj+cAi, slides the far end of the parallelogram along a line parallel to the other edge. That is exactly the “Shear” preset, and the area does not change.
Quick checkA 3×3 matrix has determinant 7. What is the determinant after swapping two of its rows?
A swap multiplies the determinant by −1, because it flips orientation. Adding a multiple of one row to another is the operation that changes nothing.Review: the lemma above
Worked example Apostol 3.6 #2(b); MATH 375 HW8
Given det [[x, y, z], [3, 0, 2], [1, 1, 1]] = 1, find det [[x, y, z], [3x+3, 3y, 3z+2], [x+1, y+1, z+1]]
Solution.
Name the old rows.A1=(x,y,z), A2=(3,0,2), A3=(1,1,1), so d(A1,A2,A3)=1. We are told this number, so everything should be expressed through it.
Name the new rows in terms of the old.B1=A1, B2=3A1+A2=(3x+3,3y,3z+2) and B3=A1+A3=(x+1,y+1,z+1). Compare each new row with the old rows entry by entry; the pattern shows which operation was done.
Recognise the operations. Row 2 became (row 2) +3×(row 1), and row 3 became (row 3) + (row 1). Both add a multiple of another row. Part (3) of the lemma: this leaves the determinant unchanged. No cofactor expansion needed.
Suppose a determinant function d exists. If F is any function of the rows of an n×n matrix satisfying Axioms 1, 2 and 3, then for every A
F(A)=d(A)F(I).
In one lineIf d is a determinant function and F satisfies only Axioms 1 to 3, then F(A)=d(A)F(I) for every A.
Why it is trueRow operations are the only tool needed to reduce A to I, and each one changes F and d by the same factor.
ProofSpagnolie Lecture 15; Apostol 3.5
The idea: Reduce A by row operations. By the lemma, each operation multiplies F by the same number it multiplies d. Either A reaches I, and then the two sides agree, or A reaches a matrix with a zero row, and both sides are zero.
Each row operation multiplies F by a non-zero number, and multiplies d by the same number.
Lemma: swap multiplies by −1, scaling a row by c multiplies by c (Axiom 1), adding a multiple multiplies by 1. The factors depend on the operation, not on F.
Reduce A to its RREF R by row operations, and let φ be the product of all the factors. Then F(R)=φF(A) and d(R)=φd(A), with φ=0.
Gauss–Jordan (chapter 2.6): every matrix reduces to reduced row echelon form R.
Case 1: R=I. Then F(A)=F(I)/φ and d(A)=d(I)/φ=1/φ by Axiom 4. So F(A)=d(A)F(I).
An n×n RREF with n pivots is I (2.6).
Case 2: R=I. Then F(R)=0=d(R), so F(A)=F(R)/φ=0, and likewise d(A)=0. Again F(A)=d(A)F(I).
A square RREF with fewer than n pivots has a zero row. Then the lemma, part (1), gives 0 for both F and d.
In one lineThere is at most one function satisfying all four axioms.
Why it is trueA second function satisfying all four axioms has F(I)=1, so the theorem gives F=d.
ProofSpagnolie Lecture 15
The idea: Apply the previous theorem to F, and use Axiom 4 for F.
F(A)=d(A)F(I) for every A.
Previous theorem with F.
F(I)=1, so F(A)=d(A).
Axiom 4 holds for F too.
Definition T
Determinant
The determinantdetA of a square matrix A is the value at A of the determinant function (unique by the corollary, existing by the theorem at the end of the chapter). Chapter 2.6 called a square matrix with no inverse singular. The theorem below says these are exactly the matrices with detA=0.
In one lineThe unique function of the rows of a square matrix satisfying the four axioms. Written detA or ∣A∣. For a 2×2 matrix it is ad−bc.
Why it existsIt is the signed volume scale factor of the linear map, and it is zero exactly when the matrix is not invertible.
Now the recipe. Row operations change the determinant by known factors, so reduce and keep track.
Theorem TApostol 3.4; Spagnolie Lecture 14 page 4
Determinant of a triangular matrix
If U is upper triangular (all entries below the diagonal are 0) or lower triangular, then detU=u11u22⋯unn. In particular detI=1 and detdiag(λ1,…,λn)=λ1⋯λn (Spagnolie’s “favourite determinant”).
In one lineThe determinant of a triangular matrix is the product of its diagonal entries.
Why it is trueClear the off-diagonal entries with row operations that change nothing, then scale each row to leave the identity.
ProofSpagnolie Lecture 14
The idea: Two cases. If every diagonal entry is non-zero, row operations turn U into the diagonal part and then into I. If one is zero, the rows are dependent.
Case 1: all uii=0. Clear all the entries above the diagonal, working upwards. The determinant is unchanged and the matrix becomes diag(u11,…,unn).
Take U upper triangular; the lower triangular case is the same with rows from the top. If all uii=0, start at the bottom row and use it to clear the entries above unn. These are 'add a multiple' operations, which leave det unchanged.
Pull uii out of row i for each i: det=u11⋯unn⋅detI=u11⋯unn.
Axiom 1 applied to each row in turn, then Axiom 4.
Case 2: some ukk=0. The rows k,k+1,…,n are n−k+1 vectors, all in the span of ek+1,…,en.
Let k be the first index with ukk=0. Row k has zeros in columns 1 to k, and rows k+1,…,n also have zeros in columns 1 to k.
So these rows are dependent, hence the whole set of rows is dependent.
'More vectors than a spanning set means dependent' (2.2): n−k+1 vectors in a space spanned by n−k vectors.
detU=0, and the product u11⋯unn contains the factor ukk=0. So the formula holds.
Lemma part (4).
For a lower triangular matrix with a zero on the diagonal, the same two facts (more vectors than a spanning set, then Lemma part (4)) give detL=0. When all diagonal entries are non-zero, clear the entries below the diagonal working down from row 1, as in Case 1.
Mirror the argument. If L is lower triangular and lkk=0, then rows 1,…,k all have zeros in columns k,…,n, so they are k vectors in the span of e1,…,ek−1.
Your answerFind det2005−30714.
Look at where the zeros are. What does the triangular theorem say?
The matrix is upper triangular, so the determinant is the product of the diagonal: 2⋅(−3)⋅4=−24. The entries 5, 7 and 1 above the diagonal do not matter.
Theorem TApostol 3.4; Spagnolie Lecture 14 page 5
Determinant by row reduction
Suppose A is turned into an upper triangular matrix U by p swaps, scalings of rows by non-zero numbers c1,…,cq, and any number of additions of multiples of rows to other rows. Then
detA=(−1)p(c1c2⋯cq)−1u11u22⋯unn.
In one lineIf row operations turn A into an upper triangular U using p swaps and scalings by c1,…,cq, then detA=(−1)p(c1⋯cq)−1u11⋯unn.
Why it is trueEach swap multiplies the determinant by −1, each scaling by c multiplies it by c, and adding a multiple changes nothing.
ProofApostol 3.4
The idea: Follow the determinant through the operations, then use the triangular theorem.
Each swap multiplies the determinant by −1, each scaling by ci multiplies it by ci, each addition multiplies it by 1.
Triangular theorem, then solve for detA (the ci are non-zero).
Worked example Apostol 3.6 #1(a); MATH 375 HW8
Compute det [[2, 1, 1], [1, 4, −4], [1, 0, 2]] by row reduction
Solution.
Choose a first pivot of 1. Swap rows 1 and 2. The determinant of the new matrix is −detA. A swap multiplies by −1. The leading 1 avoids fractions.
Clear column 1.R2→R2−2R1 and R3→R3−R1. Adding a multiple of another row does not change the determinant.
Clear column 2 below the pivot.R3→R3−74R2. Same reason. Now the matrix is upper triangular.
Multiply the diagonal.1⋅(−7)⋅76=−6. Determinant of a triangular matrix.
Undo the swap. The swapped matrix has determinant −6, so detA=−(−6)=6. Step 1 said the swapped matrix has determinant −detA.
Answer.detA=6. Check by cofactor expansion further below.
Worked example Spagnolie Lecture 14 page 4 (matrix corrected)
A determinant with a factor to track: [[3, 0, 6], [5, 0, 6], [−1, 4, 2]]
Solution.
Pull a 3 out of row 1. Row 1 is 3(1,0,2), so detA=3det15−1004262. Axiom 1 in reverse. This is the step people forget to undo.
Clear column 1.R2→R2−5R1 gives (0,0,−4). R3→R3+R1 gives (0,4,4). Adding multiples of row 1; no change.
Swap rows 2 and 3. This gives the upper triangular 10004024−4 and puts a factor −1 in front. A swap flips the sign.
Multiply the diagonal.detA=3⋅(−1)⋅(1⋅4⋅(−4))=3⋅(−1)⋅(−16)=48. The factor 3 from step 1, the sign from the swap, and the triangular product.
Check by another method. Expand down column 2, which has a single non-zero entry 4 in position (3,2) with sign (−1)3+2=−1: −4det[3566]=−4(18−30)=48. Two independent methods agree, so the factor of 3 and the swap sign were both handled correctly.
A warning from the lecture notes. The notes print the matrix with third column (8,7,2) but then compute with (6,6,2). For the printed matrix the same column expansion gives −4(3⋅7−8⋅5)=−4(−19)=76. When an example and its printed matrix disagree, recompute. Either matrix has a non-zero determinant, so the notes’ conclusion that A−1 exists holds both ways.
Answer.48 (and 76 for the matrix as printed in the notes).
Quick checkYou divide row 2 of a matrix by 5 to make the numbers smaller, then row reduce the new matrix and find its determinant is 12. What is the determinant of the original matrix?
Dividing a row by 5 divides the determinant by 5 (Axiom 1: pulling 5 out of a row). So the original determinant is 5 times the new one, 60. The tempting answers forget the factor (12), undo it in the wrong direction (512), or confuse scaling with a swap (−12).
A matrix is invertible exactly when its determinant is non-zero
For an n×n matrix A, the following are equivalent: detA=0; A is invertible; the rows of A are linearly independent; the columns of A are linearly independent.
In one lineFor a square matrix, detA=0 if and only if A is invertible, if and only if the rows are independent, if and only if the columns are independent.
Why it is trueThe reduction in the uniqueness proof ends at I exactly when A is invertible, and in that case the determinant is a product of non-zero factors.
The idea: Reuse the case split in the uniqueness proof: reduce to RREF. It is I when A is invertible, and has a zero row otherwise.
detA=0 if and only if the RREF of A is I.
In the uniqueness proof: the RREF R satisfies d(R)=φd(A) with φ=0, and d(R)=d(I)=1 if R=I, d(R)=0 otherwise.
The RREF is I if and only if A is invertible.
Invertible matrix theorem, condition 9 (2.6): n pivots, RREF is I.
Invertible if and only if the columns are independent, and if and only if the rows are independent.
Invertible matrix theorem, conditions 4 and 11 (2.6): independent columns, and AT invertible, i.e. independent rows.
In the picture. “Squash to a line” has determinant 0: the orange square is flattened to a segment (area 0), and the two columns lie on one line, so they are dependent. Any map that does not flatten the plane has a non-zero area scale, and can be run backwards.
Quick checkA 4×4 matrix has two equal rows. Is it invertible?
Equal rows make the determinant zero by Axiom 3 (and the rows are dependent), so the matrix is not invertible.Review: the axioms
Worked example Apostol 3.6 #3(a); MATH 375 HW8; Midterm 2 Fall 2025 Problem 1
Use a determinant to decide if (1, 1, 1), (a, b, c), (a², b², c²) are independent, for distinct a, b, c
Solution.
Form the matrix. Put the three vectors as the rows of A=1aa21bb21cc2. Independent vectors correspond to a non-zero determinant (previous theorem), and rows or columns work equally well.
Clear column 1 below the 1.R2→R2−aR1 gives (0,b−a,c−a), and R3→R3−a2R1 gives (0,b2−a2,c2−a2). Adding multiples of row 1: determinant unchanged.
Clear the next entry.R3→R3−(b+a)R2: the new third entry is (c2−a2)−(b+a)(c−a)=(c−a)(c+a−b−a)=(c−a)(c−b), and the middle entry becomes b2−a2−(b+a)(b−a)=0. Factor c2−a2=(c−a)(c+a) so that a factor (c−a) appears.
Multiply the diagonal. The triangular matrix has diagonal 1,b−a,(c−a)(c−b). So detA=(b−a)(c−a)(c−b). Triangular determinant.
Decide. Since a,b,c are distinct, all three factors are non-zero, so detA=0 and the vectors are independent.
Answer. Independent. This is the Vandermonde determinant; for numbers 1,2,3 it gives (2−1)(3−1)(3−2)=2=0.
Worked example new (a JEE favourite)
For which values of k is the matrix [[k, 1, 1], [1, k, 1], [1, 1, k]] not invertible?
Solution.
Turn the problem into a determinant. The matrix is not invertible exactly when its determinant is 0. The theorem above: invertible if and only if det=0. So we compute det as a polynomial in k and find its roots.
Put a common factor into row 1.R1→R1+R2+R3 gives (k+2,k+2,k+2). Each column adds to k+2. Adding multiples of other rows leaves det unchanged, and now row 1 is a multiple of (1,1,1).
Pull the factor out.det=(k+2)det1111k111k. Axiom 1 on row 1. It holds for every scalar, including k+2=0, so the identity is true for all k.
Clear column 1.R2→R2−R1 gives (0,k−1,0) and R3→R3−R1 gives (0,0,k−1). Adding multiples of row 1: no change. The matrix is now upper triangular.
Multiply the diagonal.det=(k+2)⋅1⋅(k−1)(k−1)=(k+2)(k−1)2. Triangular determinant.
Find the roots.det=0 when k=−2 or k=1. A product of numbers is 0 only if a factor is 0.
Sanity check. For k=1 every entry is 1, so all rows are equal. For k=−2 each row adds up to 0, so the columns add to the zero vector and are dependent. Both are visibly singular, which agrees with the determinant.
Answer. Not invertible exactly for k=1 and k=−2. In general det=(k+2)(k−1)2.
Your answerFor the matrix in the last example, what is det when k=3?
Use the factored form (k+2)(k−1)2.
det=(k+2)(k−1)2=5⋅22=20.
The product rule
Picture first. The “Eigen example” map in the viewer below multiplies every area by 6. If we followed it by a map that multiplies areas by 2, the combination would multiply areas by 12. In general, doing map B and then map A multiplies areas by detB and then by detA. The composite map has matrix AB (chapter 2.5). So the area factor of AB must be the product.
In one linedet(AB)=detA⋅detB for all n×n matrices.
Why it is trueFix B. The function A↦det(AB) obeys Axioms 1 to 3, so it is detA times its value at I, which is detB.
ProofSpagnolie Lecture 15 page 2; Apostol 3.7
The idea: Spagnolie's 'cleverness': fix B and define a new function of the rows of A. Check that it satisfies Axioms 1 to 3. The uniqueness theorem then says it is det A times its value at the identity.
Row i of AB is AiB, where Ai is row i of A.
Matrix multiplication (2.5): (AB)ij=∑kaikbkj. So row i of AB is ∑kaik(row k of B), which is (row i of A) times B.
Fix B and put F(A1,…,An)=det(AB)=d(A1B,A2B,…,AnB).
Define it.
F satisfies Axiom 1.
x↦xB is linear: (tAk)B=t(AkB). Then Axiom 1 for d in row k.
F satisfies Axiom 2.
(Ak+C)B=AkB+CB. Then Axiom 2 for d in row k.
F satisfies Axiom 3.
If Ai=Aj then AiB=AjB, so AB has two equal rows, and d is 0 by Axiom 3.
So F(A)=detA⋅F(I).
The theorem 'Axioms 1 to 3 force a multiple of the determinant'.
F(I)=det(IB)=detB. Hence det(AB)=detAdetB.
IB=B.
Proof workshopRebuild the proof of the product rule
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
Matrix multiplication: row i of AB uses only row i of A, multiplied by B.
The new idea: treat det(AB) as a function of the rows of A alone, so the uniqueness theorem can be used on it.
To write F as a function of the rows of A you first need to know that the rows of AB are A1B,…,AnB.
Multiplying a row by B respects scalars and sums, and d obeys Axioms 1 and 2 in every row.
You check the axioms for the function F, so F has to be defined first.
Equal rows stay equal after multiplying by B, and d is zero on equal rows.
You check the axioms for the function F, so F has to be defined first.
The theorem 'Axioms 1 to 3 force a multiple of the determinant'.
That theorem applies only once F is known to satisfy Axioms 1, 2 and 3.
IB=B, so the value of F at the identity is detB.
This evaluates the multiple F(I), so you need the line that produces the multiple first.
Another way to say the same thing: for fixed invertible B, the function A↦det(AB)/detB satisfies all four axioms, so it is det. The proof above avoids the division and works even when detB=0.
For n×n matrices: if A is invertible then detA=0 and det(A−1)=1/detA. Also det(Ak)=(detA)k for k≥1, det(AB)=det(BA), and det(cA)=cndetA for a scalar c.
In one linedet(A−1)=1/detA, det(Ak)=(detA)k, det(AB)=det(BA), and det(cA)=cndetA for an n×n matrix.
Why it is trueEach is the product rule applied to a particular product.
ProofSpagnolie Lecture 14 page 6
The idea: Choose the right product.
1=detI=det(AA−1)=detAdet(A−1). So detA=0 and det(A−1)=1/detA.
Product rule, and detI=1.
det(Ak)=detA⋅det(Ak−1)=(detA)k.
Product rule, repeatedly (induction on k).
det(AB)=detAdetB=detBdetA=det(BA).
Real numbers commute.
det(cA)=cndetA.
cA is A with every one of its n rows multiplied by c. Axiom 1 for each row gives a factor c each time.
Worked example Midterm 2 (2013 practice) Q5
Properties from the product rule: nilpotent matrices, det(B⁻⁸), and antisymmetric matrices of odd size
Solution.
(a) A nilpotent matrix is singular. Suppose Ap=O for some p≥1. Then (detA)p=det(Ap)=detO=0, so detA=0. Corollary: det(Ap)=(detA)p. A real number whose power is 0 is 0.
(b) If detB=2, find det(B−8).det(B−1)=21, so det(B−8)=(21)8=2561. First the inverse formula, then the power formula applied to B−1.
(c) If AT=−A and n is odd, find detA.detA=det(AT)=det(−A)=(−1)ndetA=−detA. So 2detA=0 and detA=0. Uses det(AT)=detA (theorem below) and det(cA)=cndetA with c=−1.
Answer. (a) detA=0. (b) 1/256. (c) 0.
Your answerA is a 3×3 matrix with detA=3. Find det(2A−1).
Two rules: det(A−1)=1/detA and det(cA)=cndetA.
det(A−1)=31, and scaling a 3×3 matrix by 2 multiplies the determinant by 23=8. So det(2A−1)=8⋅31=38.
Worked example
A 3 by 3 matrix A has det A = 4. Find the determinant of the matrix B whose rows are R1 + R2, R2 + R3, R3 + R1, where R1, R2, R3 are the rows of A.
Solution.
Write the row operation as a matrix. Each row of B is a combination of the rows of A, so B=MA with M=101110011. Row i of MA is (row i of M) times A, which is the combination of the rows of A with the weights in row i of M (matrix multiplication, 2.5).
Find detM. Expand along column 1: 1⋅det[1011]+1⋅det[1101]=1+1=2. The entry 0 kills one term, and the entry in position (3,1) has sign +.
Apply the product rule.detB=detM⋅detA=2⋅4=8. Product rule for determinants.
Check by multilinearity. Expanding each row of B into its two pieces gives 8 determinants. Six of them repeat a row and vanish. The other two are d(R1,R2,R3)=4 and d(R2,R3,R1)=4 (a cyclic shift of three rows is two swaps). Total 8. Axiom 2 splits sums in each row, Axiom 3 kills repeated rows, and each swap flips the sign.
Answer.detB=8.
Quick checkdetA=3 and detB=−2 for 2×2 matrices. What is det(A+B)?
The product rule gives det(AB)=−6, but there is no rule for det(A+B). The determinant is not additive on matrices; it is additive only in one row at a time.Review: what additive means here
For every n×n matrix A, det(AT)=detA. Consequently the determinant also satisfies the four axioms with ‘row’ replaced by ‘column’, and column operations behave like row operations.
In one linedetAT=detA. So everything true for rows is true for columns.
Why it is trueElementary matrices have the same determinant as their transposes. An invertible matrix is a product of them, and a singular one has a singular transpose.
ProofStrang; compare Apostol 3.14 which uses cofactors
The idea: Check it on elementary matrices, then use the product rule on a product of them. Singular matrices are handled separately.
For an elementary matrix E, detE is −1, c or 1 respectively.
An elementary matrix is I with one row operation done. The operation multiplies det by −1 (swap), c (scale) or 1 (add), and detI=1.
ET is elementary of the same type, with the same determinant. So detET=detE.
A swap matrix and a diagonal scaling matrix are symmetric. The transpose of the 'add c times row i to row j' matrix is the 'add c times row j to row i' matrix, with determinant 1.
Case 1: A invertible. Then A=E1E2⋯Ek with each Ei elementary.
Invertible matrix theorem (2.6), condition 10.
AT=EkT⋯E1T, so detAT=∏detEiT=∏detEi=detA.
(XY)T=YTXT, then the product rule, then commutativity of real multiplication.
Case 2: A not invertible. Then AT is not invertible.
Row rank equals column rank (2.6): rankAT=rankA<n, so AT is not invertible either.
detAT=0=detA.
Previous theorem.
Theorem AApostol Thm 3.7; MATH 375 HW9 (3.11 #2a)
Determinant of a block-diagonal matrix
Let A be p×p and B be q×q. Then the (p+q)×(p+q) matrix [AOOB] has determinant detA⋅detB.
In one lineFor square blocks A and B, det[AOOB]=detA⋅detB.
Why it is trueAs a function of the rows of A, the left side obeys Axioms 1 to 3, so the uniqueness theorem applies, twice.
ProofSpagnolie's trick in HW9 3.11 #2(a)
The idea: Hold B fixed and treat the left side as a function of the rows of A. It obeys Axioms 1 to 3, so the left side is det A times its value at A = I. Then do the same with B.
Let F(A)=det[AOOB] with B fixed. F satisfies Axioms 1, 2 and 3 as a function of the rows of A.
Rows 1,…,p of the big matrix are the rows of A followed by q zeros. Scaling or adding in such a row is scaling or adding in the row of A, and equal rows of A give equal rows of the big matrix.
F(A)=detA⋅F(Ip)=detA⋅det[IpOOB].
Theorem 'Axioms 1 to 3 force a multiple of the determinant', in dimension p.
So G(B)=detB⋅G(Iq).
Same argument: G(B)=det[IpOOB] obeys Axioms 1 to 3 in the rows of B.
G(Iq)=1. Hence det[AOOB]=detAdetB.
[IpOOIq]=Ip+q has determinant 1.
Cofactor expansion
Row reduction is the best way to compute big determinants. For small matrices with zeros, or for proofs, the expansion by cofactors is better. It reduces an n×n determinant to n determinants of size n−1.
Definition T
Minor
For an n×n matrix A with n≥2, the (k,j) minor is the (n−1)×(n−1) matrix Akj obtained by deleting row k and column j of A. (Spagnolie: “kill the k-th row and the j-th column”.)
In one lineThe matrix Akj obtained from A by deleting row k and column j.
Why it existsExpanding a determinant along a row reduces it to determinants of the smaller matrices left over.
Definition T
Cofactor
The cofactor of the entry akj is Ckj=(−1)k+jdetAkj. The signs follow a checkerboard, starting with + in the top left corner: +−+−+−+−+⋯⋯⋯.
In one lineThe number Ckj=(−1)k+jdetAkj: the determinant of the minor with a checkerboard sign.
Why it existsThe signs come from swapping rows and columns to move the entry to the corner, and they make the expansion formula work.
Theorem TApostol Thms 3.8 and 3.9; Spagnolie Lecture 15 pages 3 and 4
Expansion by cofactors
Let A be n×n with n≥2, and assume determinants of size n−1 exist. For every row k,
detA=j=1∑nakjCkj=j=1∑n(−1)k+jakjdetAkj.
For every column j, detA=∑k=1n(−1)k+jakjdetAkj.
In one lineFor any row k: detA=∑j=1nakjCkj. The same holds along any column.
Why it is trueWrite row k as a combination of the identity rows ej. By linearity the determinant splits into n pieces, and each piece is a smaller determinant with a sign.
ProofSpagnolie Lecture 15 pages 3 and 4; Apostol 3.12
The idea: Spagnolie's argument: split row k into the n pieces a_kj e_j by linearity. In each piece clear the rest of column j by row operations. Then the piece is a smaller determinant, up to a sign counted by swaps.
detA=∑jakjDj, where Dj is the determinant of A with row k replaced by ej.
Row k equals ∑jakjej, where ej is the j-th row of the identity. Axioms 1 and 2 pull sums and scalars out of a single row.
In Dj, subtract multiples of row k from the other rows so that column j is zero except for the 1 in row k.
Because row k is now ej (a 1 in column j, zeros elsewhere), subtracting aij times row k from row i clears column j and changes no other entry. Adding multiples of a row does not change det.
Move row k to the top by k−1 adjacent swaps: a factor (−1)k−1. The matrix now has first row ej and below it the rows of Akj with a 0 inserted in position j.
Each swap of adjacent rows multiplies by −1.
By the theorem ‘Axioms 1 to 3 force a multiple of the determinant’ (in dimension n−1), g(B)=detB⋅g(In−1).
For an (n−1)×(n−1) matrix B, let g(B) be the determinant of the n×n matrix with first row ej and below it the rows of B with a 0 inserted in position j. Inserting a zero is linear, and equal rows of B stay equal, so g obeys Axioms 1 to 3 in the rows of B.
g(In−1)=(−1)j−1.
The matrix g(In−1) has rows ej,e1,…,ej−1,ej+1,…,en. Move the first row down j−1 places by adjacent swaps to reach I.
Dj=(−1)k−1(−1)j−1detAkj=(−1)k+jdetAkj=Ckj. So detA=∑jakjCkj.
Combine the signs from the swaps in the two earlier steps.
The column version follows from the transpose theorem.
Expanding along column j of A is expanding along row j of AT, and detAT=detA.
In the picture. For n=3 the expansion along row 1 is Spagnolie’s formula detA=A1⋅(A2×A3). The three terms a11C11, a12C12, a13C13 split the first edge A1 into its three components along the coordinate axes. Each component of the edge gives a box with one edge along an axis. Its volume is that component times the area of the base spanned by the other two edges with that axis direction deleted, which is the minor.
Quick checkWhat is the sign in front of the cofactor of the entry in row 2, column 3?
The sign is (−1)2+3=−1. The checkerboard has + where row plus column is even.Review: cofactors
Worked example Apostol 3.6 #1(a); Spagnolie Lecture 15 page 5
Compute det [[2, 1, 1], [1, 4, −4], [1, 0, 2]] by cofactors, and det [[1, 1, 2, 0], [1, 0, 3, 1], [0, 0, 1, 1], [4, 2, 0, 1]]
Solution.
Pick the row with the most zeros. For the 3×3 matrix, row 3 is (1,0,2). A zero entry makes its whole term vanish, so there is less to compute.
Expand along row 3.det=a31C31+a32C32+a33C33=1⋅C31+0+2⋅C33. Theorem: expansion along row k=3.
Compute the cofactors.C31=(+1)det[141−4]=−4−4=−8 and C33=(+1)det[2114]=8−1=7. The minors delete row 3 and column 1 (or 3). The sign is (−1)3+1=(−1)3+3=+1.
Add up.det=−8+14=6. This agrees with the row reduction answer above, which is a check.
The 4×4 matrix. Row 3 is (0,0,1,1), with two zeros. Expand along it: det=1⋅(−1)3+3detA33+1⋅(−1)3+4detA34. Only the two non-zero entries contribute.
The two minors.A33=114102011 has determinant 1(0−2)−1(1−4)+0=−2+3=1. A34=114102230 has determinant 1(0−6)−1(0−12)+2(2−0)=−6+12+4=10. Each is a 3×3 determinant, expanded along its first row.
Combine.det=1−10=−9. The second term carries the sign (−1)3+4=−1.
Answer.6 and −9.
Your answerFind det1472583610.
Expand along the first row, with signs +,−,+.
Expand along row 1: 1(5⋅10−6⋅8)−2(4⋅10−6⋅7)+3(4⋅8−5⋅7)=2−2(−2)+3(−3)=2+4−9=−3. (With 9 in place of 10 the rows would be dependent and the answer would be 0.)
Definition A
Cofactor matrix
The cofactor matrixcofA of an n×n matrix A is the matrix whose (i,j) entry is the cofactor Cij=(−1)i+jdetAij. Many books call (cofA)T the adjugate of A.
In one lineThe matrix whose (i,j) entry is the cofactor Cij. Its transpose is the adjugate.
Why it existsIt gives an explicit formula for the inverse of a matrix.
For every n×n matrix A with n≥2, A(cofA)T=(detA)I. If detA=0 then A−1=detA1(cofA)T.
In one lineA(cofA)T=(detA)I, so when detA=0, A−1=detA1(cofA)T.
Why it is trueExpanding along row k using the entries of row i instead gives the determinant of a matrix with two equal rows, which is 0.
ProofApostol 3.15
The idea: Compute the (i, k) entry of the product. It is a cofactor expansion along row k, but using the entries of row i.
The (i,k) entry is ∑jaijCkj.
Matrix multiplication: entry (i,k) of A(cofA)T is row i of A times column k of (cofA)T, which is row k of cofA.
If i=k this is ∑jakjCkj=detA.
Expansion by cofactors along row k.
If i=k, let A′ be A with row k replaced by a copy of row i. Then ∑jaijCkj is the expansion of detA′ along row k.
The cofactors Ckj are built from the rows other than row k, so they do not change if we replace row k of A by row i.
detA′=0. So the product has detA on the diagonal and 0 elsewhere, which is (detA)I.
Axiom 3: A′ has two equal rows.
If detA=0, A⋅detA1(cofA)T=I, so A−1=detA1(cofA)T.
Divide by the non-zero number detA; a square matrix with a one-sided inverse has a two-sided one (2.6).
Worked example
Find the inverse of A with rows (1, 2, 3), (0, 1, 4), (5, 6, 0) by the cofactor formula, and check with chapter 2.6
Solution.
Find the determinant. Expand along column 1: detA=1⋅det[1640]+0+5⋅det[2134]=(0−24)+5(8−3)=−24+25=1. The entry 0 kills one term. Entry (3,1) has sign +. A non-zero determinant means A is invertible.
Compute the nine cofactors.C11=+(0−24)=−24, C12=−(0−20)=20, C13=+(0−5)=−5; C21=−(0−18)=18, C22=+(0−15)=−15, C23=−(6−10)=4; C31=+(8−3)=5, C32=−(4−0)=−4, C33=+(1−0)=1. Each is the signed determinant of the 2×2 left after deleting a row and a column.
Transpose and divide.cofA=−2418520−15−4−541, and A−1=11(cofA)T=−2420−518−1545−41. The formula has the transpose of the cofactor matrix.
Compare. This is the matrix we found by row reducing [A∣I] in chapter 2.6. Two independent methods agree.
Answer.A−1=−2420−518−1545−41. (For a 2×2 matrix, the same formula is the familiar ad−bc1[d−c−ba].)
Cramer’s rule
Definition A
Cramer's rule
Cramer’s rule. Let A be n×n with detA=0 and b∈Rn. Let Aj(b) be the matrix A with its j-th column replaced by b. Then the solution of Ax=b has
xj=detAdetAj(b),j=1,…,n.
In one lineFor an invertible A, the solution of Ax=b has xj=detAj(b)/detA, where Aj(b) is A with column j replaced by b.
Why it existsIt gives each unknown as a ratio of two volumes. It is a formula, not an efficient method.
The picture, in the plane. The system Ax=b says b=x1a1+x2a2 for the columns a1,a2. The area of the parallelogram spanned by b and a2 equals x1 times the area spanned by a1 and a2, because the x2a2 part of b is a slide along a2 (a shear), which does not change the area. So x1=det[ba2]/det[a1a2]. The proof below does this in every dimension.
Theorem AApostol Thm 3.14
Cramer's rule is correct
If detA=0 then Ax=b has the unique solution given by Cramer’s rule.
In one lineIf detA=0 then the unique solution of Ax=b is xj=detAj(b)/detA.
Why it is trueReplacing column j of A by b=Ax is multiplying A by an identity matrix with column j replaced by x. That matrix has determinant xj.
ProofApostol 3.16
The idea: Write A_j(b) as a product A X_j, where X_j is the identity with column j replaced by the solution x. Then apply the product rule.
Let x be the solution of Ax=b.
detA=0 means A is invertible, so there is exactly one solution x=A−1b.
Let Xj be the identity matrix with column j replaced by x.
Define it.
AXj=Aj(b).
Column k of AXj is A times column k of Xj. For k=j that is Aek=ak. For k=j it is Ax=b.
detAj(b)=detA⋅detXj.
Product rule.
detXj=xj⋅detIn−1=xj.
Expand detXj along row j. Row j of Xj is (0,…,0,xj,0,…,0), so only the entry xj at position (j,j) contributes, with cofactor sign + and minor In−1.
xj=detAj(b)/detA.
Divide by detA=0.
This is the JEE rule “if Δ=0, then x=Δ1/Δ, y=Δ2/Δ, z=Δ3/Δ”, now with a proof. When Δ=0 the rule says nothing about x. As the example in chapter 2.6 showed, Δ=0 with every Δj=0 can still mean no solution, so in that case use elimination.
Worked example Apostol 2.20 #1 and 3.17
Solve x + y + 3z = 5, 2x − y + 4z = 11, −y + z = 3 by Cramer's rule
Solution.
Compute detA.A=1201−1−1341. Expand along column 1: 1⋅det[−1−141]−2det[1−131]+0=(−1+4)−2(1+3)=3−8=−5. Non-zero, so Cramer’s rule applies and the solution is unique.
Replace column 1 by b=(5,11,3).det51131−1−1341=5(−1+4)−1(11−12)+3(−11+3)=15+1−24=−8. This is detA1(b).
Replace column 2 and column 3 by b.detA2(b)=det1205113341=1(11−12)−2(5−9)=−1+8=7, and detA3(b)=det1201−1−15113=1(−3+11)−2(3+5)=8−16=−8. One new determinant per unknown.
Check. These agree with the Gauss–Jordan answer of chapter 2.6, (58,−57,58).
Answer.(x,y,z)=(58,−57,58).
Your answerUse Cramer's rule on 3x+2y=7, x−y=4. What is x?
Replace the FIRST column of the coefficient matrix by the right-hand side, then divide by the original determinant.
detA=3(−1)−2⋅1=−5. Replacing column 1 by b=(7,4) gives det[742−1]=−7−8=−15. So x=−5−15=3 (and y=−1: check 9−2=7 and 3+1=4).
Permutations and the formula behind it all
Beyond the course: for understanding· Existence: the permutation formula (Leibniz)
Everything above said “if a determinant function exists”. Here is the proof that it does, for every n. It also gives a direct formula, useful in proofs but terrible for computing (it has n! terms). Apostol proves existence by induction with cofactors (3.13), which Spagnolie skipped.
Definition B
Permutation
A permutation of {1,…,n} is a bijection σ:{1,…,n}→{1,…,n}, written as the list (σ(1),…,σ(n)). An inversion is a pair i<j with σ(i)>σ(j). The sign is sgnσ=(−1)number of inversions. There are n! permutations. For n=3: (1,2,3) has sign +, (2,1,3) has one inversion and sign −, (2,3,1) has two inversions and sign +.
In one lineA rearrangement of 1,2,…,n: a list σ(1),…,σ(n) using each number once. Its sign is +1 or −1 according to whether the number of out-of-order pairs is even or odd.
Why it existsEach term of the determinant formula picks one entry from each row and each column, which is exactly a permutation, and the sign records the swaps needed.
Lemma Bstandard; Axler 10.B / Strang 5.1
Swapping two values flips the sign of a permutation
Let σ′ be obtained from σ by exchanging the values in positions r<s. Then sgnσ′=−sgnσ.
In one lineIf σ′ is σ with the values at two positions exchanged, then sgnσ′=−sgnσ.
Why it is trueExchanging neighbours changes exactly one pair's order. Any exchange is an odd number of exchanges of neighbours.
Proofstandard
The idea: First for neighbouring positions, where exactly one pair changes status. Then write any exchange as an odd number of neighbouring exchanges.
Neighbours: the pair (r,r+1) changes status.
Exchange the values in positions r and r+1. Look at the pair (r,r+1) itself: its two values swap, so it was an inversion before if and only if it is not one now.
All other pairs together keep the same number of inversions. So the inversion count changes by exactly ±1, and the sign flips.
For any other position i, the pair of i with r and the pair of i with r+1 together compare the value at i with the same two values as before, only in swapped roles; the total number of inversions among them is unchanged. Pairs not involving r or r+1 are untouched.
A general exchange is (s−r)+(s−r−1)=2(s−r)−1 neighbour exchanges, an odd number.
To exchange the values at positions r<s: swap the value at r rightwards past the s−r positions up to s (that is s−r neighbour exchanges), then swap the value that was at s leftwards to position r (s−r−1 more exchanges).
So the sign flips an odd number of times, i.e. it flips.
Each neighbour exchange flips the sign.
Theorem AApostol Thm 3.10 (existence, by cofactor induction); here Leibniz's formula
The permutation formula gives a determinant function
For an n×n matrix A=(aij), define d(A)=∑σsgn(σ)a1σ(1)a2σ(2)⋯anσ(n), the sum over all n! permutations. Then d satisfies Axioms 1 to 4.
In one linedetA=∑σsgn(σ)a1σ(1)a2σ(2)⋯anσ(n) satisfies all four axioms. So the determinant exists for every n.
Why it is trueEach term takes one entry from each row, so it is linear in each row. Terms cancel in pairs when two rows are equal, and only the identity permutation survives on the identity matrix.
Proofstandard
The idea: Check each axiom on the formula.
Axioms 1 and 2: each term is linear in row k, so the sum is too.
Every product has exactly one factor from row k, namely akσ(k).
Axiom 3: group the permutations into pairs {σ,σ′}.
Suppose rows r and s are equal. Pair each σ with σ′, which exchanges the values at positions r and s. This pairs up all n! permutations with no fixed points.
The two terms of a pair are equal in size and opposite in sign, so they cancel. The total is 0.
The two products contain the same factors: arσ(r)asσ(s) against arσ(s)asσ(r), which are equal because row r equals row s. The signs are opposite by the lemma.
Axiom 4: for A=I only the identity permutation contributes, and it contributes +1.
The product a1σ(1)⋯anσ(n) for A=I is 0 unless σ(i)=i for all i, where it is 1. The identity permutation has no inversions.
For n=2 the two permutations (1,2) and (2,1) give a11a22−a12a21=ad−bc. For n=3 there are six terms (the three “down-right” diagonals added and the three “down-left” diagonals subtracted, which you may know as Sarrus’s rule). For the matrix of the first worked example, 2111401−42: 2⋅4⋅2+1⋅(−4)⋅1+1⋅1⋅0−1⋅4⋅1−2⋅(−4)⋅0−1⋅1⋅2=16−4+0−4−0−2=6. The first three terms are the even permutations and the last three the odd ones. This works only for n≤3 in that pattern; for larger n use elimination.
Worked example Midterm 2 review, 3.4
Prove from the axioms that the determinant of [[a, b], [c, d]] is ad − bc
Solution.
Write the rows in terms of the identity rows. Row 1 is (a,b)=ae1+be2 and row 2 is (c,d)=ce1+de2. We will use linearity in each row, which needs rows written as combinations of simple rows.
Expand row 1. Write [u,v] for the determinant of the matrix with rows u and v (this [,] is the determinant function, so it is not the entry d). Then det=a[e1,row 2]+b[e2,row 2]. Axioms 1 and 2 in the first row.
Expand row 2 in each term. This gives four terms: ac[e1,e1]+ad[e1,e2]+bc[e2,e1]+bd[e2,e2]. Axioms 1 and 2 in the second row.
Evaluate the four.[e1,e1]=0=[e2,e2] by Axiom 3. [e1,e2]=detI=1 by Axiom 4. [e2,e1]=−[e1,e2]=−1 by the swap rule of the lemma. Axioms 1 and 2 did the expanding, Axiom 3 kills two terms, Axiom 4 fixes the value on I, and the lemma handles the swapped term.
Add up.det=ad⋅1+bc⋅(−1)=ad−bc.
Answer.ad−bc, with no assumption on the signs of a,b,c,d. This is the same count as the permutation formula for n=2.
Examples and non-examples
The worked examples above cover the main kinds of question: area scaling, row operations on a given determinant, reduction to triangular form (twice), independence by determinant (Vandermonde), a parameter that makes a matrix singular, cofactor expansion in 3 and 4 dimensions, the cofactor formula for the inverse, Cramer’s rule, properties from the product rule, and a proof from the axioms. One more computation prepares the stretch problem, and then three short reminders of what a determinant function is not.
Worked example Apostol 3.6 #4(d), 3 by 3 case
Find the determinant of the tridiagonal matrix [[a, 1, 0], [4, a, 2], [0, 3, a]] by expanding along its last row.
Solution.
Pick the row. The last row is (0,3,a), with one zero. A zero entry kills its term, so fewer minors are needed.
Expand along it.det=3⋅C32+a⋅C33. Expansion along row 3, skipping the entry 0.
The entry 3 at position (3,2). The sign is (−1)3+2=−1 and the minor deletes row 3 and column 2: det[a402]=2a. So C32=−2a. The minor’s last column is (0,2), so only the 2 survives: this is the “last column has one entry” step of the stretch problem.
The entry a at position (3,3). The sign is + and the minor is [a41a] with determinant a2−4. So C33=a2−4. This minor is the top-left 2×2 tridiagonal block, D2.
Add up.det=3(−2a)+a(a2−4)=a3−10a. Compare with the recurrence D3=aD2−s2t2D1=a(a2−4)−2⋅3⋅a.
Answer.a3−10a.
Not a determinant function: F(A)=a11a22⋯ann (the diagonal product). It is linear in each row and F(I)=1, so Axioms 1, 2 and 4 hold. Axiom 3 fails: A=[1111] has equal rows but F(A)=1=0.
Not a determinant function: F(A)=1 for all A. It is non-zero on equal rows, so it fails Axiom 3.
Triangular does not need to look triangular.003040500 is not triangular as written, yet one swap of rows 1 and 3 makes it diag(3,4,5). So its determinant is −(3⋅4⋅5)=−60.
Where it is used
Used inside maths· Inside maths: the Jacobian and the area element r dr dθ
A change of variables (r,θ)↦(x,y)=(rcosθ,rsinθ) is not linear. Near each point it is approximated by a linear map, the matrix of partial derivatives
J=[cosθsinθ−rsinθrcosθ],detJ=rcos2θ+rsin2θ=r.
So a tiny rectangle of size dr×dθ is sent to a patch of area rdrdθ. That is the number you multiplied by in double integrals in polar coordinates. The area of a disk of radius R is ∫02π∫0Rrdrdθ=2π⋅2R2=πR2; for R=2 this is 4π. The same determinant, for the matrix of partial derivatives, appears in every change of variables in Unit 6.
Used inside maths· Inside maths: the characteristic polynomial (next chapter)
A number λ is an eigenvalue of A exactly when A−λI is not invertible, that is, when det(A−λI)=0. For A=[023−1] (Apostol 3.17 #3(a)), det(λI−A)=λ(λ+1)−6=(λ−2)(λ+3) (for a 2×2 matrix, det(λI−A)=det(A−λI)), so the special values are λ=2 and λ=−3. Chapter 2.8 builds the theory on this.
Used in the real world· Crystallography: the volume of a unit cell
A crystal is a repeating pattern of identical cells, each a parallelepiped spanned by three vectors a1,a2,a3. Its volume is ∣det[a1a2a3]∣. Silicon has a face-centred cubic lattice with cube side a=5.431 ångström. The primitive cell is spanned by a1=2a(0,1,1), a2=2a(1,0,1), a3=2a(1,1,0). Then
(Expand along row 1: 0−21(0−41)+21(41−0)=81+81.) The cube holds 4 lattice points, so each owns a quarter of the cube’s volume a3=160.2, which is 40.05. For a monoclinic cell with edges 5,6,7, two right angles and a third angle of 100° between two of the edges, the volume is 5⋅6⋅7sin100°≈206.8 cubic ångström, and the determinant of the three edge vectors gives the same number.
Used in the real world· 3D graphics: scale and mirror flips in a model matrix
A game engine places an object using a 3×3 matrix for its rotation and scaling. The determinant is the volume scale: the matrix diag(2,3,1) has determinant 6, so the object occupies 6 times the volume. A mirror, such as diag(−1,1,1), has determinant −1. Volumes are unchanged, but a triangle drawn counter-clockwise (the front face) now comes out clockwise, so the engine reverses the order of the triangle’s vertices when det<0. Otherwise the object would be drawn inside out, with its back faces culled. A determinant 0 means the object has been flattened to a plane and cannot be recovered.
Used in the real world· Physics: the cross product as a determinant
For a,b∈R3, the cross product is the formal determinant
a×b=detia1b1ja2b2ka3b3,
expanded along the first row. For a=(1,3,2) and b=(0,2,1) this gives (3⋅1−2⋅2,2⋅0−1⋅1,1⋅2−3⋅0)=(−1,−1,2) (HW8). Replace the top row by a and the determinant has two equal rows, so a⋅(a×b)=0: the cross product is perpendicular to a. The same argument gives b⋅(a×b)=0. The length ∣a×b∣ is the area of the parallelogram on a and b, and the torque of a force F at displacement r is r×F. The scalar triple product a⋅(b×c)=det[a;b;c] is the volume of the box.
Beyond the course: for understanding· Why the determinant is a bad test for singularity in code
In exact arithmetic, detA=0 decides invertibility. In floating point it does not. The matrix A=0.1I100 is perfectly well behaved, yet detA=0.1100=10−100, tiny only because the entries are small. The matrix [1111.0001] from chapter 2.6 has determinant 10−4, which looks small but means something different: it is nearly singular, and tiny errors in the data change the solution by order 1. The size of the determinant mixes the overall scale with the closeness to singularity, and for large matrices it can also overflow (the matrix 10I1000 has determinant 101000, far above the largest number a double-precision float can hold, about 1.8×10308). Numerical code decides invertibility by the rank from elimination or by the condition number (chapter 3.5), never by comparing detA with zero.
Traps
Watch out· The determinant is not additive, and det(cA) is cⁿ det A
det(A+B)=detA+detB in general. Take A=I and B=−I in R2×2: det(A+B)=detO=0, while detA+detB=2. Also det(2A)=2ndetA, not 2detA. The determinant is additive in one row at a time with the other rows fixed. A true/false question on Midterm 2 (Fall 2025), “the determinant is a linear transformation on the space of square matrices”, has the answer false for exactly this reason.
Watch out· Track every swap and every scaling
Swapping two rows multiplies by −1. Scaling a row by c multiplies by c, so if you divide a row by 3 to simplify, you must multiply the final answer by 3 (the factor 3 in the Lecture 14 example). Adding a multiple of another row does nothing. The formula detA=(−1)p(c1⋯cq)−1detU is a bookkeeping of these.
Watch out· The Lecture 14 matrix did not match its computation
The printed matrix has third column (8,7,2) and determinant 76. The computation below it uses (6,6,2) and gives 48. When a worked example from lecture and the solution disagree, recompute rather than trusting either. Here the conclusion (non-zero, so invertible) was right both ways.
Watch out· Cofactor signs form a checkerboard, and the minor is a matrix
The sign of the cofactor at (k,j) is (−1)k+j, so the top left is +, its neighbours are −, and the signs alternate along rows and columns. Forgetting the sign, or putting the sign pattern in the wrong place after expanding along a row other than the first, is the commonest error. In the Lecture 15 4×4 example, the second term has sign (−1)3+4=−1.
Watch out· Cofactor expansion and Cramer's rule are not the way to compute large determinants
Expanding fully takes about n! operations: for n=20 that is more than 1018. Row reduction takes about n3/3. Cramer’s rule needs n+1 determinants to solve one system. Use these formulas for proofs, for small matrices with zeros, and for symbolic work.
Watch out· Only square matrices have determinants
A 2×3 matrix has no determinant, and ‘rank’ or the null space are the right tools for it.
Problems
check
Compute det[3412]. By what factor does this matrix multiply areas, and does it flip orientation?
Solution
3⋅2−1⋅4=2. Areas are multiplied by 2. The sign is positive, so orientation is kept.
check
A 3×3 matrix A has detA=5. Find det(2A), det(A−1), det(AT), det(A2) and det(−A).
Find det001100010 and det147258369 without a long computation.
Solution
The first is a permutation of the rows of I: moving row 3 to the top takes two swaps, so det=(−1)2=+1. In the second, row 3 equals 2× row 2 minus row 1, so the rows are dependent and det=0.
check
True or false: if detA=0 for a 4×4 matrix A, then Ax=b has no solution for some b.
Solution
True. detA=0 means A is not invertible, so the rank is less than 4, so the column space is a proper subspace of R4 and some b lies outside it (and for b in it, there are infinitely many solutions).
useMidterm 2 (2013 practice) Q1(a), (d)
Let A=123202022. Compute detA and the cofactor matrix, and check A(cofA)T.
Solution
Expand along row 1: detA=1⋅(0⋅2−2⋅2)−2⋅(2⋅2−2⋅3)+0=−4+4=0. The cofactors are C11=−4, C12=−(4−6)=2, C13=4−0=4; C21=−(4−0)=−4, C22=2−0=2, C23=−(2−6)=4; C31=4−0=4, C32=−(2−0)=−2, C33=0−4=−4. So cofA=−4−4422−244−4. Multiplying out, A(cofA)T is the zero matrix, which equals (detA)I=O. (This is the identity from the cofactor theorem, which holds even when detA=0. It cannot give an inverse here, since there is none.)
usePractice Final 2013 Q1(b)
Compute det214130305.
Solution
Expand along row 1: 2(3⋅5−0⋅0)−1(1⋅5−0⋅4)+3(1⋅0−3⋅4)=30−5−36=−11. Check by column 3 (which has a 0): 3⋅det[1430]−0+5det[2113]=3(−12)+5(5)=−36+25=−11.
useSpagnolie Lecture 12 example; Cramer's rule
Use Cramer’s rule to solve 2x+y+z=5, 4x−6y=−2, −2x+7y+2z=9.
Solution
detA=det24−21−67102. Expand along row 2: −4det[1712]+(−6)det[2−212]=−4(2−7)−6(4+2)=20−36=−16. (The pivots 2,−8,1 of Lecture 12 multiply to −16, as they should.) Replacing columns by b=(5,−2,9) gives determinants −16, −16 and −32, so x=1, y=1, z=2. These match the elimination answer (1,1,2).
use
The rows of a 3×3 matrix A are R1,R2,R3 and detA=4. Find the determinant of the matrix with rows R1+R2, R2+R3, R3+R1.
Solution
The new matrix is MA with M=101110011. detM=1(1−0)−1(0−1)+0=2. By the product rule the answer is 2⋅4=8. (Check by expanding with multilinearity: the eight terms have only two without a repeated row, namely d(R1,R2,R3) and d(R2,R3,R1), each equal to 4 because a cyclic shift of three rows is two swaps. Total 8.)
prove
Prove that if a square matrix has a column of zeros, its determinant is 0.
Solution
The transpose has a row of zeros, so by part (1) of the lemma detAT=0. By the transpose theorem detA=detAT=0.
proveMidterm 2 (2013 practice) Q6
Let G be the set of n×n matrices with detA=1. Prove that if A,B∈G then AB∈G, and if A∈G then A is invertible and A−1∈G. (So G, the special linear group, is a group.)
Solution
Product rule: det(AB)=detAdetB=1⋅1=1, so AB∈G. If detA=1=0 then A is invertible by the invertibility theorem, and det(A−1)=1/detA=1, so A−1∈G. Also I∈G since detI=1.
proveApostol 3.11 #2(a); MATH 375 HW9
Prove that for square blocks A, B, C, detAOOOBOOOC=detAdetBdetC.
Solution
Group the last two blocks: the matrix is [AOOD] with D=[BOOC]. The block-diagonal theorem gives detAdetD, and applying it again to D gives detD=detBdetC. So the determinant is detAdetBdetC.
prove
Let A be an n×n matrix with integer entries and detA=±1. Prove that A−1 also has integer entries.
Solution
Since detA=0, A−1=detA1(cofA)T. Each cofactor is ± a determinant of a smaller integer matrix, and a determinant of an integer matrix is an integer (it is a sum of products of integers, by the permutation formula). Dividing by detA=±1 keeps every entry an integer. For example A=[3423] has detA=1 and A−1=[3−4−23].
provePractice Final 2013 Q3(a), (b)
Let A be a real n×n matrix with A2=−I. Prove that A is invertible and n is even.
Solution
A(−A)=−A2=I, so −A is an inverse of A and A is invertible. Taking determinants, (detA)2=det(A2)=det(−I)=(−1)ndetI=(−1)n. The left side is the square of a real number, so it is at least 0; hence (−1)n=1 and n is even.
stretchApostol 3.6 #4(d); MATH 375 HW8 (corrected)
Let Dn(a) be the determinant of the n×n tridiagonal matrix with a on the diagonal, super-diagonal entries s1,s2,… and sub-diagonal entries t1,t2,…. Prove Dn=aDn−1−sn−1tn−1Dn−2. Then compute the 5×5 case with rows (a,1,0,0,0), (4,a,2,0,0), (0,3,a,3,0), (0,0,2,a,4), (0,0,0,1,a).
Solution
Here s=(1,2,3,4) and t=(4,3,2,1). Expand along the last row, which has only two non-zero entries tn−1 (column n−1) and a (column n). The entry a has minor equal to the top-left (n−1)×(n−1) tridiagonal matrix, contributing aDn−1. The entry tn−1 at position (n,n−1) has sign (−1)2n−1=−1. Its minor deletes row n and column n−1; its last column is (0,…,0,sn−1), with the single non-zero entry sn−1 at the bottom and the rest of the matrix being the top-left (n−2)×(n−2) tridiagonal block. Expanding that minor along its last column gives sn−1Dn−2. So Dn=aDn−1−tn−1sn−1Dn−2. The products sktk are 4,6,6,4. Then D1=a, D2=a2−4, D3=a(a2−4)−6a=a3−10a, D4=a(a3−10a)−6(a2−4)=a4−16a2+24, D5=a(a4−16a2+24)−4(a3−10a)=a5−20a3+64a. (The posted solution key prints a5−20a3+64; the final term is missing the factor a. A check: at a=0 the recurrence gives D1=0 and Dn=−sn−1tn−1Dn−2, so every odd Dn is 0. Only the corrected formula gives D5(0)=0.)
stretchApostol 3.6 #6; MATH 375 HW8
Let f1,f2,g1,g2 be differentiable and F(x)=det[f1g1f2g2]. Prove F′=det[f1′g1f2′g2]+det[f1g1′f2g2′]. Then prove the same for an n×n matrix of differentiable functions: the derivative is the sum of n determinants, each with one row differentiated.
Solution
For 2×2: F=f1g2−f2g1, so by the product rule F′=f1′g2+f1g2′−f2′g1−f2g1′=(f1′g2−f2′g1)+(f1g2′−f2g1′), which are the two determinants. For n×n, use the permutation formula: F=∑σsgnσ∏iaiσ(i)(x). The product rule for a product of n functions gives dxd∏iaiσ(i)=∑k=1nakσ(k)′∏i=kaiσ(i). Swap the order of the two sums: for each fixed k, ∑σsgnσakσ(k)′∏i=kaiσ(i) is the permutation formula for the matrix with row k replaced by its derivative. So F′ is the sum over k of those n determinants. Spagnolie’s marginal note: dxddetA(x) is not detA′(x), which is “more complicated”.
Summary
The determinant is the signed volume scale factor of a square matrix. For 2×2 it is ad−bc, the signed area of the parallelogram on the columns. The orientation flips when it is negative.
Four axioms (scales in each row, adds in each row, zero for equal rows, detI=1) pin it down uniquely. From them: a row swap changes the sign, adding a multiple of a row changes nothing, and dependent rows give 0.
To compute: row reduce to triangular form and multiply the diagonal, with (−1) for each swap and a division for each scaling. For small or sparse matrices, expand by cofactors along a row or column with zeros, using the checkerboard signs.
detA=0 exactly when A is invertible, exactly when the rows (equivalently columns) are independent. This is one more line in the invertible matrix theorem.
Product rule: det(AB)=detAdetB, proved by fixing B and applying uniqueness to A↦det(AB). So detA−1=1/detA and detAk=(detA)k. Not additive: det(A+B)=detA+detB, and det(cA)=cndetA.
detAT=detA, so column operations and column expansions work too.
The cofactor matrix gives A−1=detA1(cofA)T and Cramer’s rule xj=detAj(b)/detA. Both are formulas for proofs, not for computing.
Existence comes from the permutation formula, a sum of n! signed products with one entry from each row and column. The Jacobian determinant is the area factor of a change of variables, which returns in Unit 6.
Watch and read
The same ideas explained by someone else. Use these when an explanation here does not land.
MATH 234: The Jacobian determinant is the factor by which a change of variables scales area or volume. The polar-coordinates area element r dr d-theta is a 2 by 2 determinant, as shown below.
CS 532: Nobody computes a determinant by cofactor expansion in numerical code, because it takes about n factorial steps. Elimination (LU) gives it in about n cubed over 3, and it is the product of the pivots with a sign for the row swaps.
MATH 541: The product rule says that det is a group homomorphism from the invertible matrices to the non-zero reals. Its kernel is the group of matrices with determinant 1, the special linear group.
AI: The density of a Gaussian in n dimensions contains the determinant of its covariance matrix, and normalizing flows in generative models track the log of a Jacobian determinant at every layer.