BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Determinant formulas and cofactors

The three defining properties lead to a formula. Splitting each row into pieces with one nonzero entry (linearity in each row) gives 2 × 2 determinants from four pieces, two of them zero, leaving ad − bc. For 3 × 3 there are 27 pieces, and only the 6 that take one entry from each row and each column survive: three with a plus sign and three with a minus, the sign being that of the permutation of the column numbers. The big formula for n × n: det A is a sum of n! terms ± a₁α a₂β ⋯ aₙω, where (α, β, …, ω) is a permutation of (1, …, n) and the sign is + for an even permutation, − for an odd one. (The 3 × 3 diagonal rule does not extend: the 4 × 4 counter-diagonal has a plus sign.) Collecting the terms that contain a₁ⱼ gives the cofactor formula det A = a₁₁C₁₁ + a₁₂C₁₂ + ⋯ + a₁ₙC₁ₙ, where the cofactor Cᵢⱼ is (−1)^(i+j) times the determinant of the matrix with row i and column j removed. For 2 × 2 it gives ad + b(−c). There are now three formulas: the product of the pivots, the big formula, and cofactors. Cofactors suit matrices with many zeros: for the tridiagonal matrices of ones, |Aₙ| = |Aₙ₋₁| − |Aₙ₋₂|, giving 1, 0, −1, −1, 0, 1 and then repeating with period 6.

You need this first

Full reading path (11 pages)
  1. Vectors (8.01)
  2. Vectors and the dot product (18.02)
  3. Determinants and the cross product (18.02)
  4. Planes through three points, and matrices (18.02)
  5. Equations of planes and square systems (18.02)
  6. The geometry of linear equations (18.06)
  7. Elimination with matrices (18.06)
  8. Matrix multiplication and inverse matrices (18.06)
  9. Factorization into A = LU (18.06)
  10. Transposes, permutations and vector spaces (18.06)
  11. Properties of determinants (18.06)
On this page · 5 sections
  1. From the properties to a formula
  2. The big formula
  3. Cofactors
  4. Tridiagonal matrices of ones
  5. Summary

The second of three lectures on determinants: now the formulas, first a big one and then one with cofactors (transcript, p. 1). Determinants were once the big thing and linear algebra the little thing; now they are a small, neat part (p. 1). It continues properties of determinants.

From the properties to a formula#

For 2×22 \times 2 (transcript, pp. 1–3): split the first row (a,b)(a, b) as (a,0)+(0,b)(a, 0) + (0, b) by linearity, then split the second row the same way. Four simple determinants remain, and two of them have a column of zeros (pp. 2–3):

Two by two by splitting
∣abcd∣=∣a0c0∣+∣a00d∣+∣0bc0∣+∣0b0d∣=0+ad−bc+0\begin{vmatrix} a & b \\ c & d \end{vmatrix} = \begin{vmatrix} a & 0 \\ c & 0 \end{vmatrix} + \begin{vmatrix} a & 0 \\ 0 & d \end{vmatrix} + \begin{vmatrix} 0 & b \\ c & 0 \end{vmatrix} + \begin{vmatrix} 0 & b \\ 0 & d \end{vmatrix} = 0 + ad - bc + 0
In words

a b; c d equals a 0; c 0 plus a 0; 0 d plus 0 b; c 0 plus 0 b; 0 d equals 0 plus a d minus b c plus 0

The bcbc term gets a minus sign from one row exchange (p. 3). The method is what matters (pp. 3–4). For 3×33 \times 3, splitting each row into three pieces gives 33=273^3 = 27 pieces, but most have a column of zeros (pp. 4–5). The survivors take one entry from each row and each column: the column numbers are a permutation of 1,2,31, 2, 3 (pp. 5–6). Factoring out the entries leaves a permutation matrix, whose determinant is ±1\pm1 (pp. 6–8):

Three by three
det⁡A=a11a22a33−a11a23a32−a12a21a33+a12a23a31+a13a21a32−a13a22a31\det A = a_{11}a_{22}a_{33} - a_{11}a_{23}a_{32} - a_{12}a_{21}a_{33} + a_{12}a_{23}a_{31} + a_{13}a_{21}a_{32} - a_{13}a_{22}a_{31}
In words

