Survey of Mathematics

2.7 Determinants

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.

Before you start

2.6: row operations, elementary matrices and the invertible matrix theorem. 2.5: matrix multiplication and the transpose. 2.2: linear independence.

Quick checkA 3×33 \times 3 matrix has only 2 pivots after row reduction. Is it invertible?
Quick checkWhich row operation can change the solutions of a system of equations?
Quick checkFor matrices AA and BB, which row of ABAB is built from row ii of AA?
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.

mapmatrixad−bcad - bcwhat happens to area
Shear[1101]\begin{bmatrix}1&1\\0&1\end{bmatrix}11kept, orientation kept
Stretch[20012]\begin{bmatrix}2&0\\0&\frac12\end{bmatrix}11kept: 22 times longer, half as wide
Reflect[0110]\begin{bmatrix}0&1\\1&0\end{bmatrix}−1-1kept, orientation flipped (square turns red)
Eigen example[3102]\begin{bmatrix}3&1\\0&2\end{bmatrix}66every area multiplied by 66
Squash to a line[12121]\begin{bmatrix}1&2\\ \frac12&1\end{bmatrix}00everything flattened to a line, area 00

The number in the third column is the determinant. For the matrix with columns (a,c)(a, c) and (b,d)(b, d), it equals ad−bcad - 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 ı^\hat\imath to ȷ^\hat\jmath is a counterclockwise quarter turn. If the images of ı^\hat\imath and ȷ^\hat\jmath 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−bcad - bc. When the determinant is 00 the plane is squashed, there is a whole line of inputs sent to OO, and the matrix cannot be inverted. That is the link with chapter 2.6.

The idea, in words

Why ad−bcad - bc is the area. Take the parallelogram with vertices OO, (a,c)(a, c), (a+b,c+d)(a + b, c + d), (b,d)(b, d), and suppose a,b,c,d≥0a, b, c, d \ge 0 and ad≥bcad \ge bc so that it sits as in the picture. It fits in a rectangle of width a+ba + b and height c+dc + d. The corners cut off are two triangles of area 12ac\frac12ac (below and above) and two triangles of area 12bd\frac12bd (left and right), and two rectangles of area bcbc each. So

area=(a+b)(c+d)−ac−bd−2bc=ad−bc.\text{area} = (a + b)(c + d) - ac - bd - 2bc = ad - bc.

This is the picture proof for one case. Below we prove ad−bcad - 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⁡\det. By linearity it sends each little grid square of side hh to a parallelogram of area h2det⁡h^2 \det, translated. Any region is close to a union of little grid squares, so its area is multiplied by det⁡\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.

  1. Find the area factor. det⁡[2113]=2⋅3−1⋅1=5\det\begin{bmatrix}2&1\\1&3\end{bmatrix} = 2\cdot3 - 1\cdot1 = 5. The determinant is the factor by which the map multiplies every area.
  2. Find the original area. The triangle has base 11 and height 11, so its area is 12\tfrac12. We need a region whose area we know before the map acts on it.
  3. Multiply. The image has area 5⋅12=525\cdot\tfrac12 = \tfrac52. Every region is scaled by the same number det⁡\det, as argued above.
  4. Read the sign. 5>05 > 0, so orientation is kept. A negative determinant would mean the plane was turned over.
  5. Check directly. The vertices go to (0,0)(0, 0), (2,1)(2, 1) (the first column) and (1,3)(1, 3) (the second column). The area of the triangle on OO, (2,1)(2, 1), (1,3)(1, 3) is 12∣2⋅3−1⋅1∣=52\tfrac12\lvert 2\cdot3 - 1\cdot1\rvert = \tfrac52. A triangle on OO, uu, vv is half of the parallelogram on uu and vv, so its area is half of ∣det⁡∣\lvert\det\rvert of the two vectors.

Answer. The image has area 52\tfrac52, and orientation is kept.

Your answerThe matrix [3142]\begin{bmatrix}3&1\\4&2\end{bmatrix} is applied to a disk of area π\pi. What is the area of the image (an ellipse)?

Which rules does signed area obey? Let d(A1,…,An)d(A_1, \dots, A_n) be the signed volume of the box whose edges are the rows A1,…,AnA_1, \dots, A_n. (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:

  1. Stretch one edge by tt, and the volume is multiplied by tt.
  2. Volume adds in one edge. If edge AkA_k is replaced by Ak+CA_k + C, the box is the box with edge AkA_k plus the box with edge CC. The two boxes sit side by side and share all the other edges (Apostol’s Figure 3.2).
  3. Two equal edges give a flat box, volume 00.
  4. The unit cube has volume 11.
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 II 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+3R2R_1 \to R_1 + 3R_2 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 det⁡A=A1⋅(A2×A3)\det A = A_1 \cdot (A_2 \times A_3): the volume of the box spanned by the three rows is the area of the base ∣A2×A3∣|A_2 \times A_3| 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∈RnA_1, \dots, A_n \in \mathbb R^n be the rows of a matrix AA, and write d(A)=d(A1,…,An)d(A) = d(A_1, \dots, A_n). A function dd is a determinant function if, for all rows and scalars tt:

  1. Homogeneous in each row. d(…,tAk,… )=t d(…,Ak,… )d(\dots, tA_k, \dots) = t\,d(\dots, A_k, \dots).
  2. Additive in each row. d(…,Ak+C,… )=d(…,Ak,… )+d(…,C,… )d(\dots, A_k + C, \dots) = d(\dots, A_k, \dots) + d(\dots, C, \dots).
  3. Zero if two rows are equal. d(A1,…,An)=0d(A_1, \dots, A_n) = 0 whenever Ai=AjA_i = A_j for some i≠ji \ne j.
  4. Normalised. d(e1,…,en)=1d(e_1, \dots, e_n) = 1, where eke_k is the kk-th row of the identity matrix (a 11 in position kk, zeros elsewhere). So d(I)=1d(I) = 1.

Axioms 1 and 2 together say dd 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)d(A_1, \dots, A_n) of the rows of an n×nn \times n matrix that scales in each row, adds in each row, vanishes when two rows are equal, and equals 11 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 dd exists, then”.) The first four consequences use only axioms 1 to 3.

Lemma T Apostol Thm 3.1; Spagnolie Lecture 14 page 3

What the first three axioms force on the rows

Let FF satisfy Axioms 1, 2 and 3. Then:

  1. F=0F = 0 if some row is zero.
  2. Swapping two rows multiplies FF by −1-1.
  3. Adding a multiple of one row to a different row leaves FF unchanged.
  4. F=0F = 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,… )=0F(\dots, O, \dots) = F(\dots, 0 \cdot O, \dots) = 0 \cdot F(\dots, O, \dots) = 0.
Axiom 1 with t=0t = 0: the zero row is 0⋅Ak0 \cdot A_k.
(2) Consider rows ii and jj and put Ai+AjA_i + A_j 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)F(A_i + A_j,\ A_i + A_j) = F(A_i, A_i) + F(A_i, A_j) + F(A_j, A_i) + F(A_j, A_j).
Axiom 2 in the ii-th and then the jj-th row expands the product of sums into four terms.
The left side and the first and last terms on the right are 00. So 0=F(Ai,Aj)+F(Aj,Ai)0 = F(A_i, A_j) + F(A_j, A_i), that is, F(…Ai…Aj… )=−F(…Aj…Ai… )F(\dots A_i \dots A_j \dots) = -F(\dots A_j \dots A_i \dots).
Axiom 3: the left side has two equal rows, and so do F(Ai,Ai)F(A_i, A_i) and F(Aj,Aj)F(A_j, A_j).
(3) F(…,Aj+cAi,…,Ai,… )=F(…,Aj,…,Ai,… )+c F(…,Ai,…,Ai,… )F(\dots, A_j + cA_i, \dots, A_i, \dots) = F(\dots, A_j, \dots, A_i, \dots) + c\,F(\dots, A_i, \dots, A_i, \dots).
Axiom 2 in row jj, then Axiom 1 to pull out cc.
The second term is 00, so FF is unchanged.
Axiom 3: the second term has two equal rows.
(4) Some row is a combination of the others: Ai=∑k≠ibkAkA_i = \sum_{k \ne i} b_kA_k with bk=−ck/cib_k = -c_k/c_i.
Dependent means some combination ∑kckAk=O\sum_k c_kA_k = O has a non-zero coefficient, say ci≠0c_i \ne 0. Divide by cic_i and move the other terms across.
F(…,∑k≠ibkAk,… )=∑k≠ibk F(…,Ak,… )F(\dots, \sum_{k \ne i}b_kA_k, \dots) = \sum_{k \ne i}b_k\,F(\dots, A_k, \dots), where AkA_k sits in position ii.
Axioms 1 and 2 expand a sum in one row.
Every term is 00, so F=0F = 0.
Each remaining term has the row AkA_k in position ii and also in position kk, 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.

  1. F(Ai+Aj, Ai+Aj)=F(Ai,Ai)+F(Ai,Aj)+F(Aj,Ai)+F(Aj,Aj)F(A_i + A_j,\ A_i + A_j) = F(A_i, A_i) + F(A_i, A_j) + F(A_j, A_i) + F(A_j, A_j) (only rows ii and jj written).
  2. The left side, F(Ai,Ai)F(A_i, A_i) and F(Aj,Aj)F(A_j, A_j) are all 00.
  3. So 0=F(Ai,Aj)+F(Aj,Ai)0 = F(A_i, A_j) + F(A_j, A_i).
  4. So F(Ai,Aj)=−F(Aj,Ai)F(A_i, A_j) = -F(A_j, A_i): swapping two rows multiplies FF by −1-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 ı^\hat\imath and ȷ^\hat\jmath 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+cAiA_j + cA_i, 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×33 \times 3 matrix has determinant 77. What is the determinant after swapping two of its rows?
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.

  1. Name the old rows. A1=(x,y,z)A_1 = (x, y, z), A2=(3,0,2)A_2 = (3, 0, 2), A3=(1,1,1)A_3 = (1, 1, 1), so d(A1,A2,A3)=1d(A_1, A_2, A_3) = 1. We are told this number, so everything should be expressed through it.
  2. Name the new rows in terms of the old. B1=A1B_1 = A_1, B2=3A1+A2=(3x+3,3y,3z+2)B_2 = 3A_1 + A_2 = (3x + 3, 3y, 3z + 2) and B3=A1+A3=(x+1,y+1,z+1)B_3 = A_1 + A_3 = (x + 1, y + 1, z + 1). Compare each new row with the old rows entry by entry; the pattern shows which operation was done.
  3. Recognise the operations. Row 2 became (row 2) +3×+ 3\times(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.
  4. Conclude. The new determinant equals the old one.

Answer. 11.

Uniqueness and how to compute

Theorem T Apostol Thm 3.2; Spagnolie Lecture 15 page 1

Axioms 1 to 3 force a multiple of the determinant

Suppose a determinant function dd exists. If FF is any function of the rows of an n×nn \times n matrix satisfying Axioms 1, 2 and 3, then for every AA

F(A)=d(A) F(I).F(A) = d(A)\,F(I).

In one lineIf dd is a determinant function and FF satisfies only Axioms 1 to 3, then F(A)=d(A) F(I)F(A) = d(A)\,F(I) for every AA.

Why it is trueRow operations are the only tool needed to reduce AA to II, and each one changes FF and dd 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 FF by a non-zero number, and multiplies dd by the same number.
Lemma: swap multiplies by −1-1, scaling a row by cc multiplies by cc (Axiom 1), adding a multiple multiplies by 11. The factors depend on the operation, not on FF.
Reduce AA to its RREF RR by row operations, and let φ\varphi be the product of all the factors. Then F(R)=φF(A)F(R) = \varphi F(A) and d(R)=φ d(A)d(R) = \varphi\,d(A), with φ≠0\varphi \ne 0.
Gauss–Jordan (chapter 2.6): every matrix reduces to reduced row echelon form RR.
Case 1: R=IR = I. Then F(A)=F(I)/φF(A) = F(I)/\varphi and d(A)=d(I)/φ=1/φd(A) = d(I)/\varphi = 1/\varphi by Axiom 4. So F(A)=d(A)F(I)F(A) = d(A)F(I).
An n×nn \times n RREF with nn pivots is II (2.6).
Case 2: R≠IR \ne I. Then F(R)=0=d(R)F(R) = 0 = d(R), so F(A)=F(R)/φ=0F(A) = F(R)/\varphi = 0, and likewise d(A)=0d(A) = 0. Again F(A)=d(A)F(I)F(A) = d(A)F(I).
A square RREF with fewer than nn pivots has a zero row. Then the lemma, part (1), gives 00 for both FF and dd.
Corollary T Apostol Thm 3.2; Spagnolie Lecture 14 page 5

The determinant is unique

If dd and FF both satisfy Axioms 1 to 4, then F=dF = 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)=1F(I) = 1, so the theorem gives F=dF = d.