the determinant of capital A equals a one one a two two a three three minus a one one a two three a sub 32 minus a one two a two one a three three plus a one two a two three a sub 31 plus a one three a two one a sub 32 minus a one three a two two a sub 31

The plus terms run "down" one way and the minus terms the other way, but that picture is for 3×33 \times 3 only (p. 9). For 4×44 \times 4 the counter-diagonal product comes with a plus sign: two exchanges (rows 1 and 4, rows 2 and 3) turn it into the identity (p. 9).

The big formula#

For n×nn \times n (transcript, pp. 9–11): the entry in row 1 can come from any of nn columns, the one in row 2 from the n−1n - 1 remaining, and so on, giving n!n! terms, half plus and half minus (p. 10):

The big formula
det⁡A=∑n! terms± a1α a2β a3γ⋯anω,(α,β,γ,…,ω)=a permutation of (1,2,…,n)\det A = \sum_{n! \text{ terms}} \pm\, a_{1\alpha}\,a_{2\beta}\,a_{3\gamma} \cdots a_{n\omega}, \qquad (\alpha, \beta, \gamma, \dots, \omega) = \text{a permutation of } (1, 2, \dots, n)
In words

the determinant of capital A equals the sum over n factorial terms of plus or minus a one alpha a two beta a three gamma and so on a n omega, ( alpha, beta, gamma, and so on, omega ) equals a permutation of (1, 2, and so on, n)

The sign is ++ for an even permutation and −- for an odd one. This is why Strang did not start with it: the properties come first, though they can be read back out of it; for the identity only the term a11a22⋯ann=1a_{11}a_{22}\cdots a_{nn} = 1 survives (pp. 11–12). Proving det⁡AB=det⁡A det⁡B\det AB = \det A\,\det B from it would take weeks (p. 12).

A 4×44 \times 4 example (pp. 12–16). Strang invents a 4×44 \times 4 matrix of ones and zeros on the spot. Of its 24 terms only two are not zero: one from the permutation (4,3,2,1)(4, 3, 2, 1) with sign +1+1, one from (3,2,1,4)(3, 2, 1, 4) with sign −1-1. So the determinant is 0 and the matrix is singular, which he confirms another way: rows 1 and 3 add to a row of ones, and so do rows 2 and 4, so row 1 minus row 2 plus row 3 minus row 4 is zero (pp. 14–16). Zeros make the big formula manageable (p. 16).

Cofactors#

Cofactors connect an n×nn \times n determinant to determinants one size smaller (transcript, p. 17). Group the 3×33 \times 3 formula by the entries of row 1 (pp. 17–20):

Grouping by the first row
det⁡A=a11(a22a33−a23a32)+a12(−a21a33+a23a31)+a13(a21a32−a22a31)\det A = a_{11}(a_{22}a_{33} - a_{23}a_{32}) + a_{12}(-a_{21}a_{33} + a_{23}a_{31}) + a_{13}(a_{21}a_{32} - a_{22}a_{31})
In words

the determinant of capital A equals a one one the quantity a two two a three three minus a two three a sub 32, all plus a one two the quantity minus a two one a three three plus a two three a sub 31, all plus a one three the quantity a two one a sub 32 minus a two two a sub 31

The factor multiplying a11a_{11} is the determinant of the 2×22 \times 2 matrix left after removing row 1 and column 1: all ways to use the remaining rows and columns once each (p. 18). For a12a_{12} there is a minus sign, which is built into the cofactor (p. 19). In general (pp. 20–21):

Cofactor
Cij=(−1)i+jdet⁡(the (n−1)×(n−1) matrix with row i and column j removed)C_{ij} = (-1)^{i+j}\det(\text{the } (n - 1) \times (n - 1) \text{ matrix with row } i \text{ and column } j \text{ removed})
In words

capital C i j equals (-1) to the power i plus j, end of power, the determinant of ( the the quantity n minus 1, all times the quantity n minus 1, matrix with row i and column j removed )

The signs form a checkerboard, starting with ++ in the corner (p. 21). (The determinant before the sign is attached is called a minor.) The cofactor formula along row 1, or along any row ii (p. 21):

Cofactor formula
det⁡A=a11C11+a12C12+⋯+a1nC1n\det A = a_{11}C_{11} + a_{12}C_{12} + \cdots + a_{1n}C_{1n}
In words

the determinant of capital A equals a one one capital C one one plus a one two capital C one two plus and so on plus a one n capital C one n

One could start the whole subject this way, building determinants from smaller ones down to 1×11 \times 1 (p. 22). For 2×22 \times 2: the cofactor of aa is dd, that of bb is −c-c, so det⁡=ad+b(−c)\det = ad + b(-c) (p. 22).

Three formulas (p. 23): the product of the pivots, where elimination builds in all the complication efficiently; the big formula with its n!n! terms spread out; and the cofactor formula in between, easy numbers times smaller determinants.

Tridiagonal matrices of ones#

Let AnA_n be the n×nn \times n matrix with ones on the main diagonal and the diagonals just above and below it, zeros elsewhere (transcript, p. 23). Then ∣A1∣=1|A_1| = 1, ∣A2∣=0|A_2| = 0, and ∣A3∣=−1|A_3| = -1 (pp. 24–25). For general nn, use cofactors along row 1 (pp. 26–27): the corner 1 gives ∣An−1∣|A_{n-1}|, and the 1 in position (1, 2) gives minus a determinant whose own cofactor expansion down its first column leaves ∣An−2∣|A_{n-2}|:

The recursion
∣An∣=∣An−1∣−∣An−2∣|A_n| = |A_{n-1}| - |A_{n-2}|
In words

the absolute value of capital A sub n equals the absolute value of capital A n minus 1 minus the absolute value of capital A n minus 2

So the sequence is 1,0,−1,−1,0,11, 0, -1, -1, 0, 1, and then it repeats: the determinants have period 6, and ∣A61∣=∣A1∣=1|A_{61}| = |A_1| = 1 (p. 28).

Worked example

Formulas of your own

(a) Find det⁡(201130014)\det\begin{pmatrix} 2 & 0 & 1 \\ 1 & 3 & 0 \\ 0 & 1 & 4 \end{pmatrix} by the big formula and by cofactors along row 1. (b) Let TnT_n be tridiagonal with 4 on the diagonal and 1 on the two neighbouring diagonals. Find the recursion and ∣T4∣|T_4|.

(a) Big formula

Of the six terms, only a11a22a33=2⋅3⋅4=24a_{11}a_{22}a_{33} = 2 \cdot 3 \cdot 4 = 24 (plus) and a13a21a32=1⋅1⋅1=1a_{13}a_{21}a_{32} = 1 \cdot 1 \cdot 1 = 1 (plus) are nonzero: det⁡=25\det = 25.

(a) Cofactors

2∣3014∣−0+1∣1301∣=2⋅12+1=252\begin{vmatrix} 3 & 0 \\ 1 & 4 \end{vmatrix} - 0 + 1\begin{vmatrix} 1 & 3 \\ 0 & 1 \end{vmatrix} = 2 \cdot 12 + 1 = 25.

(b) The recursion

The same cofactor steps as for AnA_n give ∣Tn∣=4∣Tn−1∣−∣Tn−2∣|T_n| = 4|T_{n-1}| - |T_{n-2}| (the corner entry is now 4, the off-diagonal ones still multiply to 1). With ∣T1∣=4|T_1| = 4 and ∣T2∣=16−1=15|T_2| = 16 - 1 = 15: ∣T3∣=60−4=56|T_3| = 60 - 4 = 56 and ∣T4∣=224−15=209|T_4| = 224 - 15 = 209.