ProofSpagnolie Lecture 15
The idea: Apply the previous theorem to F, and use Axiom 4 for F.
F(A)=d(A)F(I)F(A) = d(A)F(I) for every AA.
Previous theorem with FF.
F(I)=1F(I) = 1, so F(A)=d(A)F(A) = d(A).
Axiom 4 holds for FF too.
Definition T

Determinant

The determinant det⁡A\det A of a square matrix AA is the value at AA 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 det⁡A=0\det A = 0.

In one lineThe unique function of the rows of a square matrix satisfying the four axioms. Written det⁡A\det A or ∣A∣|A|. For a 2×22 \times 2 matrix it is ad−bcad - 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 T Apostol 3.4; Spagnolie Lecture 14 page 4

Determinant of a triangular matrix

If UU is upper triangular (all entries below the diagonal are 00) or lower triangular, then det⁡U=u11u22⋯unn\det U = u_{11}u_{22}\cdots u_{nn}. In particular det⁡I=1\det I = 1 and det⁡diag⁡(λ1,…,λn)=λ1⋯λn\det\operatorname{diag}(\lambda_1, \dots, \lambda_n) = \lambda_1\cdots\lambda_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≠0u_{ii} \ne 0. Clear all the entries above the diagonal, working upwards. The determinant is unchanged and the matrix becomes diag⁡(u11,…,unn)\operatorname{diag}(u_{11}, \dots, u_{nn}).
Take UU upper triangular; the lower triangular case is the same with rows from the top. If all uii≠0u_{ii} \ne 0, start at the bottom row and use it to clear the entries above unnu_{nn}. These are 'add a multiple' operations, which leave det⁡\det unchanged.
Pull uiiu_{ii} out of row ii for each ii: det⁡=u11⋯unn⋅det⁡I=u11⋯unn\det = u_{11}\cdots u_{nn}\cdot\det I = u_{11}\cdots u_{nn}.
Axiom 1 applied to each row in turn, then Axiom 4.
Case 2: some ukk=0u_{kk} = 0. The rows k,k+1,…,nk, k + 1, \dots, n are n−k+1n - k + 1 vectors, all in the span of ek+1,…,ene_{k+1}, \dots, e_n.
Let kk be the first index with ukk=0u_{kk} = 0. Row kk has zeros in columns 11 to kk, and rows k+1,…,nk + 1, \dots, n also have zeros in columns 11 to kk.
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+1n - k + 1 vectors in a space spanned by n−kn - k vectors.
det⁡U=0\det U = 0, and the product u11⋯unnu_{11}\cdots u_{nn} contains the factor ukk=0u_{kk} = 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 det⁡L=0\det L = 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 LL is lower triangular and lkk=0l_{kk} = 0, then rows 1,…,k1, \dots, k all have zeros in columns k,…,nk, \dots, n, so they are kk vectors in the span of e1,…,ek−1e_1, \dots, e_{k-1}.
Your answerFind det⁡[2570−31004]\det\begin{bmatrix}2&5&7\\0&-3&1\\0&0&4\end{bmatrix}.
Theorem T Apostol 3.4; Spagnolie Lecture 14 page 5

Determinant by row reduction

Suppose AA is turned into an upper triangular matrix UU by pp swaps, scalings of rows by non-zero numbers c1,…,cqc_1, \dots, c_q, and any number of additions of multiples of rows to other rows. Then

det⁡A=(−1)p (c1c2⋯cq)−1 u11u22⋯unn.\det A = (-1)^p\,(c_1c_2\cdots c_q)^{-1}\,u_{11}u_{22}\cdots u_{nn}.

In one lineIf row operations turn AA into an upper triangular UU using pp swaps and scalings by c1,…,cqc_1, \dots, c_q, then det⁡A=(−1)p(c1⋯cq)−1u11⋯unn\det A = (-1)^p(c_1\cdots c_q)^{-1}u_{11}\cdots u_{nn}.