Summary#

  • Linearity in each row turns det⁡A\det A into a sum over pieces with one entry from each row and column.
  • Big formula: n!n! terms ±a1αa2β⋯anω\pm a_{1\alpha}a_{2\beta}\cdots a_{n\omega}, with the sign of the permutation.
  • Cofactors: Cij=(−1)i+jC_{ij} = (-1)^{i+j} times a determinant of size n−1n - 1; det⁡A=∑ja1jC1j\det A = \sum_j a_{1j}C_{1j}.
  • Three formulas: pivots, big formula, cofactors. Tridiagonal ones: ∣An∣=∣An−1∣−∣An−2∣|A_n| = |A_{n-1}| - |A_{n-2}|, period 6.

Symbols on this page

Show the 54 symbols used here
α\alpha alpha.
The column number used in row 1, in the big formula. Say it: “alpha”.
β\beta beta.
The column number used in row 2. Say it: “beta” (sounds like “bay-ta or bee-ta”).
γ\gamma gamma.
The column number used in row 3. Say it: “gamma”.
ω\omega omega.
The column number used in the last row. Say it: “omega”.
±\pm plus or minus.
Plus or minus: both signs, or an uncertainty (67.3 ± 1.2). Say it: “plus or minus”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
∑\sum sum.
Sum: add up the terms over the range written below and above. Say it: “the sum of”.
det⁡\det determinant.
Determinant of a matrix. Say it: “the determinant of”.
aa a.
The top left entry of a 2 × 2 matrix (or of the first row). Say it: “a”.
cc c.
The bottom left entry of a 2 × 2 matrix. Say it: “c”.
dd d.
The bottom right entry of a 2 × 2 matrix. Say it: “d”.
ii i.
A row number. Say it: “i”.
jj j.
A column number. Say it: “j”.
nn n.
The size of the matrix. Say it: “n”.
AA A.
A square matrix. Say it: “capital A”.
BB B.
A second matrix, in det AB. Say it: “capital B”.
bb b.
The top right entry of a 2 × 2 matrix. Say it: “b”.
T1T_{1} T one.
The 1 × 1 matrix (4) of the worked example. Say it: “capital T one”.
T2T_{2} T two.
The 2 × 2 tridiagonal matrix with 4 on the diagonal and 1 beside it. Say it: “capital T two”.
T3T_{3} T three.
The 3 × 3 tridiagonal matrix of the worked example. Say it: “capital T three”.
A1A_{1} A 1.
The 1 × 1 tridiagonal matrix of ones. Say it: “capital A one”.
A2A_{2} A 2.
The 2 × 2 tridiagonal matrix of ones. Say it: “capital A two”.
A3A_{3} A 3.
The 3 × 3 tridiagonal matrix of ones. Say it: “capital A three”.
C12C_{12} C one two.
The cofactor of a₁₂. Say it: “capital C one two”.
AnA_{n} A sub n.
The n × n tridiagonal matrix of ones. Say it: “capital A sub n”.
a31a_{31} a sub 31.
The entry of A in row 3, column 1. Say it: “a sub 31”.
a32a_{32} a sub 32.
The entry of A in row 3, column 2. Say it: “a sub 32”.
a11a_{11} a one one.
The entry of A in row 1, column 1. Say it: “a one one”.
a22a_{22} a two two.
The entry of A in row 2, column 2. Say it: “a two two”.
a33a_{33} a three three.
The entry of A in row 3, column 3. Say it: “a three three”.
a23a_{23} a two three.
The entry of A in row 2, column 3. Say it: “a two three”.
a12a_{12} a one two.
The entry of A in row 1, column 2. Say it: “a one two”.
a21a_{21} a two one.
The entry of A in row 2, column 1. Say it: “a two one”.
a13a_{13} a one three.
The entry of A in row 1, column 3. Say it: “a one three”.
a1αa_{1\alpha} a one alpha.
The entry chosen from row 1, in column α. Say it: “a one alpha”.
a2βa_{2\beta} a two beta.
The entry chosen from row 2, in column β. Say it: “a two beta”.
a3γa_{3\gamma} a three gamma.
The entry chosen from row 3, in column γ. Say it: “a three gamma”.
anωa_{n\omega} a n omega.
The entry chosen from the last row, in column ω. Say it: “a n omega”.
CijC_{\text{ij}} C i j.
The cofactor of aᵢⱼ: (−1)^(i+j) times the determinant with row i and column j removed. Say it: “capital C i j”.
C11C_{11} C one one.
The cofactor of a₁₁. Say it: “capital C one one”.
C1nC_{1n} C one n.
The cofactor of a₁ₙ. Say it: “capital C one n”.
C1jC_{1j} C one j.
The cofactor of a₁ⱼ. Say it: “capital C one j”.
C23C_{23} C two three.
The cofactor of a₂₃. Say it: “capital C two three”.
a1na_{1n} a one n.
The last entry of row 1. Say it: “a one n”.
a1ja_{1j} a one j.
The entry of A in row 1, column j. Say it: “a one j”.
anna_{\text{nn}} a n n.
The last diagonal entry of A. Say it: “a n n”.
An−1A_{n-1} A n minus 1.
The (n − 1) × (n − 1) tridiagonal matrix of ones. Say it: “capital A n minus 1”.
An−2A_{n-2} A n minus 2.
The (n − 2) × (n − 2) tridiagonal matrix of ones. Say it: “capital A n minus 2”.
A61A_{61} A sixty-one.
The 61 × 61 tridiagonal matrix of ones. Say it: “capital A sixty-one”.
TnT_{n} T n.
The n × n tridiagonal matrix with 4 on the diagonal and 1 on the neighbouring diagonals. Say it: “capital T n”.
T4T_{4} T four.
The 4 × 4 tridiagonal matrix of the worked example. Say it: “capital T four”.
Tn−1T_{n-1} T n minus 1.
The matrix T one size smaller. Say it: “capital T n minus 1”.
Tn−2T_{n-2} T n minus 2.
The matrix T two sizes smaller. Say it: “capital T n minus 2”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 15 words used here

Also used

determinant.
A single number worked out from a square array of numbers (a matrix), which measures how the matrix stretches areas or volumes. Explained in Determinants and the cross product.
cofactor.
A minor of a matrix with a plus or minus sign attached, following a checkerboard of signs that starts with plus in the top-left corner. Explained in Planes through three points, and matrices.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
linear.
Of a map, operator or equation: respecting sums and multiples, so that L(au + bv) = aL(u) + bL(v). Explained in The geometry of linear equations.
row exchange.
Swapping two rows of a matrix, needed in elimination when a zero sits where a pivot should be.
permutation.
A rearrangement of a list of things into a new order. Explained in Elimination with matrices.
permutation matrix.
A matrix made by reordering the rows of the identity matrix; multiplying by it reorders the rows of another matrix the same way. Explained in Elimination with matrices.
matrix.
A rectangular table of numbers, which acts on vectors to give new ones and so describes a linear change of coordinates. Explained in Planes through three points, and matrices.
singular.
Of a square matrix: having no inverse, because its determinant is zero and some nonzero vector is sent to zero. Explained in The geometry of linear equations.
minor.
The determinant left after deleting one row and one column of a square matrix.
pivot.
In elimination, the first nonzero number in a row, used to clear out the entries below it. Explained in Positive definite matrices and minima.
elimination.
Solving equations by subtracting multiples of one from another until each unknown can be found in turn. Explained in The geometry of linear equations.
diagonal.
In a square matrix, the entries running from the top left corner to the bottom right; a diagonal matrix has zeros everywhere else. Explained in The four fundamental subspaces.
recursion.
A rule giving each term from the ones before it, or a method that solves a problem by applying itself to smaller copies of it. Explained in Complex matrices and the fast Fourier transform.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

31 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. How many terms does the big formula have for a 5×55 \times 5 determinant?
  2. What sign does the cofactor C23C_{23} carry in front of its minor?
  3. Which sign does the product of the counter-diagonal entries of a 4×44 \times 4 matrix carry in the big formula?
0 of 3 answered

Flashcards

1 / 3