Why it is trueEach swap multiplies the determinant by −1-1, each scaling by cc multiplies it by cc, 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-1, each scaling by cic_i multiplies it by cic_i, each addition multiplies it by 11.
Lemma parts (2) and (3) and Axiom 1.
So det⁡U=(−1)pc1⋯cq det⁡A\det U = (-1)^p c_1\cdots c_q\,\det A.
Combine all the factors.
det⁡A=(−1)p(c1⋯cq)−1det⁡U=(−1)p(c1⋯cq)−1u11⋯unn\det A = (-1)^p(c_1\cdots c_q)^{-1}\det U = (-1)^p(c_1\cdots c_q)^{-1}u_{11}\cdots u_{nn}.
Triangular theorem, then solve for det⁡A\det A (the cic_i 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.

  1. Choose a first pivot of 1. Swap rows 1 and 2. The determinant of the new matrix is −det⁡A-\det A. A swap multiplies by −1-1. The leading 1 avoids fractions.
  2. Clear column 1. R2→R2−2R1R_2 \to R_2 - 2R_1 and R3→R3−R1R_3 \to R_3 - R_1. Adding a multiple of another row does not change the determinant.
  3. Clear column 2 below the pivot. R3→R3−47R2R_3 \to R_3 - \tfrac47R_2. Same reason. Now the matrix is upper triangular.
  4. Multiply the diagonal. 1⋅(−7)⋅67=−61 \cdot (-7) \cdot \tfrac67 = -6. Determinant of a triangular matrix.
  5. Undo the swap. The swapped matrix has determinant −6-6, so det⁡A=−(−6)=6\det A = -(-6) = 6. Step 1 said the swapped matrix has determinant −det⁡A-\det A.

Answer. det⁡A=6\det A = 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.

  1. Pull a 3 out of row 1. Row 1 is 3 (1,0,2)3\,(1, 0, 2), so det⁡A=3 det⁡[102506−142]\det A = 3\,\det\begin{bmatrix}1&0&2\\5&0&6\\-1&4&2\end{bmatrix}. Axiom 1 in reverse. This is the step people forget to undo.
  2. Clear column 1. R2→R2−5R1R_2 \to R_2 - 5R_1 gives (0,0,−4)(0, 0, -4). R3→R3+R1R_3 \to R_3 + R_1 gives (0,4,4)(0, 4, 4). Adding multiples of row 1; no change.
  3. Swap rows 2 and 3. This gives the upper triangular [10204400−4]\begin{bmatrix}1&0&2\\0&4&4\\0&0&-4\end{bmatrix} and puts a factor −1-1 in front. A swap flips the sign.
  4. Multiply the diagonal. det⁡A=3⋅(−1)⋅(1⋅4⋅(−4))=3⋅(−1)⋅(−16)=48\det A = 3\cdot(-1)\cdot(1\cdot4\cdot(-4)) = 3\cdot(-1)\cdot(-16) = 48. The factor 33 from step 1, the sign from the swap, and the triangular product.
  5. Check by another method. Expand down column 2, which has a single non-zero entry 44 in position (3,2)(3, 2) with sign (−1)3+2=−1(-1)^{3+2} = -1: −4det⁡[3656]=−4(18−30)=48-4\det\begin{bmatrix}3&6\\5&6\end{bmatrix} = -4(18 - 30) = 48. Two independent methods agree, so the factor of 33 and the swap sign were both handled correctly.
  6. A warning from the lecture notes. The notes print the matrix with third column (8,7,2)(8, 7, 2) but then compute with (6,6,2)(6, 6, 2). For the printed matrix the same column expansion gives −4 (3⋅7−8⋅5)=−4(−19)=76-4\,(3\cdot7 - 8\cdot5) = -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−1A^{-1} exists holds both ways.

Answer. 4848 (and 7676 for the matrix as printed in the notes).

Quick checkYou divide row 2 of a matrix by 55 to make the numbers smaller, then row reduce the new matrix and find its determinant is 1212. What is the determinant of the original matrix?
Theorem T Apostol Thms 3.5, 3.6 and 3.13; Spagnolie Lecture 14 page 3

A matrix is invertible exactly when its determinant is non-zero

For an n×nn \times n matrix AA, the following are equivalent: det⁡A≠0\det A \ne 0; AA is invertible; the rows of AA are linearly independent; the columns of AA are linearly independent.

In one lineFor a square matrix, det⁡A≠0\det A \ne 0 if and only if AA 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 II exactly when AA is invertible, and in that case the determinant is a product of non-zero factors.

ProofApostol 3.5, 3.9; Spagnolie Lecture 14 page 3
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.
det⁡A≠0\det A \ne 0 if and only if the RREF of AA is II.
In the uniqueness proof: the RREF RR satisfies d(R)=φ d(A)d(R) = \varphi\,d(A) with φ≠0\varphi \ne 0, and d(R)=d(I)=1d(R) = d(I) = 1 if R=IR = I, d(R)=0d(R) = 0 otherwise.
The RREF is II if and only if AA is invertible.
Invertible matrix theorem, condition 9 (2.6): nn pivots, RREF is II.
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 ATA^{\mathsf T} invertible, i.e. independent rows.

In the picture. “Squash to a line” has determinant 00: the orange square is flattened to a segment (area 00), 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×44 \times 4 matrix has two equal rows. Is it invertible?
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.

  1. Form the matrix. Put the three vectors as the rows of A=[111abca2b2c2]A = \begin{bmatrix}1&1&1\\a&b&c\\a^2&b^2&c^2\end{bmatrix}. Independent vectors correspond to a non-zero determinant (previous theorem), and rows or columns work equally well.
  2. Clear column 1 below the 1. R2→R2−aR1R_2 \to R_2 - aR_1 gives (0,b−a,c−a)(0, b - a, c - a), and R3→R3−a2R1R_3 \to R_3 - a^2R_1 gives (0,b2−a2,c2−a2)(0, b^2 - a^2, c^2 - a^2). Adding multiples of row 1: determinant unchanged.
  3. Clear the next entry. R3→R3−(b+a)R2R_3 \to R_3 - (b + a)R_2: the new third entry is (c2−a2)−(b+a)(c−a)=(c−a)(c+a−b−a)=(c−a)(c−b)(c^2 - a^2) - (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)=0b^2 - a^2 - (b+a)(b-a) = 0. Factor c2−a2=(c−a)(c+a)c^2 - a^2 = (c - a)(c + a) so that a factor (c−a)(c - a) appears.
  4. Multiply the diagonal. The triangular matrix has diagonal 1, b−a, (c−a)(c−b)1,\ b - a,\ (c - a)(c - b). So det⁡A=(b−a)(c−a)(c−b)\det A = (b - a)(c - a)(c - b). Triangular determinant.
  5. Decide. Since a,b,ca, b, c are distinct, all three factors are non-zero, so det⁡A≠0\det A \ne 0 and the vectors are independent.

Answer. Independent. This is the Vandermonde determinant; for numbers 1,2,31, 2, 3 it gives (2−1)(3−1)(3−2)=2≠0(2 - 1)(3 - 1)(3 - 2) = 2 \ne 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.

  1. Turn the problem into a determinant. The matrix is not invertible exactly when its determinant is 00. The theorem above: invertible if and only if det⁡≠0\det \ne 0. So we compute det⁡\det as a polynomial in kk and find its roots.
  2. Put a common factor into row 1. R1→R1+R2+R3R_1 \to R_1 + R_2 + R_3 gives (k+2, k+2, k+2)(k + 2,\ k + 2,\ k + 2). Each column adds to k+2k + 2. Adding multiples of other rows leaves det⁡\det unchanged, and now row 1 is a multiple of (1,1,1)(1, 1, 1).
  3. Pull the factor out. det⁡=(k+2)det⁡[1111k111k]\det = (k + 2)\det\begin{bmatrix}1&1&1\\1&k&1\\1&1&k\end{bmatrix}. Axiom 1 on row 1. It holds for every scalar, including k+2=0k + 2 = 0, so the identity is true for all kk.
  4. Clear column 1. R2→R2−R1R_2 \to R_2 - R_1 gives (0,k−1,0)(0, k - 1, 0) and R3→R3−R1R_3 \to R_3 - R_1 gives (0,0,k−1)(0, 0, k - 1). Adding multiples of row 1: no change. The matrix is now upper triangular.
  5. Multiply the diagonal. det⁡=(k+2)⋅1⋅(k−1)(k−1)=(k+2)(k−1)2\det = (k + 2)\cdot1\cdot(k - 1)(k - 1) = (k + 2)(k - 1)^2. Triangular determinant.
  6. Find the roots. det⁡=0\det = 0 when k=−2k = -2 or k=1k = 1. A product of numbers is 00 only if a factor is 00.
  7. Sanity check. For k=1k = 1 every entry is 11, so all rows are equal. For k=−2k = -2 each row adds up to 00, 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=1k = 1 and k=−2k = -2. In general det⁡=(k+2)(k−1)2\det = (k + 2)(k - 1)^2.

Your answerFor the matrix in the last example, what is det⁡\det when k=3k = 3?

The product rule

Picture first. The “Eigen example” map in the viewer below multiplies every area by 66. If we followed it by a map that multiplies areas by 22, the combination would multiply areas by 1212. In general, doing map BB and then map AA multiplies areas by det⁡B\det B and then by det⁡A\det A. The composite map has matrix ABAB (chapter 2.5). So the area factor of ABAB must be the product.

Theorem T Apostol Thm 3.4 (product formula); Spagnolie Lecture 15 page 2

Product rule for determinants

For n×nn \times n matrices AA and BB, det⁡(AB)=(det⁡A)(det⁡B)\det(AB) = (\det A)(\det B).

In one linedet⁡(AB)=det⁡A⋅det⁡B\det(AB) = \det A\cdot\det B for all n×nn \times n matrices.

Why it is trueFix BB. The function A↦det⁡(AB)A \mapsto \det(AB) obeys Axioms 1 to 3, so it is det⁡A\det A times its value at II, which is det⁡B\det B.

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 ii of ABAB is AiBA_iB, where AiA_i is row ii of AA.
Matrix multiplication (2.5): (AB)ij=∑kaikbkj(AB)_{ij} = \sum_k a_{ik}b_{kj}. So row ii of ABAB is ∑kaik (row k of B)\sum_k a_{ik}\,(\text{row } k \text{ of } B), which is (row ii of AA) times BB.
Fix BB and put F(A1,…,An)=det⁡(AB)=d(A1B,A2B,…,AnB)F(A_1, \dots, A_n) = \det(AB) = d(A_1B, A_2B, \dots, A_nB).
Define it.
FF satisfies Axiom 1.
x↦xBx \mapsto xB is linear: (tAk)B=t(AkB)(tA_k)B = t(A_kB). Then Axiom 1 for dd in row kk.
FF satisfies Axiom 2.
(Ak+C)B=AkB+CB(A_k + C)B = A_kB + CB. Then Axiom 2 for dd in row kk.
FF satisfies Axiom 3.
If Ai=AjA_i = A_j then AiB=AjBA_iB = A_jB, so ABAB has two equal rows, and dd is 00 by Axiom 3.
So F(A)=det⁡A⋅F(I)F(A) = \det A\cdot F(I).
The theorem 'Axioms 1 to 3 force a multiple of the determinant'.
F(I)=det⁡(IB)=det⁡BF(I) = \det(IB) = \det B. Hence det⁡(AB)=det⁡A det⁡B\det(AB) = \det A\,\det B.
IB=BIB = 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.

    Another way to say the same thing: for fixed invertible BB, the function A↦det⁡(AB)/det⁡BA \mapsto \det(AB)/\det B satisfies all four axioms, so it is det⁡\det. The proof above avoids the division and works even when det⁡B=0\det B = 0.

    Corollary T Apostol Thm 3.5; Spagnolie Lecture 14 page 6; Midterm 2 2013 Q5, Q6

    Consequences of the product rule

    For n×nn \times n matrices: if AA is invertible then det⁡A≠0\det A \ne 0 and det⁡(A−1)=1/det⁡A\det(A^{-1}) = 1/\det A. Also det⁡(Ak)=(det⁡A)k\det(A^k) = (\det A)^k for k≥1k \ge 1, det⁡(AB)=det⁡(BA)\det(AB) = \det(BA), and det⁡(cA)=cndet⁡A\det(cA) = c^n\det A for a scalar cc.

    In one linedet⁡(A−1)=1/det⁡A\det(A^{-1}) = 1/\det A, det⁡(Ak)=(det⁡A)k\det(A^k) = (\det A)^k, det⁡(AB)=det⁡(BA)\det(AB) = \det(BA), and det⁡(cA)=cndet⁡A\det(cA) = c^n\det A for an n×nn \times 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=det⁡I=det⁡(AA−1)=det⁡A det⁡(A−1)1 = \det I = \det(AA^{-1}) = \det A\,\det(A^{-1}). So det⁡A≠0\det A \ne 0 and det⁡(A−1)=1/det⁡A\det(A^{-1}) = 1/\det A.
    Product rule, and det⁡I=1\det I = 1.
    det⁡(Ak)=det⁡A⋅det⁡(Ak−1)=(det⁡A)k\det(A^k) = \det A\cdot\det(A^{k-1}) = (\det A)^k.
    Product rule, repeatedly (induction on kk).
    det⁡(AB)=det⁡Adet⁡B=det⁡Bdet⁡A=det⁡(BA)\det(AB) = \det A\det B = \det B\det A = \det(BA).
    Real numbers commute.
    det⁡(cA)=cndet⁡A\det(cA) = c^n\det A.
    cAcA is AA with every one of its nn rows multiplied by cc. Axiom 1 for each row gives a factor cc 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.

    1. (a) A nilpotent matrix is singular. Suppose Ap=OA^p = O for some p≥1p \ge 1. Then (det⁡A)p=det⁡(Ap)=det⁡O=0(\det A)^p = \det(A^p) = \det O = 0, so det⁡A=0\det A = 0. Corollary: det⁡(Ap)=(det⁡A)p\det(A^p) = (\det A)^p. A real number whose power is 00 is 00.
    2. (b) If det⁡B=2\det B = 2, find det⁡(B−8)\det(B^{-8}). det⁡(B−1)=12\det(B^{-1}) = \tfrac12, so det⁡(B−8)=(12)8=1256\det(B^{-8}) = (\tfrac12)^8 = \tfrac1{256}. First the inverse formula, then the power formula applied to B−1B^{-1}.
    3. (c) If AT=−AA^{\mathsf T} = -A and nn is odd, find det⁡A\det A. det⁡A=det⁡(AT)=det⁡(−A)=(−1)ndet⁡A=−det⁡A\det A = \det(A^{\mathsf T}) = \det(-A) = (-1)^n\det A = -\det A. So 2det⁡A=02\det A = 0 and det⁡A=0\det A = 0. Uses det⁡(AT)=det⁡A\det(A^{\mathsf T}) = \det A (theorem below) and det⁡(cA)=cndet⁡A\det(cA) = c^n\det A with c=−1c = -1.

    Answer. (a) det⁡A=0\det A = 0. (b) 1/2561/256. (c) 00.

    Your answerAA is a 3×33\times3 matrix with det⁡A=3\det A = 3. Find det⁡(2A−1)\det(2A^{-1}).
    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.

    1. Write the row operation as a matrix. Each row of BB is a combination of the rows of AA, so B=MAB = MA with M=[110011101]M = \begin{bmatrix}1&1&0\\0&1&1\\1&0&1\end{bmatrix}. Row ii of MAMA is (row ii of MM) times AA, which is the combination of the rows of AA with the weights in row ii of MM (matrix multiplication, 2.5).
    2. Find det⁡M\det M. Expand along column 1: 1⋅det⁡[1101]+1⋅det⁡[1011]=1+1=21\cdot\det\begin{bmatrix}1&1\\0&1\end{bmatrix} + 1\cdot\det\begin{bmatrix}1&0\\1&1\end{bmatrix} = 1 + 1 = 2. The entry 00 kills one term, and the entry in position (3,1)(3, 1) has sign ++.
    3. Apply the product rule. det⁡B=det⁡M⋅det⁡A=2⋅4=8\det B = \det M\cdot\det A = 2\cdot4 = 8. Product rule for determinants.
    4. Check by multilinearity. Expanding each row of BB into its two pieces gives 88 determinants. Six of them repeat a row and vanish. The other two are d(R1,R2,R3)=4d(R_1, R_2, R_3) = 4 and d(R2,R3,R1)=4d(R_2, R_3, R_1) = 4 (a cyclic shift of three rows is two swaps). Total 88. Axiom 2 splits sums in each row, Axiom 3 kills repeated rows, and each swap flips the sign.

    Answer. det⁡B=8\det B = 8.

    Quick checkdet⁡A=3\det A = 3 and det⁡B=−2\det B = -2 for 2×22 \times 2 matrices. What is det⁡(A+B)\det(A + B)?
    Theorem T Apostol Thm 3.11 (existence-free proof here); Spagnolie Lecture 15 page 5

    The determinant of the transpose

    For every n×nn \times n matrix AA, det⁡(AT)=det⁡A\det(A^{\mathsf T}) = \det A. Consequently the determinant also satisfies the four axioms with ‘row’ replaced by ‘column’, and column operations behave like row operations.

    In one linedet⁡AT=det⁡A\det A^{\mathsf T} = \det A. 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 EE, det⁡E\det E is −1-1, cc or 11 respectively.
    An elementary matrix is II with one row operation done. The operation multiplies det⁡\det by −1-1 (swap), cc (scale) or 11 (add), and det⁡I=1\det I = 1.
    ETE^{\mathsf T} is elementary of the same type, with the same determinant. So det⁡ET=det⁡E\det E^{\mathsf T} = \det E.
    A swap matrix and a diagonal scaling matrix are symmetric. The transpose of the 'add cc times row ii to row jj' matrix is the 'add cc times row jj to row ii' matrix, with determinant 11.
    Case 1: AA invertible. Then A=E1E2⋯EkA = E_1E_2\cdots E_k with each EiE_i elementary.
    Invertible matrix theorem (2.6), condition 10.
    AT=EkT⋯E1TA^{\mathsf T} = E_k^{\mathsf T}\cdots E_1^{\mathsf T}, so det⁡AT=∏det⁡EiT=∏det⁡Ei=det⁡A\det A^{\mathsf T} = \prod\det E_i^{\mathsf T} = \prod\det E_i = \det A.
    (XY)T=YTXT(XY)^{\mathsf T} = Y^{\mathsf T}X^{\mathsf T}, then the product rule, then commutativity of real multiplication.
    Case 2: AA not invertible. Then ATA^{\mathsf T} is not invertible.
    Row rank equals column rank (2.6): rank⁡AT=rank⁡A<n\operatorname{rank}A^{\mathsf T} = \operatorname{rank}A < n, so ATA^{\mathsf T} is not invertible either.
    det⁡AT=0=det⁡A\det A^{\mathsf T} = 0 = \det A.
    Previous theorem.
    Theorem A Apostol Thm 3.7; MATH 375 HW9 (3.11 #2a)

    Determinant of a block-diagonal matrix

    Let AA be p×pp \times p and BB be q×qq \times q. Then the (p+q)×(p+q)(p + q) \times (p + q) matrix [AOOB]\begin{bmatrix}A&O\\O&B\end{bmatrix} has determinant det⁡A⋅det⁡B\det A\cdot\det B.

    In one lineFor square blocks AA and BB, det⁡[AOOB]=det⁡A⋅det⁡B\det\begin{bmatrix}A&O\\O&B\end{bmatrix} = \det A\cdot\det B.

    Why it is trueAs a function of the rows of AA, 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]F(A) = \det\begin{bmatrix}A&O\\O&B\end{bmatrix} with BB fixed. FF satisfies Axioms 1, 2 and 3 as a function of the rows of AA.
    Rows 1,…,p1, \dots, p of the big matrix are the rows of AA followed by qq zeros. Scaling or adding in such a row is scaling or adding in the row of AA, and equal rows of AA give equal rows of the big matrix.
    F(A)=det⁡A⋅F(Ip)=det⁡A⋅det⁡[IpOOB]F(A) = \det A\cdot F(I_p) = \det A\cdot\det\begin{bmatrix}I_p&O\\O&B\end{bmatrix}.
    Theorem 'Axioms 1 to 3 force a multiple of the determinant', in dimension pp.
    So G(B)=det⁡B⋅G(Iq)G(B) = \det B\cdot G(I_q).
    Same argument: G(B)=det⁡[IpOOB]G(B) = \det\begin{bmatrix}I_p&O\\O&B\end{bmatrix} obeys Axioms 1 to 3 in the rows of BB.
    G(Iq)=1G(I_q) = 1. Hence det⁡[AOOB]=det⁡Adet⁡B\det\begin{bmatrix}A&O\\O&B\end{bmatrix} = \det A\det B.
    [IpOOIq]=Ip+q\begin{bmatrix}I_p&O\\O&I_q\end{bmatrix} = I_{p+q} has determinant 11.

    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×nn \times n determinant to nn determinants of size n−1n - 1.

    Definition T

    Minor

    For an n×nn \times n matrix AA with n≥2n \ge 2, the (k,j)(k, j) minor is the (n−1)×(n−1)(n - 1) \times (n - 1) matrix AkjA_{kj} obtained by deleting row kk and column jj of AA. (Spagnolie: “kill the kk-th row and the jj-th column”.)

    In one lineThe matrix AkjA_{kj} obtained from AA by deleting row kk and column jj.

    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 akja_{kj} is Ckj=(−1)k+jdet⁡AkjC_{kj} = (-1)^{k+j}\det A_{kj}. The signs follow a checkerboard, starting with ++ in the top left corner: [+−+⋯−+−⋯+−+⋯]\begin{bmatrix}+&-&+&\cdots\\-&+&-&\cdots\\+&-&+&\cdots\end{bmatrix}.

    In one lineThe number Ckj=(−1)k+jdet⁡AkjC_{kj} = (-1)^{k+j}\det A_{kj}: 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 T Apostol Thms 3.8 and 3.9; Spagnolie Lecture 15 pages 3 and 4

    Expansion by cofactors

    Let AA be n×nn \times n with n≥2n \ge 2, and assume determinants of size n−1n - 1 exist. For every row kk,

    det⁡A=∑j=1nakj Ckj=∑j=1n(−1)k+jakjdet⁡Akj.\det A = \sum_{j=1}^n a_{kj}\,C_{kj} = \sum_{j=1}^n(-1)^{k+j}a_{kj}\det A_{kj}.

    For every column jj, det⁡A=∑k=1n(−1)k+jakjdet⁡Akj\det A = \sum_{k=1}^n(-1)^{k+j}a_{kj}\det A_{kj}.

    In one lineFor any row kk: det⁡A=∑j=1nakjCkj\det A = \sum_{j=1}^n a_{kj}C_{kj}. The same holds along any column.

    Why it is trueWrite row kk as a combination of the identity rows eje_j. By linearity the determinant splits into nn 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.
    det⁡A=∑jakj Dj\det A = \sum_j a_{kj}\,D_j, where DjD_j is the determinant of AA with row kk replaced by eje_j.
    Row kk equals ∑jakjej\sum_j a_{kj}e_j, where eje_j is the jj-th row of the identity. Axioms 1 and 2 pull sums and scalars out of a single row.
    In DjD_j, subtract multiples of row kk from the other rows so that column jj is zero except for the 11 in row kk.
    Because row kk is now eje_j (a 11 in column jj, zeros elsewhere), subtracting aija_{ij} times row kk from row ii clears column jj and changes no other entry. Adding multiples of a row does not change det⁡\det.
    Move row kk to the top by k−1k - 1 adjacent swaps: a factor (−1)k−1(-1)^{k-1}. The matrix now has first row eje_j and below it the rows of AkjA_{kj} with a 00 inserted in position jj.
    Each swap of adjacent rows multiplies by −1-1.
    By the theorem ‘Axioms 1 to 3 force a multiple of the determinant’ (in dimension n−1n - 1), g(B)=det⁡B⋅g(In−1)g(B) = \det B\cdot g(I_{n-1}).
    For an (n−1)×(n−1)(n-1) \times (n-1) matrix BB, let g(B)g(B) be the determinant of the n×nn \times n matrix with first row eje_j and below it the rows of BB with a 00 inserted in position jj. Inserting a zero is linear, and equal rows of BB stay equal, so gg obeys Axioms 1 to 3 in the rows of BB.
    g(In−1)=(−1)j−1g(I_{n-1}) = (-1)^{j-1}.
    The matrix g(In−1)g(I_{n-1}) has rows ej,e1,…,ej−1,ej+1,…,ene_j, e_1, \dots, e_{j-1}, e_{j+1}, \dots, e_n. Move the first row down j−1j - 1 places by adjacent swaps to reach II.
    Dj=(−1)k−1(−1)j−1det⁡Akj=(−1)k+jdet⁡Akj=CkjD_j = (-1)^{k-1}(-1)^{j-1}\det A_{kj} = (-1)^{k+j}\det A_{kj} = C_{kj}. So det⁡A=∑jakjCkj\det A = \sum_j a_{kj}C_{kj}.
    Combine the signs from the swaps in the two earlier steps.
    The column version follows from the transpose theorem.
    Expanding along column jj of AA is expanding along row jj of ATA^{\mathsf T}, and det⁡AT=det⁡A\det A^{\mathsf T} = \det A.

    In the picture. For n=3n = 3 the expansion along row 1 is Spagnolie’s formula det⁡A=A1⋅(A2×A3)\det A = A_1\cdot(A_2\times A_3). The three terms a11C11a_{11}C_{11}, a12C12a_{12}C_{12}, a13C13a_{13}C_{13} split the first edge A1A_1 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?
    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.

    1. Pick the row with the most zeros. For the 3×33 \times 3 matrix, row 3 is (1,0,2)(1, 0, 2). A zero entry makes its whole term vanish, so there is less to compute.
    2. Expand along row 3. det⁡=a31C31+a32C32+a33C33=1⋅C31+0+2⋅C33\det = a_{31}C_{31} + a_{32}C_{32} + a_{33}C_{33} = 1\cdot C_{31} + 0 + 2\cdot C_{33}. Theorem: expansion along row k=3k = 3.
    3. Compute the cofactors. C31=(+1)det⁡[114−4]=−4−4=−8C_{31} = (+1)\det\begin{bmatrix}1&1\\4&-4\end{bmatrix} = -4 - 4 = -8 and C33=(+1)det⁡[2114]=8−1=7C_{33} = (+1)\det\begin{bmatrix}2&1\\1&4\end{bmatrix} = 8 - 1 = 7. The minors delete row 3 and column 1 (or 3). The sign is (−1)3+1=(−1)3+3=+1(-1)^{3+1} = (-1)^{3+3} = +1.
    4. Add up. det⁡=−8+14=6\det = -8 + 14 = 6. This agrees with the row reduction answer above, which is a check.
    5. The 4×44 \times 4 matrix. Row 3 is (0,0,1,1)(0, 0, 1, 1), with two zeros. Expand along it: det⁡=1⋅(−1)3+3det⁡A33+1⋅(−1)3+4det⁡A34\det = 1\cdot(-1)^{3+3}\det A_{33} + 1\cdot(-1)^{3+4}\det A_{34}. Only the two non-zero entries contribute.
    6. The two minors. A33=[110101421]A_{33} = \begin{bmatrix}1&1&0\\1&0&1\\4&2&1\end{bmatrix} has determinant 1(0−2)−1(1−4)+0=−2+3=11(0 - 2) - 1(1 - 4) + 0 = -2 + 3 = 1. A34=[112103420]A_{34} = \begin{bmatrix}1&1&2\\1&0&3\\4&2&0\end{bmatrix} has determinant 1(0−6)−1(0−12)+2(2−0)=−6+12+4=101(0 - 6) - 1(0 - 12) + 2(2 - 0) = -6 + 12 + 4 = 10. Each is a 3×33 \times 3 determinant, expanded along its first row.
    7. Combine. det⁡=1−10=−9\det = 1 - 10 = -9. The second term carries the sign (−1)3+4=−1(-1)^{3+4} = -1.

    Answer. 66 and −9-9.

    Your answerFind det⁡[1234567810]\det\begin{bmatrix}1&2&3\\4&5&6\\7&8&10\end{bmatrix}.
    Definition A

    Cofactor matrix

    The cofactor matrix cof⁡A\operatorname{cof}A of an n×nn \times n matrix AA is the matrix whose (i,j)(i, j) entry is the cofactor Cij=(−1)i+jdet⁡AijC_{ij} = (-1)^{i+j}\det A_{ij}. Many books call (cof⁡A)T(\operatorname{cof}A)^{\mathsf T} the adjugate of AA.

    In one lineThe matrix whose (i,j)(i, j) entry is the cofactor CijC_{ij}. Its transpose is the adjugate.

    Why it existsIt gives an explicit formula for the inverse of a matrix.

    Theorem A Apostol Thm 3.12 and 3.13; Spagnolie Lecture 15 page 5

    Cofactor formula for the inverse

    For every n×nn \times n matrix AA with n≥2n \ge 2, A (cof⁡A)T=(det⁡A)IA\,(\operatorname{cof}A)^{\mathsf T} = (\det A)I. If det⁡A≠0\det A \ne 0 then A−1=1det⁡A(cof⁡A)TA^{-1} = \frac{1}{\det A}(\operatorname{cof}A)^{\mathsf T}.

    In one lineA (cof⁡A)T=(det⁡A) IA\,(\operatorname{cof}A)^{\mathsf T} = (\det A)\,I, so when det⁡A≠0\det A \ne 0, A−1=1det⁡A(cof⁡A)TA^{-1} = \frac1{\det A}(\operatorname{cof}A)^{\mathsf T}.

    Why it is trueExpanding along row kk using the entries of row ii instead gives the determinant of a matrix with two equal rows, which is 00.

    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)(i, k) entry is ∑jaijCkj\sum_j a_{ij}C_{kj}.
    Matrix multiplication: entry (i,k)(i, k) of A (cof⁡A)TA\,(\operatorname{cof}A)^{\mathsf T} is row ii of AA times column kk of (cof⁡A)T(\operatorname{cof}A)^{\mathsf T}, which is row kk of cof⁡A\operatorname{cof}A.
    If i=ki = k this is ∑jakjCkj=det⁡A\sum_ja_{kj}C_{kj} = \det A.
    Expansion by cofactors along row kk.
    If i≠ki \ne k, let A′A' be AA with row kk replaced by a copy of row ii. Then ∑jaijCkj\sum_ja_{ij}C_{kj} is the expansion of det⁡A′\det A' along row kk.
    The cofactors CkjC_{kj} are built from the rows other than row kk, so they do not change if we replace row kk of AA by row ii.
    det⁡A′=0\det A' = 0. So the product has det⁡A\det A on the diagonal and 00 elsewhere, which is (det⁡A)I(\det A)I.
    Axiom 3: A′A' has two equal rows.
    If det⁡A≠0\det A \ne 0, A⋅1det⁡A(cof⁡A)T=IA\cdot\frac{1}{\det A}(\operatorname{cof}A)^{\mathsf T} = I, so A−1=1det⁡A(cof⁡A)TA^{-1} = \frac{1}{\det A}(\operatorname{cof}A)^{\mathsf T}.
    Divide by the non-zero number det⁡A\det A; 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.

    1. Find the determinant. Expand along column 1: det⁡A=1⋅det⁡[1460]+0+5⋅det⁡[2314]=(0−24)+5(8−3)=−24+25=1\det A = 1\cdot\det\begin{bmatrix}1&4\\6&0\end{bmatrix} + 0 + 5\cdot\det\begin{bmatrix}2&3\\1&4\end{bmatrix} = (0 - 24) + 5(8 - 3) = -24 + 25 = 1. The entry 00 kills one term. Entry (3,1)(3, 1) has sign ++. A non-zero determinant means AA is invertible.
    2. Compute the nine cofactors. C11=+(0−24)=−24C_{11} = +(0 - 24) = -24, C12=−(0−20)=20C_{12} = -(0 - 20) = 20, C13=+(0−5)=−5C_{13} = +(0 - 5) = -5; C21=−(0−18)=18C_{21} = -(0 - 18) = 18, C22=+(0−15)=−15C_{22} = +(0 - 15) = -15, C23=−(6−10)=4C_{23} = -(6 - 10) = 4; C31=+(8−3)=5C_{31} = +(8 - 3) = 5, C32=−(4−0)=−4C_{32} = -(4 - 0) = -4, C33=+(1−0)=1C_{33} = +(1 - 0) = 1. Each is the signed determinant of the 2×22 \times 2 left after deleting a row and a column.
    3. Transpose and divide. cof⁡A=[−2420−518−1545−41]\operatorname{cof}A = \begin{bmatrix}-24&20&-5\\18&-15&4\\5&-4&1\end{bmatrix}, and A−1=11(cof⁡A)T=[−2418520−15−4−541]A^{-1} = \frac11(\operatorname{cof}A)^{\mathsf T} = \begin{bmatrix}-24&18&5\\20&-15&-4\\-5&4&1\end{bmatrix}. The formula has the transpose of the cofactor matrix.
    4. Compare. This is the matrix we found by row reducing [A∣I][A \mid I] in chapter 2.6. Two independent methods agree.

    Answer. A−1=[−2418520−15−4−541]A^{-1} = \begin{bmatrix}-24&18&5\\20&-15&-4\\-5&4&1\end{bmatrix}. (For a 2×22 \times 2 matrix, the same formula is the familiar 1ad−bc[d−b−ca]\frac{1}{ad-bc}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}.)

    Cramer’s rule

    Definition A

    Cramer's rule

    Cramer’s rule. Let AA be n×nn \times n with det⁡A≠0\det A \ne 0 and b∈Rnb \in \mathbb R^n. Let Aj(b)A_j(b) be the matrix AA with its jj-th column replaced by bb. Then the solution of Ax=bAx = b has

    xj=det⁡Aj(b)det⁡A,j=1,…,n.x_j = \frac{\det A_j(b)}{\det A},\qquad j = 1, \dots, n.

    In one lineFor an invertible AA, the solution of Ax=bAx = b has xj=det⁡Aj(b)/det⁡Ax_j = \det A_j(b)/\det A, where Aj(b)A_j(b) is AA with column jj replaced by bb.

    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=bAx = b says b=x1a1+x2a2b = x_1a_1 + x_2a_2 for the columns a1,a2a_1, a_2. The area of the parallelogram spanned by bb and a2a_2 equals x1x_1 times the area spanned by a1a_1 and a2a_2, because the x2a2x_2a_2 part of bb is a slide along a2a_2 (a shear), which does not change the area. So x1=det⁡[b a2]/det⁡[a1 a2]x_1 = \det[b\ a_2]/\det[a_1\ a_2]. The proof below does this in every dimension.

    Theorem A Apostol Thm 3.14

    Cramer's rule is correct

    If det⁡A≠0\det A \ne 0 then Ax=bAx = b has the unique solution given by Cramer’s rule.

    In one lineIf det⁡A≠0\det A \ne 0 then the unique solution of Ax=bAx = b is xj=det⁡Aj(b)/det⁡Ax_j = \det A_j(b)/\det A.

    Why it is trueReplacing column jj of AA by b=Axb = Ax is multiplying AA by an identity matrix with column jj replaced by xx. That matrix has determinant xjx_j.

    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 xx be the solution of Ax=bAx = b.
    det⁡A≠0\det A \ne 0 means AA is invertible, so there is exactly one solution x=A−1bx = A^{-1}b.
    Let XjX_j be the identity matrix with column jj replaced by xx.
    Define it.
    AXj=Aj(b)AX_j = A_j(b).
    Column kk of AXjAX_j is AA times column kk of XjX_j. For k≠jk \ne j that is Aek=akAe_k = a_k. For k=jk = j it is Ax=bAx = b.
    det⁡Aj(b)=det⁡A⋅det⁡Xj\det A_j(b) = \det A\cdot\det X_j.
    Product rule.
    det⁡Xj=xj⋅det⁡In−1=xj\det X_j = x_j\cdot\det I_{n-1} = x_j.
    Expand det⁡Xj\det X_j along row jj. Row jj of XjX_j is (0,…,0,xj,0,…,0)(0, \dots, 0, x_j, 0, \dots, 0), so only the entry xjx_j at position (j,j)(j, j) contributes, with cofactor sign ++ and minor In−1I_{n-1}.
    xj=det⁡Aj(b)/det⁡Ax_j = \det A_j(b)/\det A.
    Divide by det⁡A≠0\det A \ne 0.

    This is the JEE rule “if Δ≠0\Delta \ne 0, then x=Δ1/Δx = \Delta_1/\Delta, y=Δ2/Δy = \Delta_2/\Delta, z=Δ3/Δz = \Delta_3/\Delta”, now with a proof. When Δ=0\Delta = 0 the rule says nothing about xx. As the example in chapter 2.6 showed, Δ=0\Delta = 0 with every Δj=0\Delta_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.

    1. Compute det⁡A\det A. A=[1132−140−11]A = \begin{bmatrix}1&1&3\\2&-1&4\\0&-1&1\end{bmatrix}. Expand along column 1: 1⋅det⁡[−14−11]−2det⁡[13−11]+0=(−1+4)−2(1+3)=3−8=−51\cdot\det\begin{bmatrix}-1&4\\-1&1\end{bmatrix} - 2\det\begin{bmatrix}1&3\\-1&1\end{bmatrix} + 0 = (-1 + 4) - 2(1 + 3) = 3 - 8 = -5. Non-zero, so Cramer’s rule applies and the solution is unique.
    2. Replace column 1 by b=(5,11,3)b = (5, 11, 3). det⁡[51311−143−11]=5(−1+4)−1(11−12)+3(−11+3)=15+1−24=−8\det\begin{bmatrix}5&1&3\\11&-1&4\\3&-1&1\end{bmatrix} = 5(-1 + 4) - 1(11 - 12) + 3(-11 + 3) = 15 + 1 - 24 = -8. This is det⁡A1(b)\det A_1(b).
    3. Replace column 2 and column 3 by bb. det⁡A2(b)=det⁡[1532114031]=1(11−12)−2(5−9)=−1+8=7\det A_2(b) = \det\begin{bmatrix}1&5&3\\2&11&4\\0&3&1\end{bmatrix} = 1(11 - 12) - 2(5 - 9) = -1 + 8 = 7, and det⁡A3(b)=det⁡[1152−1110−13]=1(−3+11)−2(3+5)=8−16=−8\det A_3(b) = \det\begin{bmatrix}1&1&5\\2&-1&11\\0&-1&3\end{bmatrix} = 1(-3 + 11) - 2(3 + 5) = 8 - 16 = -8. One new determinant per unknown.
    4. Divide. x=−8−5=85x = \frac{-8}{-5} = \frac85, y=7−5=−75y = \frac{7}{-5} = -\frac75, z=−8−5=85z = \frac{-8}{-5} = \frac85. Cramer’s rule.
    5. Check. These agree with the Gauss–Jordan answer of chapter 2.6, (85,−75,85)(\tfrac85, -\tfrac75, \tfrac85).

    Answer. (x,y,z)=(85,−75,85)(x, y, z) = (\tfrac85, -\tfrac75, \tfrac85).

    Your answerUse Cramer's rule on 3x+2y=73x + 2y = 7, x−y=4x - y = 4. What is xx?

    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 nn. It also gives a direct formula, useful in proofs but terrible for computing (it has n!n! terms). Apostol proves existence by induction with cofactors (3.13), which Spagnolie skipped.

    Definition B

    Permutation

    A permutation of {1,…,n}\{1, \dots, n\} is a bijection σ:{1,…,n}→{1,…,n}\sigma: \{1, \dots, n\} \to \{1, \dots, n\}, written as the list (σ(1),…,σ(n))(\sigma(1), \dots, \sigma(n)). An inversion is a pair i<ji < j with σ(i)>σ(j)\sigma(i) > \sigma(j). The sign is sgn⁡σ=(−1)number of inversions\operatorname{sgn}\sigma = (-1)^{\text{number of inversions}}. There are n!n! permutations. For n=3n = 3: (1,2,3)(1,2,3) has sign ++, (2,1,3)(2,1,3) has one inversion and sign −-, (2,3,1)(2,3,1) has two inversions and sign ++.

    In one lineA rearrangement of 1,2,…,n1, 2, \dots, n: a list σ(1),…,σ(n)\sigma(1), \dots, \sigma(n) using each number once. Its sign is +1+1 or −1-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 B standard; Axler 10.B / Strang 5.1

    Swapping two values flips the sign of a permutation

    Let σ′\sigma' be obtained from σ\sigma by exchanging the values in positions r<sr < s. Then sgn⁡σ′=−sgn⁡σ\operatorname{sgn}\sigma' = -\operatorname{sgn}\sigma.

    In one lineIf σ′\sigma' is σ\sigma with the values at two positions exchanged, then sgn⁡σ′=−sgn⁡σ\operatorname{sgn}\sigma' = -\operatorname{sgn}\sigma.

    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)(r, r + 1) changes status.
    Exchange the values in positions rr and r+1r + 1. Look at the pair (r,r+1)(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\pm 1, and the sign flips.
    For any other position ii, the pair of ii with rr and the pair of ii with r+1r + 1 together compare the value at ii with the same two values as before, only in swapped roles; the total number of inversions among them is unchanged. Pairs not involving rr or r+1r + 1 are untouched.
    A general exchange is (s−r)+(s−r−1)=2(s−r)−1(s - r) + (s - r - 1) = 2(s - r) - 1 neighbour exchanges, an odd number.
    To exchange the values at positions r<sr < s: swap the value at rr rightwards past the s−rs - r positions up to ss (that is s−rs - r neighbour exchanges), then swap the value that was at ss leftwards to position rr (s−r−1s - r - 1 more exchanges).
    So the sign flips an odd number of times, i.e. it flips.
    Each neighbour exchange flips the sign.
    Theorem A Apostol Thm 3.10 (existence, by cofactor induction); here Leibniz's formula

    The permutation formula gives a determinant function

    For an n×nn \times n matrix A=(aij)A = (a_{ij}), define d(A)=∑σsgn⁡(σ) a1σ(1)a2σ(2)⋯anσ(n)d(A) = \sum_{\sigma}\operatorname{sgn}(\sigma)\,a_{1\sigma(1)}a_{2\sigma(2)}\cdots a_{n\sigma(n)}, the sum over all n!n! permutations. Then dd satisfies Axioms 1 to 4.

    In one linedet⁡A=∑σsgn⁡(σ) a1σ(1)a2σ(2)⋯anσ(n)\det A = \sum_\sigma\operatorname{sgn}(\sigma)\,a_{1\sigma(1)}a_{2\sigma(2)}\cdots a_{n\sigma(n)} satisfies all four axioms. So the determinant exists for every nn.

    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 kk, so the sum is too.
    Every product has exactly one factor from row kk, namely akσ(k)a_{k\sigma(k)}.
    Axiom 3: group the permutations into pairs {σ,σ′}\{\sigma, \sigma'\}.
    Suppose rows rr and ss are equal. Pair each σ\sigma with σ′\sigma', which exchanges the values at positions rr and ss. This pairs up all n!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 00.
    The two products contain the same factors: arσ(r)asσ(s)a_{r\sigma(r)}a_{s\sigma(s)} against arσ(s)asσ(r)a_{r\sigma(s)}a_{s\sigma(r)}, which are equal because row rr equals row ss. The signs are opposite by the lemma.
    Axiom 4: for A=IA = I only the identity permutation contributes, and it contributes +1+1.
    The product a1σ(1)⋯anσ(n)a_{1\sigma(1)}\cdots a_{n\sigma(n)} for A=IA = I is 00 unless σ(i)=i\sigma(i) = i for all ii, where it is 11. The identity permutation has no inversions.

    For n=2n = 2 the two permutations (1,2)(1,2) and (2,1)(2,1) give a11a22−a12a21=ad−bca_{11}a_{22} - a_{12}a_{21} = ad - bc. For n=3n = 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, [21114−4102]\begin{bmatrix}2&1&1\\1&4&-4\\1&0&2\end{bmatrix}: 2⋅4⋅2+1⋅(−4)⋅1+1⋅1⋅0−1⋅4⋅1−2⋅(−4)⋅0−1⋅1⋅2=16−4+0−4−0−2=62\cdot4\cdot2 + 1\cdot(-4)\cdot1 + 1\cdot1\cdot0 - 1\cdot4\cdot1 - 2\cdot(-4)\cdot0 - 1\cdot1\cdot2 = 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≤3n \le 3 in that pattern; for larger nn 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.

    1. Write the rows in terms of the identity rows. Row 1 is (a,b)=a e1+b e2(a, b) = a\,e_1 + b\,e_2 and row 2 is (c,d)=c e1+d e2(c, d) = c\,e_1 + d\,e_2. We will use linearity in each row, which needs rows written as combinations of simple rows.
    2. Expand row 1. Write [u,v][u, v] for the determinant of the matrix with rows uu and vv (this [ , ][\ ,\ ] is the determinant function, so it is not the entry dd). Then det⁡=a [e1,row 2]+b [e2,row 2]\det = a\,[e_1, \text{row }2] + b\,[e_2, \text{row }2]. Axioms 1 and 2 in the first row.
    3. Expand row 2 in each term. This gives four terms: ac [e1,e1]+ad [e1,e2]+bc [e2,e1]+bd [e2,e2]ac\,[e_1, e_1] + ad\,[e_1, e_2] + bc\,[e_2, e_1] + bd\,[e_2, e_2]. Axioms 1 and 2 in the second row.
    4. Evaluate the four. [e1,e1]=0=[e2,e2][e_1, e_1] = 0 = [e_2, e_2] by Axiom 3. [e1,e2]=det⁡I=1[e_1, e_2] = \det I = 1 by Axiom 4. [e2,e1]=−[e1,e2]=−1[e_2, e_1] = -[e_1, e_2] = -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 II, and the lemma handles the swapped term.
    5. Add up. det⁡=ad⋅1+bc⋅(−1)=ad−bc\det = ad\cdot1 + bc\cdot(-1) = ad - bc.

    Answer. ad−bcad - bc, with no assumption on the signs of a,b,c,da, b, c, d. This is the same count as the permutation formula for n=2n = 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.

    1. Pick the row. The last row is (0,3,a)(0, 3, a), with one zero. A zero entry kills its term, so fewer minors are needed.
    2. Expand along it. det⁡=3⋅C32+a⋅C33\det = 3\cdot C_{32} + a\cdot C_{33}. Expansion along row 33, skipping the entry 00.
    3. The entry 33 at position (3,2)(3, 2). The sign is (−1)3+2=−1(-1)^{3+2} = -1 and the minor deletes row 3 and column 2: det⁡[a042]=2a\det\begin{bmatrix}a&0\\4&2\end{bmatrix} = 2a. So C32=−2aC_{32} = -2a. The minor’s last column is (0,2)(0, 2), so only the 22 survives: this is the “last column has one entry” step of the stretch problem.
    4. The entry aa at position (3,3)(3, 3). The sign is ++ and the minor is [a14a]\begin{bmatrix}a&1\\4&a\end{bmatrix} with determinant a2−4a^2 - 4. So C33=a2−4C_{33} = a^2 - 4. This minor is the top-left 2×22\times2 tridiagonal block, D2D_2.
    5. Add up. det⁡=3(−2a)+a(a2−4)=a3−10a\det = 3(-2a) + a(a^2 - 4) = a^3 - 10a. Compare with the recurrence D3=aD2−s2t2D1=a(a2−4)−2⋅3⋅aD_3 = aD_2 - s_2t_2D_1 = a(a^2 - 4) - 2\cdot3\cdot a.

    Answer. a3−10aa^3 - 10a.

    Not a determinant function: F(A)=a11a22⋯annF(A) = a_{11}a_{22}\cdots a_{nn} (the diagonal product). It is linear in each row and F(I)=1F(I) = 1, so Axioms 1, 2 and 4 hold. Axiom 3 fails: A=[1111]A = \begin{bmatrix}1&1\\1&1\end{bmatrix} has equal rows but F(A)=1≠0F(A) = 1 \ne 0.

    Not a determinant function: F(A)=1F(A) = 1 for all AA. It is non-zero on equal rows, so it fails Axiom 3.

    Triangular does not need to look triangular. [005040300]\begin{bmatrix}0&0&5\\0&4&0\\3&0&0\end{bmatrix} is not triangular as written, yet one swap of rows 1 and 3 makes it diag⁡(3,4,5)\operatorname{diag}(3, 4, 5). So its determinant is −(3⋅4⋅5)=−60-(3\cdot4\cdot5) = -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⁡θ)(r, \theta) \mapsto (x, y) = (r\cos\theta, r\sin\theta) is not linear. Near each point it is approximated by a linear map, the matrix of partial derivatives

    J=[cos⁡θ−rsin⁡θsin⁡θrcos⁡θ],det⁡J=rcos⁡2θ+rsin⁡2θ=r.J = \begin{bmatrix}\cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta\end{bmatrix},\qquad \det J = r\cos^2\theta + r\sin^2\theta = r.

    So a tiny rectangle of size dr×dθdr \times d\theta is sent to a patch of area r dr dθr\,dr\,d\theta. That is the number you multiplied by in double integrals in polar coordinates. The area of a disk of radius RR is ∫02π∫0Rr dr dθ=2π⋅R22=πR2\int_0^{2\pi}\int_0^Rr\,dr\,d\theta = 2\pi\cdot\tfrac{R^2}{2} = \pi R^2; for R=2R = 2 this is 4π4\pi. 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 λ\lambda is an eigenvalue of AA exactly when A−λIA - \lambda I is not invertible, that is, when det⁡(A−λI)=0\det(A - \lambda I) = 0. For A=[032−1]A = \begin{bmatrix}0&3\\2&-1\end{bmatrix} (Apostol 3.17 #3(a)), det⁡(λI−A)=λ(λ+1)−6=(λ−2)(λ+3)\det(\lambda I - A) = \lambda(\lambda + 1) - 6 = (\lambda - 2)(\lambda + 3) (for a 2×22\times2 matrix, det⁡(λI−A)=det⁡(A−λI)\det(\lambda I - A) = \det(A - \lambda I)), so the special values are λ=2\lambda = 2 and λ=−3\lambda = -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,a3a_1, a_2, a_3. Its volume is ∣det⁡[a1 a2 a3]∣|\det[a_1\ a_2\ a_3]|. Silicon has a face-centred cubic lattice with cube side a=5.431a = 5.431 ångström. The primitive cell is spanned by a1=a2(0,1,1)a_1 = \tfrac a2(0, 1, 1), a2=a2(1,0,1)a_2 = \tfrac a2(1, 0, 1), a3=a2(1,1,0)a_3 = \tfrac a2(1, 1, 0). Then

    det⁡[012121201212120]=14,V=14a3=14(5.431)3≈40.05 A˚3.\det\begin{bmatrix}0&\frac12&\frac12\\\frac12&0&\frac12\\\frac12&\frac12&0\end{bmatrix} = \tfrac14, \qquad V = \tfrac14a^3 = \tfrac14(5.431)^3 \approx 40.05\ \text{\AA}^3.

    (Expand along row 1: 0−12(0−14)+12(14−0)=18+180 - \tfrac12(0 - \tfrac14) + \tfrac12(\tfrac14 - 0) = \tfrac18 + \tfrac18.) The cube holds 4 lattice points, so each owns a quarter of the cube’s volume a3=160.2a^3 = 160.2, which is 40.0540.05. For a monoclinic cell with edges 5,6,75, 6, 7, two right angles and a third angle of 100°100° between two of the edges, the volume is 5⋅6⋅7sin⁡100°≈206.85\cdot6\cdot7\sin 100° \approx 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×33 \times 3 matrix for its rotation and scaling. The determinant is the volume scale: the matrix diag⁡(2,3,1)\operatorname{diag}(2, 3, 1) has determinant 66, so the object occupies 66 times the volume. A mirror, such as diag⁡(−1,1,1)\operatorname{diag}(-1, 1, 1), has determinant −1-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\det < 0. Otherwise the object would be drawn inside out, with its back faces culled. A determinant 00 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∈R3a, b \in \mathbb R^3, the cross product is the formal determinant

    a×b=det⁡[ijka1a2a3b1b2b3],a \times b = \det\begin{bmatrix}\mathbf i&\mathbf j&\mathbf k\\a_1&a_2&a_3\\b_1&b_2&b_3\end{bmatrix},

    expanded along the first row. For a=(1,3,2)a = (1, 3, 2) and b=(0,2,1)b = (0, 2, 1) this gives (3⋅1−2⋅2, 2⋅0−1⋅1, 1⋅2−3⋅0)=(−1,−1,2)(3\cdot1 - 2\cdot2,\ 2\cdot0 - 1\cdot1,\ 1\cdot2 - 3\cdot0) = (-1, -1, 2) (HW8). Replace the top row by aa and the determinant has two equal rows, so a⋅(a×b)=0a\cdot(a\times b) = 0: the cross product is perpendicular to aa. The same argument gives b⋅(a×b)=0b\cdot(a\times b) = 0. The length ∣a×b∣|a\times b| is the area of the parallelogram on aa and bb, and the torque of a force FF at displacement rr is r×Fr \times F. The scalar triple product a⋅(b×c)=det⁡[a;b;c]a\cdot(b\times 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, det⁡A=0\det A = 0 decides invertibility. In floating point it does not. The matrix A=0.1 I100A = 0.1\,I_{100} is perfectly well behaved, yet det⁡A=0.1100=10−100\det A = 0.1^{100} = 10^{-100}, tiny only because the entries are small. The matrix [1111.0001]\begin{bmatrix}1&1\\1&1.0001\end{bmatrix} from chapter 2.6 has determinant 10−410^{-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 10 I100010\,I_{1000} has determinant 10100010^{1000}, far above the largest number a double-precision float can hold, about 1.8×103081.8\times10^{308}). Numerical code decides invertibility by the rank from elimination or by the condition number (chapter 3.5), never by comparing det⁡A\det A with zero.

    Traps

    Watch out· The determinant is not additive, and det(cA) is cⁿ det A

    det⁡(A+B)≠det⁡A+det⁡B\det(A + B) \ne \det A + \det B in general. Take A=IA = I and B=−IB = -I in R2×2\mathbb R^{2\times2}: det⁡(A+B)=det⁡O=0\det(A + B) = \det O = 0, while det⁡A+det⁡B=2\det A + \det B = 2. Also det⁡(2A)=2ndet⁡A\det(2A) = 2^n\det A, not 2det⁡A2\det A. 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-1. Scaling a row by cc multiplies by cc, so if you divide a row by 33 to simplify, you must multiply the final answer by 33 (the factor 3 in the Lecture 14 example). Adding a multiple of another row does nothing. The formula det⁡A=(−1)p(c1⋯cq)−1det⁡U\det A = (-1)^p(c_1\cdots c_q)^{-1}\det U 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)(8, 7, 2) and determinant 7676. The computation below it uses (6,6,2)(6, 6, 2) and gives 4848. 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)(k, j) is (−1)k+j(-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×44\times4 example, the second term has sign (−1)3+4=−1(-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!n! operations: for n=20n = 20 that is more than 101810^{18}. Row reduction takes about n3/3n^3/3. Cramer’s rule needs n+1n + 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×32\times3 matrix has no determinant, and ‘rank’ or the null space are the right tools for it.

    Problems

    check

    Compute det⁡[3142]\det\begin{bmatrix}3&1\\4&2\end{bmatrix}. By what factor does this matrix multiply areas, and does it flip orientation?

    Solution

    3⋅2−1⋅4=23\cdot2 - 1\cdot4 = 2. Areas are multiplied by 22. The sign is positive, so orientation is kept.

    check

    A 3×33\times3 matrix AA has det⁡A=5\det A = 5. Find det⁡(2A)\det(2A), det⁡(A−1)\det(A^{-1}), det⁡(AT)\det(A^{\mathsf T}), det⁡(A2)\det(A^2) and det⁡(−A)\det(-A).

    Solution

    det⁡(2A)=23⋅5=40\det(2A) = 2^3\cdot5 = 40. det⁡(A−1)=15\det(A^{-1}) = \tfrac15. det⁡AT=5\det A^{\mathsf T} = 5. det⁡(A2)=25\det(A^2) = 25. det⁡(−A)=(−1)3⋅5=−5\det(-A) = (-1)^3\cdot5 = -5.

    check

    Find det⁡[010001100]\det\begin{bmatrix}0&1&0\\0&0&1\\1&0&0\end{bmatrix} and det⁡[123456789]\det\begin{bmatrix}1&2&3\\4&5&6\\7&8&9\end{bmatrix} without a long computation.

    Solution

    The first is a permutation of the rows of II: moving row 3 to the top takes two swaps, so det⁡=(−1)2=+1\det = (-1)^2 = +1. In the second, row 3 equals 2×2\times row 2 minus row 1, so the rows are dependent and det⁡=0\det = 0.

    check

    True or false: if det⁡A=0\det A = 0 for a 4×44\times4 matrix AA, then Ax=bAx = b has no solution for some bb.

    Solution

    True. det⁡A=0\det A = 0 means AA is not invertible, so the rank is less than 44, so the column space is a proper subspace of R4\mathbb R^4 and some bb lies outside it (and for bb in it, there are infinitely many solutions).

    useMidterm 2 (2013 practice) Q1(a), (d)

    Let A=[120202322]A = \begin{bmatrix}1&2&0\\2&0&2\\3&2&2\end{bmatrix}. Compute det⁡A\det A and the cofactor matrix, and check A (cof⁡A)TA\,(\operatorname{cof}A)^{\mathsf T}.

    Solution

    Expand along row 1: det⁡A=1⋅(0⋅2−2⋅2)−2⋅(2⋅2−2⋅3)+0=−4+4=0\det A = 1\cdot(0\cdot2 - 2\cdot2) - 2\cdot(2\cdot2 - 2\cdot3) + 0 = -4 + 4 = 0. The cofactors are C11=−4C_{11} = -4, C12=−(4−6)=2C_{12} = -(4 - 6) = 2, C13=4−0=4C_{13} = 4 - 0 = 4; C21=−(4−0)=−4C_{21} = -(4 - 0) = -4, C22=2−0=2C_{22} = 2 - 0 = 2, C23=−(2−6)=4C_{23} = -(2 - 6) = 4; C31=4−0=4C_{31} = 4 - 0 = 4, C32=−(2−0)=−2C_{32} = -(2 - 0) = -2, C33=0−4=−4C_{33} = 0 - 4 = -4. So cof⁡A=[−424−4244−2−4]\operatorname{cof}A = \begin{bmatrix}-4&2&4\\-4&2&4\\4&-2&-4\end{bmatrix}. Multiplying out, A (cof⁡A)TA\,(\operatorname{cof}A)^{\mathsf T} is the zero matrix, which equals (det⁡A)I=O(\det A)I = O. (This is the identity from the cofactor theorem, which holds even when det⁡A=0\det A = 0. It cannot give an inverse here, since there is none.)

    usePractice Final 2013 Q1(b)

    Compute det⁡[213130405]\det\begin{bmatrix}2&1&3\\1&3&0\\4&0&5\end{bmatrix}.

    Solution

    Expand along row 1: 2(3⋅5−0⋅0)−1(1⋅5−0⋅4)+3(1⋅0−3⋅4)=30−5−36=−112(3\cdot5 - 0\cdot0) - 1(1\cdot5 - 0\cdot4) + 3(1\cdot0 - 3\cdot4) = 30 - 5 - 36 = -11. Check by column 3 (which has a 00): 3⋅det⁡[1340]−0+5det⁡[2113]=3(−12)+5(5)=−36+25=−113\cdot\det\begin{bmatrix}1&3\\4&0\end{bmatrix} - 0 + 5\det\begin{bmatrix}2&1\\1&3\end{bmatrix} = 3(-12) + 5(5) = -36 + 25 = -11.

    useSpagnolie Lecture 12 example; Cramer's rule

    Use Cramer’s rule to solve 2x+y+z=52x + y + z = 5, 4x−6y=−24x - 6y = -2, −2x+7y+2z=9-2x + 7y + 2z = 9.

    Solution

    det⁡A=det⁡[2114−60−272]\det A = \det\begin{bmatrix}2&1&1\\4&-6&0\\-2&7&2\end{bmatrix}. Expand along row 2: −4det⁡[1172]+(−6)det⁡[21−22]=−4(2−7)−6(4+2)=20−36=−16-4\det\begin{bmatrix}1&1\\7&2\end{bmatrix} + (-6)\det\begin{bmatrix}2&1\\-2&2\end{bmatrix} = -4(2 - 7) - 6(4 + 2) = 20 - 36 = -16. (The pivots 2,−8,12, -8, 1 of Lecture 12 multiply to −16-16, as they should.) Replacing columns by b=(5,−2,9)b = (5, -2, 9) gives determinants −16-16, −16-16 and −32-32, so x=1x = 1, y=1y = 1, z=2z = 2. These match the elimination answer (1,1,2)(1, 1, 2).

    use

    The rows of a 3×33\times3 matrix AA are R1,R2,R3R_1, R_2, R_3 and det⁡A=4\det A = 4. Find the determinant of the matrix with rows R1+R2R_1 + R_2, R2+R3R_2 + R_3, R3+R1R_3 + R_1.

    Solution

    The new matrix is MAMA with M=[110011101]M = \begin{bmatrix}1&1&0\\0&1&1\\1&0&1\end{bmatrix}. det⁡M=1(1−0)−1(0−1)+0=2\det M = 1(1 - 0) - 1(0 - 1) + 0 = 2. By the product rule the answer is 2⋅4=82\cdot4 = 8. (Check by expanding with multilinearity: the eight terms have only two without a repeated row, namely d(R1,R2,R3)d(R_1, R_2, R_3) and d(R2,R3,R1)d(R_2, R_3, R_1), each equal to 44 because a cyclic shift of three rows is two swaps. Total 88.)

    prove

    Prove that if a square matrix has a column of zeros, its determinant is 00.

    Solution

    The transpose has a row of zeros, so by part (1) of the lemma det⁡AT=0\det A^{\mathsf T} = 0. By the transpose theorem det⁡A=det⁡AT=0\det A = \det A^{\mathsf T} = 0.

    proveMidterm 2 (2013 practice) Q6

    Let GG be the set of n×nn\times n matrices with det⁡A=1\det A = 1. Prove that if A,B∈GA, B \in G then AB∈GAB \in G, and if A∈GA \in G then AA is invertible and A−1∈GA^{-1} \in G. (So GG, the special linear group, is a group.)

    Solution

    Product rule: det⁡(AB)=det⁡Adet⁡B=1⋅1=1\det(AB) = \det A\det B = 1\cdot1 = 1, so AB∈GAB \in G. If det⁡A=1≠0\det A = 1 \ne 0 then AA is invertible by the invertibility theorem, and det⁡(A−1)=1/det⁡A=1\det(A^{-1}) = 1/\det A = 1, so A−1∈GA^{-1} \in G. Also I∈GI \in G since det⁡I=1\det I = 1.

    proveApostol 3.11 #2(a); MATH 375 HW9

    Prove that for square blocks AA, BB, CC, det⁡[AOOOBOOOC]=det⁡Adet⁡Bdet⁡C\det\begin{bmatrix}A&O&O\\O&B&O\\O&O&C\end{bmatrix} = \det A\det B\det C.

    Solution

    Group the last two blocks: the matrix is [AOOD]\begin{bmatrix}A&O\\O&D\end{bmatrix} with D=[BOOC]D = \begin{bmatrix}B&O\\O&C\end{bmatrix}. The block-diagonal theorem gives det⁡Adet⁡D\det A\det D, and applying it again to DD gives det⁡D=det⁡Bdet⁡C\det D = \det B\det C. So the determinant is det⁡Adet⁡Bdet⁡C\det A\det B\det C.

    prove

    Let AA be an n×nn\times n matrix with integer entries and det⁡A=±1\det A = \pm1. Prove that A−1A^{-1} also has integer entries.

    Solution

    Since det⁡A≠0\det A \ne 0, A−1=1det⁡A(cof⁡A)TA^{-1} = \frac{1}{\det A}(\operatorname{cof}A)^{\mathsf T}. Each cofactor is ±\pm 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 det⁡A=±1\det A = \pm1 keeps every entry an integer. For example A=[3243]A = \begin{bmatrix}3&2\\4&3\end{bmatrix} has det⁡A=1\det A = 1 and A−1=[3−2−43]A^{-1} = \begin{bmatrix}3&-2\\-4&3\end{bmatrix}.

    provePractice Final 2013 Q3(a), (b)

    Let AA be a real n×nn\times n matrix with A2=−IA^2 = -I. Prove that AA is invertible and nn is even.

    Solution

    A(−A)=−A2=IA(-A) = -A^2 = I, so −A-A is an inverse of AA and AA is invertible. Taking determinants, (det⁡A)2=det⁡(A2)=det⁡(−I)=(−1)ndet⁡I=(−1)n(\det A)^2 = \det(A^2) = \det(-I) = (-1)^n\det I = (-1)^n. The left side is the square of a real number, so it is at least 00; hence (−1)n=1(-1)^n = 1 and nn is even.

    stretchApostol 3.6 #4(d); MATH 375 HW8 (corrected)

    Let Dn(a)D_n(a) be the determinant of the n×nn\times n tridiagonal matrix with aa on the diagonal, super-diagonal entries s1,s2,…s_1, s_2, \dots and sub-diagonal entries t1,t2,…t_1, t_2, \dots. Prove Dn=aDn−1−sn−1tn−1Dn−2D_n = aD_{n-1} - s_{n-1}t_{n-1}D_{n-2}. Then compute the 5×55\times5 case with rows (a,1,0,0,0)(a,1,0,0,0), (4,a,2,0,0)(4,a,2,0,0), (0,3,a,3,0)(0,3,a,3,0), (0,0,2,a,4)(0,0,2,a,4), (0,0,0,1,a)(0,0,0,1,a).

    Solution

    Here s=(1,2,3,4)s = (1, 2, 3, 4) and t=(4,3,2,1)t = (4, 3, 2, 1). Expand along the last row, which has only two non-zero entries tn−1t_{n-1} (column n−1n - 1) and aa (column nn). The entry aa has minor equal to the top-left (n−1)×(n−1)(n-1)\times(n-1) tridiagonal matrix, contributing aDn−1aD_{n-1}. The entry tn−1t_{n-1} at position (n,n−1)(n, n-1) has sign (−1)2n−1=−1(-1)^{2n-1} = -1. Its minor deletes row nn and column n−1n - 1; its last column is (0,…,0,sn−1)(0, \dots, 0, s_{n-1}), with the single non-zero entry sn−1s_{n-1} at the bottom and the rest of the matrix being the top-left (n−2)×(n−2)(n-2)\times(n-2) tridiagonal block. Expanding that minor along its last column gives sn−1Dn−2s_{n-1}D_{n-2}. So Dn=aDn−1−tn−1sn−1Dn−2D_n = aD_{n-1} - t_{n-1}s_{n-1}D_{n-2}. The products sktks_kt_k are 4,6,6,44, 6, 6, 4. Then D1=aD_1 = a, D2=a2−4D_2 = a^2 - 4, D3=a(a2−4)−6a=a3−10aD_3 = a(a^2 - 4) - 6a = a^3 - 10a, D4=a(a3−10a)−6(a2−4)=a4−16a2+24D_4 = a(a^3 - 10a) - 6(a^2 - 4) = a^4 - 16a^2 + 24, D5=a(a4−16a2+24)−4(a3−10a)=a5−20a3+64aD_5 = a(a^4 - 16a^2 + 24) - 4(a^3 - 10a) = a^5 - 20a^3 + 64a. (The posted solution key prints a5−20a3+64a^5 - 20a^3 + 64; the final term is missing the factor aa. A check: at a=0a = 0 the recurrence gives D1=0D_1 = 0 and Dn=−sn−1tn−1Dn−2D_n = -s_{n-1}t_{n-1}D_{n-2}, so every odd DnD_n is 00. Only the corrected formula gives D5(0)=0D_5(0) = 0.)

    stretchApostol 3.6 #6; MATH 375 HW8

    Let f1,f2,g1,g2f_1, f_2, g_1, g_2 be differentiable and F(x)=det⁡[f1f2g1g2]F(x) = \det\begin{bmatrix}f_1&f_2\\g_1&g_2\end{bmatrix}. Prove F′=det⁡[f1′f2′g1g2]+det⁡[f1f2g1′g2′]F' = \det\begin{bmatrix}f_1'&f_2'\\g_1&g_2\end{bmatrix} + \det\begin{bmatrix}f_1&f_2\\g_1'&g_2'\end{bmatrix}. Then prove the same for an n×nn\times n matrix of differentiable functions: the derivative is the sum of nn determinants, each with one row differentiated.

    Solution

    For 2×22\times2: F=f1g2−f2g1F = f_1g_2 - f_2g_1, so by the product rule F′=f1′g2+f1g2′−f2′g1−f2g1′=(f1′g2−f2′g1)+(f1g2′−f2g1′)F' = f_1'g_2 + f_1g_2' - f_2'g_1 - f_2g_1' = (f_1'g_2 - f_2'g_1) + (f_1g_2' - f_2g_1'), which are the two determinants. For n×nn\times n, use the permutation formula: F=∑σsgn⁡σ∏iaiσ(i)(x)F = \sum_\sigma\operatorname{sgn}\sigma\prod_ia_{i\sigma(i)}(x). The product rule for a product of nn functions gives ddx∏iaiσ(i)=∑k=1nakσ(k)′∏i≠kaiσ(i)\frac{d}{dx}\prod_ia_{i\sigma(i)} = \sum_{k=1}^n a_{k\sigma(k)}'\prod_{i \ne k}a_{i\sigma(i)}. Swap the order of the two sums: for each fixed kk, ∑σsgn⁡σ akσ(k)′∏i≠kaiσ(i)\sum_\sigma\operatorname{sgn}\sigma\,a_{k\sigma(k)}'\prod_{i\ne k}a_{i\sigma(i)} is the permutation formula for the matrix with row kk replaced by its derivative. So F′F' is the sum over kk of those nn determinants. Spagnolie’s marginal note: ddxdet⁡A(x)\frac{d}{dx}\det A(x) is not det⁡A′(x)\det A'(x), which is “more complicated”.

    Summary

    • The determinant is the signed volume scale factor of a square matrix. For 2×22\times2 it is ad−bcad - 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, det⁡I=1\det I = 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 00.
    • To compute: row reduce to triangular form and multiply the diagonal, with (−1)(-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.
    • det⁡A≠0\det A \ne 0 exactly when AA is invertible, exactly when the rows (equivalently columns) are independent. This is one more line in the invertible matrix theorem.
    • Product rule: det⁡(AB)=det⁡Adet⁡B\det(AB) = \det A\det B, proved by fixing BB and applying uniqueness to A↦det⁡(AB)A \mapsto \det(AB). So det⁡A−1=1/det⁡A\det A^{-1} = 1/\det A and det⁡Ak=(det⁡A)k\det A^k = (\det A)^k. Not additive: det⁡(A+B)≠det⁡A+det⁡B\det(A + B) \ne \det A + \det B, and det⁡(cA)=cndet⁡A\det(cA) = c^n\det A.
    • det⁡AT=det⁡A\det A^{\mathsf T} = \det A, so column operations and column expansions work too.
    • The cofactor matrix gives A−1=1det⁡A(cof⁡A)TA^{-1} = \frac{1}{\det A}(\operatorname{cof}A)^{\mathsf T} and Cramer’s rule xj=det⁡Aj(b)/det⁡Ax_j = \det A_j(b)/\det A. Both are formulas for proofs, not for computing.
    • Existence comes from the permutation formula, a sum of n!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.

    Where this sits

    Comes from
    2.6 Systems of equations and elimination
    Leads to
    2.8 Eigenvalues and eigenvectors
    Same idea elsewhere
    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.