Determinants

Contents

Definition of det⁡A\det A

Permutations

A permutation of (1,2,…,n)(1,2,\dots,n) is a sequence of nn integers i1,…,in∈{1,…,n}i_1, \dots, i_n\in\{1,\dots,n\} such that ik≠ili_k\neq i_l for all k≠lk\neq l.

For example, all possible permutations of (1,2,3)(1,2,3) are

(1,2,3),(1,3,2),(2,1,3),(2,3,1),(3,1,2),(3,2,2).(1, 2, 3), \quad (1, 3, 2), \quad (2, 1, 3), \quad (2, 3, 1), \quad (3, 1, 2), \quad (3, 2, 2).

There are n!n! permutations of (1,2,…,n)(1,2,\dots ,n).

Sign of a permutation

By definition, the number of inversions of a permutation (i1,…,in)(i_1,\dots, i_n) is

δ(i1,…,in)=def#{k<l∣ik>il}\delta(i_1, \dots, i_n) \stackrel{\rm def}{=} \# \{k<l \mid i_k>i_l\}

A permutation (i1,i2,…,in)(i_1, i_2, \dots, i_n) is called even if δ(i1,…,in)\delta(i_1,\dots, i_n) is even.

A permutation (i1,i2,…,in)(i_1, i_2, \dots, i_n) is called odd if δ(i1,…,in)\delta(i_1,\dots, i_n) is odd.

The sign of the permutation (i1,…,in)(i_1, \dots, i_n) is defined to be

ϵi1i2⋯in=(−1)δ(i1,i2,…,in)={+1if δ(i1,…,in) is even−1if δ(i1,…,in) is odd\epsilon_{i_1i_2\cdots i_n} = (-1)^{\delta(i_1, i_2, \dots, i_n)} = \begin{cases} +1&\text{if } \delta(i_1, \dots, i_n) \text{ is even}\\ -1&\text{if } \delta(i_1, \dots, i_n) \text{ is odd}\\ \end{cases}

The quantity ϵi1i2⋯in\epsilon_{i_1i_2\cdots i_n} is called the Levi-Civita symbol.

The determinant

det⁡A=def∑i1,…,inϵi1i2⋯in a1i1a2i2⋯anin\det A \stackrel{\rm def}{=} \sum_{i_1, \dots, i_n} \epsilon_{i_1i_2\cdots i_n} \,a_{1i_1}a_{2i_2}\cdots a_{ni_n}

Properties of the sign ϵi1i2⋯in\epsilon_{i_1i_2\cdots i_n}

What is the sign of a14a22a35a43a51a_{14}a_{22}a_{35}a_{43}a_{51} when you expand a 5×55\times 5 determinant

The question can be rephrased as: compute ϵ42531\epsilon_{42531}

∣a11a12a13a14a15a21a22a23a24a25a31a32a33a34a35a41a42a43a44a45a51a52a53a54a55∣\left|\begin{matrix} a_{11}&a_{12}&a_{13}&a_{14}&a_{15} \\ a_{21}&a_{22}&a_{23}&a_{24}&a_{25} \\ a_{31}&a_{32}&a_{33}&a_{34}&a_{35} \\ a_{41}&a_{42}&a_{43}&a_{44}&a_{45} \\ a_{51}&a_{52}&a_{53}&a_{54}&a_{55} \end{matrix} \right|

Special cases

2×22\times2 determinants

∣abcd∣=ad−bc\left| \begin{matrix} a & b \\ c & d \end{matrix} \right| = ad-bc

3×33\times3 determinants

∣a1a2a3b1b2b3c1c2c3∣=a1b2c3−a1b3c2−a2b1c3+a2b3c1+a3b1c2−a3b2c1\left| \begin{matrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{matrix} \right| = a_1b_2c_3 -a_1b_3c_2 - a_2b_1c_3 + a_2b_3c_1 +a_3b_1c_2-a_3b_2c_1

Determinant of upper triangular matrices

If all entries of a matrix below its diagonal are zero, then the determinant of the matrix is the product of its diagonal entries:

∣a11a12⋯⋯a1n0a22⋯⋯a2n00a33⋯a3n⋯⋯⋯⋯⋯00⋯0ann∣=a11a22⋯ann\left|\begin{matrix} a_{11}&a_{12}&\cdots &\cdots&a_{1n} \\ 0&a_{22}&\cdots &\cdots&a_{2n} \\ 0 & 0&a_{33} &\cdots&a_{3n} \\ \cdots& \cdots&\cdots &\cdots&\cdots \\ 0& 0&\cdots & 0 &a_{nn} \end{matrix}\right|= a_{11}a_{22}\cdots a_{nn}

Determinant of the identity matrix

det⁡I=1.\det I = 1.

Determinant of block triangular matrices

If AA is a k×kk\times k matrix, BB an k×lk\times l matrix, and CC an l×ll\times l matrix then

∣AB0C∣=(det⁡A)(det⁡C)\left|\begin{matrix} A & B \\ 0 & C \end{matrix}\right| = (\det A)(\det C)

Properties

Determinant of the transpose

det⁡A⊤=det⁡A\det A^\top = \det A

Swapping rows or columns changes the sign

If BB is the matrix you get by swapping two rows, or by swapping two columns in the matrix AA, then det⁡A=−det⁡B\det A = -\det B

The determinant as a function of its rows

If we have nn row vectors a1,…,an∈Fna_1, \dots ,a_n\in\F^n, given by

a1=(a11a12⋯a1n),a2=(a21a22⋯a2n),⋮an=(an1an2⋯ann),\begin{aligned} a_1 &= \mat a_{11} & a_{12} & \cdots & a_{1n} \rix, \\ a_2 &= \mat a_{21} & a_{22} & \cdots & a_{2n} \rix, \\ &\qquad\vdots \\ a_n &= \mat a_{n1} & a_{n2} & \cdots & a_{nn} \rix, \end{aligned}

then we define

det⁡(a1,a2,…,an)=∣a11a12⋯a1na21a22⋯a2n⋮⋮⋮an1an2⋯ann∣\det(a_1, a_2, \dots, a_n) = \left|\begin{matrix} a_{11}&a_{12}&\cdots&a_{1n} \\ a_{21}&a_{22}&\cdots&a_{2n} \\ \vdots&\vdots& &\vdots \\ a_{n1}&a_{n2}&\cdots&a_{nn} \end{matrix} \right|

One has for all a,b,a1,a2,…,an∈Fna, b, a_1, a_2, \dots, a_n\in \F^n and t∈Ft\in \F:

det⁡(a+b,a2,a3,…,an)=det⁡(a,a2,a3,…,an)+det⁡(b,a2,a3,…,an)det⁡(ta,a2,a3,…,an)=tdet⁡(a,a2,a3,…,an)det⁡(a1,…,ai,…,aj,…an)=−det⁡(a1,…,aj,…,ai,…an)det⁡(a1,…,ai,…,ai,…an)=0det⁡(a1,…,ai,…,aj,…an)=det⁡(a1,…,ai+taj,…,aj,…an)\begin{aligned} \det(a+b, a_2, a_3, \dots, a_n) &= \det(a, a_2, a_3, \dots, a_n)+\det(b, a_2, a_3, \dots, a_n)\\ \det(ta, a_2, a_3, \dots, a_n) &= t\det(a, a_2, a_3, \dots, a_n) \\ \det(a_1, \dots,a_i, \dots, a_j,\dots a_n) &= - \det(a_1, \dots,a_j, \dots, a_i,\dots a_n)\\ \det(a_1, \dots,a_i, \dots, a_i,\dots a_n) &= 0\\ \det(a_1, \dots,a_i, \dots, a_j,\dots a_n) &= \det(a_1, \dots,a_i+ta_j, \dots, a_j,\dots a_n) \end{aligned}

Consequence: if {a1,…,an}\{a_1, \dots, a_n\} is linearly dependent, then det⁡(a1,…,an)=0\det(a_1, \dots, a_n)=0

Cofactor expansion

The ijij-minor of an n×nn\times n matrix AA is the (n−1)×(n−1)(n-1)\times(n-1) matrix obtained by deleting the ithi^{\rm th} row and jthj^{\rm th} column from AA. Our textbook uses the notation A~ij\tilde A_{ij} for the ijij-minor of AA.

The ijij-cofactor of the matrix AA is the number

cij=(−1)i+jdet⁡A~ijc_{ij} = (-1)^{i+j}\det \tilde A_{ij}

Cofactor Expansion Theorem. If A=(aij)A=(a_{ij}) is an n×nn\times n matrix, then one has

det⁡A=ai1ci1+ai2ci2+⋯+aincin\det A = a_{i1}c_{i1} + a_{i2}c_{i2} + \cdots + a_{in}c_{in}

for any i∈{1,2,…,n}i\in\{1,2, \dots, n\}.

A consequence of the cofactor expansion theorem is that if i≠ji\neq j then

aj1ci1+aj2ci2+⋯+ajncin=0.a_{j1}c_{i1} + a_{j2}c_{i2} + \cdots + a_{jn}c_{in} = 0.

Example

Expanding a 3×33\times3 determinant along its middle row:

∣123321−243∣=a21c21+a22c22+a23c23=−3⋅∣2143∣+2⋅∣13−23∣−1⋅∣12−24∣=⋯\begin{aligned} \deter1 & 2 & 3 \\ 3&2&1 \\ -2&4&3\minant &= a_{21}c_{21} + a_{22}c_{22} + a_{23}c_{23}\\ &=-3\cdot\deter2 &1\\ 4&3\minant +2\cdot\deter1&3\\-2&3\minant -1\cdot\deter1&2\\-2&4\minant=\cdots \end{aligned}

A formula to invert a matrix and Cramer's rule

Theorem. For any n×nn\times n matrix AA one has

AC⊤=C⊤A=(det⁡A) I,AC^\top = C^\top A= (\det A) \, I,

where CC is the cofactor matrix of AA. If det⁡A≠0\det A\neq0 then AA is invertible, and the inverse matrix is given by

A−1=1det⁡AC⊤.A^{-1} = \frac{1}{\det A} C^\top.

Proof

Let A=(aij)A = (a_{ij}) and C=(cij)C=(c_{ij}) where cij=(−1)i+jdet⁡A~ijc_{ij}=(-1)^{i+j}\det \tilde A_{ij}. Consider B=AC⊤B=AC^\top. By definition of matrix multiplication you have

Bij=ai1cj1+⋯+aincjnB_{ij} = a_{i1}c_{j1}+\cdots+a_{in}c_{jn}

The expression on the right is what we get if we replace the jthj^{\rm th} row of the matrix AA with (ai1  ⋯  ain)(a_{i1}\;\cdots\;a_{in}), i.e. with the ithi^{\rm th} row of AA.

If i≠ji\neq j then rows ii and jj in the resulting determinant are equal, so the determinant vanishes: Bij=0B_{ij}=0 for all i≠ji\neq j.

If i=ji=j then replacing row jj with row ii does nothing, and we just get det⁡A\det A: you get Bii=det⁡AB_{ii}=\det A for all ii.

The result is

AC⊤=(det⁡A00⋯00det⁡A0⋯000det⁡A⋯0⋱000det⁡A)=(det⁡A) I.AC^\top =\mat \det A & 0 & 0& \cdots & 0\\ 0&\det A & 0& \cdots & 0\\ 0& 0&\det A& \cdots & 0\\ & & & \ddots & \\ 0 & 0 & 0 & & \det A \rix =(\det A) \,I.

Cramer's rule. For any y∈Fny\in\F^n the solution of Ax=yAx=y is given by

x1=∣y1a12…a1ny2a22…a2n…ynan2…ann∣∣a11a12…a1na12a22…a2n…a1nan2…ann∣,x2=∣a11y1…a1na12y2…a2n…a1nyn…ann∣∣a11a12…a1na12a22…a2n…a1nan2…ann∣,…,xn=∣a11a12…y1a12a22…y2…a1nan2…yn∣∣a11a12…a1na12a22…a2n…a1nan2…ann∣,\begin{gathered} x_1=\frac{\deter y_1 & a_{12} &\dots& a_{1n}\\ y_2 & a_{22} &\dots& a_{2n}\\ & &\dots& \\ y_n & a_{n2} &\dots& a_{nn} \minant}{\deter a_{11} & a_{12} &\dots& a_{1n}\\ a_{12} & a_{22} &\dots& a_{2n}\\ & &\dots& \\ a_{1n} & a_{n2} &\dots& a_{nn} \minant},\quad x_2=\frac{\deter a_{11} &y_1 &\dots& a_{1n}\\ a_{12} &y_2 &\dots& a_{2n}\\ & &\dots& \\ a_{1n} &y_n &\dots& a_{nn} \minant}{\deter a_{11} & a_{12} &\dots& a_{1n}\\ a_{12} & a_{22} &\dots& a_{2n}\\ & &\dots& \\ a_{1n} & a_{n2} &\dots& a_{nn} \minant},\quad\dots, \\ x_n=\frac{\deter a_{11} & a_{12} &\dots&y_1 \\ a_{12} & a_{22} &\dots&y_2 \\ & &\dots& \\ a_{1n} & a_{n2} &\dots&y_n \minant}{\deter a_{11} & a_{12} &\dots& a_{1n}\\ a_{12} & a_{22} &\dots& a_{2n}\\ & &\dots& \\ a_{1n} & a_{n2} &\dots& a_{nn} \minant},\quad \end{gathered}

Proof

We compute C⊤yC^\top y:

C⊤y=(c11c21⋯cn1⋮⋮c1nc2n⋯cnn)(y1⋮yn)=(y1c11+⋯+yncn1⋮y1c1n+⋯+yncnn)\begin{aligned} C^\top y &= \mat c_{11} & c_{21} & \cdots & c_{n1} \\ \vdots&&&\vdots\\ c_{1n} & c_{2n} & \cdots &c_{nn} \rix \mat y_1\\\vdots\\ y_n\rix \\ &=\mat y_1c_{11}+\cdots+y_nc_{n1} \\ \vdots \\ y_1c_{1n}+\cdots+y_nc_{nn} \rix \end{aligned}

Our formula for the inverse of AA implies that the solution x=A−1yx=A^{-1}y is given by

x=1det⁡A(y1c11+⋯+yncn1⋮y1c1n+⋯+yncnn)x= \frac{1}{\det A}\mat y_1c_{11}+\cdots+y_nc_{n1} \\ \vdots \\ y_1c_{1n}+\cdots+y_nc_{nn} \rix

Thus the ithi^{\rm th} component x1x_1 of the solution is given by

xi=y1c1i+⋯+yncnidet⁡A.x_i = \frac{y_1c_{1i}+\cdots+y_nc_{ni}}{\det A}.

The numerator in this fraction is the determinant that we get by replacing the ithi^{\rm th} column in det⁡A\det A with the column vector yy.

Example the inverse of a 2×22\times 2 matrix

(abcd)−1=1ad−bc(d−b−ca)\mat a&b\\c&d\rix^{-1} = \frac{1}{ad-bc}\mat d &-b \\ -c & a\rix

Determinant of a matrix product

Theorem. For any two n×nn\times n matrices AA and BB one has

det⁡(AB)=det⁡(A) det⁡(B)\det (AB) = \det (A)\, \det (B)

Proof

The short version of the proof uses block matrix notation and goes like this:

det⁡(A)det⁡(B)=∣A0−IB∣(add the first n columns B timesto the second n columns)=∣AAB−I0∣=(−1)n∣−IA0AB∣=(−1)ndet⁡(−I)det⁡(AB)=det⁡(AB) \begin{aligned} \det(A)\det(B) &= \left|\begin{matrix} A & 0 \\ -I & B \end{matrix} \right|\qquad \begin{pmatrix} \textsf{\footnotesize add the first $n$ columns $B$ times}\\\textsf{\footnotesize to the second $n$ columns}\\ \end{pmatrix}\\ &= \left|\begin{matrix} A & AB \\ -I & 0 \end{matrix} \right| \\ &= (-1)^n\left|\begin{matrix} -I & A \\ 0 & AB \end{matrix} \right| \\ &=(-1)^n\det(-I)\det(AB) \\ &=\det(AB) \end{aligned}

If we avoid block matrix notation then we get the following more detailed version of the computation. By definition,

∣A0−IB∣=∣a11a12⋯a1n00⋯0a21a22⋯a2n00⋯0⋮⋱an1an2⋯ann00⋯0−10⋯0b11b12⋯b1n0−10b21b22⋯b2n⋮⋮⋮⋮00⋯−1bn1bn2⋯bnn∣. \left|\begin{matrix} A & 0 \\ -I & B \end{matrix} \right| = \left|\begin{matrix} a_{11}&a_{12}& \cdots &a_{1n} & 0 & 0& \cdots & 0 \\ a_{21}&a_{22}& \cdots &a_{2n} & 0 & 0& \cdots & 0 \\ &&\vdots &&&\ddots & \\ a_{n1}&a_{n2}& \cdots &a_{nn} & 0 & 0& \cdots & 0 \\[3px] -1&0 &\cdots& 0 &b_{11} & b_{12} & \cdots & b_{1n} \\ 0 &-1& & 0 & b_{21} & b_{22} & \cdots & b_{2n} \\ & & \vdots & \vdots & \vdots & & \vdots \\ 0 &0 & \cdots & -1& b_{n1} & b_{n2} & \cdots & b_{nn} \\ \end{matrix} \right|.

Add the first column b11b_{11} times to column (n+1)(n+1), the second column b12b_{12} times to column (n+2)(n+2), etc, clearing out the top row in the bb section. The result is:

∣A0−IB∣=∣a11a12⋯a1na11b11a11b12⋯a11b1na21a22⋯a2na21b11a21b12⋯a21b1n⋮⋱an1an2⋯annan1b11an1b12⋯an1b1n−10⋯000⋯00−10b21b22⋯b2n⋮⋮⋮⋮00⋯−1bn1bn2⋯bnn∣ \left|\begin{matrix} A & 0 \\ -I & B \end{matrix} \right| = \left|\begin{matrix} a_{11}&a_{12}& \cdots &a_{1n} & a_{11}b_{11} & a_{11}b_{12}& \cdots & a_{11}b_{1n} \\ a_{21}&a_{22}& \cdots &a_{2n} & a_{21}b_{11} & a_{21}b_{12}& \cdots & a_{21}b_{1n} \\ &&\vdots &&&\ddots & \\ a_{n1}&a_{n2}& \cdots &a_{nn} & a_{n1}b_{11} & a_{n1}b_{12}& \cdots & a_{n1}b_{1n} \\[6px] -1&0 &\cdots& 0 &0 & 0 & \cdots & 0 \\ 0 &-1& & 0 & b_{21} & b_{22} & \cdots & b_{2n} \\ & & \vdots & \vdots & \vdots & & \vdots \\ 0 &0 & \cdots & -1& b_{n1} & b_{n2} & \cdots & b_{nn} \\ \end{matrix} \right|

Next clear out the second row in the bb-section. We get

∣A0−IB∣=∣a11a12⋯a1na11b11+a12b21⋯a11b1n+a12b21a21a22⋯a2na21b11+a22b21⋯a21b1n+a22b21⋮⋱an1an2⋯annan1b11+an2b21⋯an1b1n+an2b21−10⋯00⋯00−100⋯0⋮⋮⋮⋮00⋯−1bn1⋯bnn∣ \left|\begin{matrix} A & 0 \\ -I & B \end{matrix} \right| = \left|\begin{matrix} a_{11}&a_{12}& \cdots &a_{1n} & a_{11}b_{11}+a_{12}b_{21}&\cdots& a_{11}b_{1n}+a_{12}b_{21} \\ a_{21}&a_{22}& \cdots &a_{2n} & a_{21}b_{11}+a_{22}b_{21}&\cdots& a_{21}b_{1n}+a_{22}b_{21} \\ &&\vdots &&&\ddots & \\ a_{n1}&a_{n2}& \cdots &a_{nn} & a_{n1}b_{11}+a_{n2}b_{21}&\cdots& a_{n1}b_{1n}+a_{n2}b_{21} \\[6px] -1&0 &\cdots& 0 & 0 & \cdots & 0 \\ 0 &-1& & 0 & 0 & \cdots & 0 \\ & & \vdots & \vdots & \vdots & & \vdots \\ 0 &0 & \cdots & -1& b_{n1} & \cdots & b_{nn} \\ \end{matrix} \right|

Repeating this for the remaining rows in the bb-section of the determinant, we end up with

∣A0−IB∣=∣a11a12⋯a1na11b11+⋯+a1nbn1⋯a11b1n+⋯+a1nbnna21a22⋯a2na21b11+⋯+a2nbn1⋯a21b1n+⋯+a2nbnn⋮⋱an1an2⋯annan1b11+⋯+annbn1⋯an1b1n+⋯+annbnn−10⋯00⋯00−100⋯0⋮⋮⋮⋮00⋯−10⋯0∣ \left|\begin{matrix} A & 0 \\ -I & B \end{matrix} \right| = \left|\begin{matrix} a_{11}&a_{12}& \cdots &a_{1n} & a_{11}b_{11}+\cdots+a_{1n}b_{n1}&\cdots& a_{11}b_{1n}+\cdots+a_{1n}b_{nn} \\ a_{21}&a_{22}& \cdots &a_{2n} & a_{21}b_{11}+\cdots+a_{2n}b_{n1}&\cdots& a_{21}b_{1n}+\cdots+a_{2n}b_{nn} \\ &&\vdots &&&\ddots & \\ a_{n1}&a_{n2}& \cdots &a_{nn} & a_{n1}b_{11}+\cdots+a_{nn}b_{n1}&\cdots& a_{n1}b_{1n}+\cdots+a_{nn}b_{nn} \\[6px] -1&0 &\cdots& 0 & 0 & \cdots & 0 \\ 0 &-1& & 0 & 0 & \cdots & 0 \\ & & \vdots & \vdots & \vdots & & \vdots \\ 0 &0 & \cdots & -1& 0 & \cdots & 0 \\ \end{matrix} \right|

i.e. we have

∣A0−IB∣=∣AAB−I0∣. \left|\begin{matrix} A & 0 \\ -I & B \end{matrix} \right| = \left|\begin{matrix} A & AB \\ -I & 0 \end{matrix}\right|.

Theorem. AA is invertible   ⟺  det⁡A≠0\iff \det A\neq 0

Proof

If AA is invertible then the matrix B=A−1B=A^{-1} satisfies AB=IAB=I. This implies det⁡(AB)=1\det (AB)=1 and hence (det⁡A)(det⁡B)=1(\det A) (\det B)=1. Therefore det⁡A≠0\det A\neq0.

Conversely, if det⁡A≠0\det A\neq0 then AA is invertible because we have a formula for its inverse, A−1=C⊤det⁡AA^{-1}= \frac{C^\top}{\det A}.

Theorem. If a1,…,an∈Fna_1, \dots, a_n\in\F^n then

{a1,…,an}\{a_1, \dots, a_n\} is linearly independent   ⟺  det⁡(a1,…,an)≠0\iff \det (a_1, \dots, a_n)\neq 0

Proof

Consider the matrix AA whose columns are a1,…,ana_1, \dots, a_n. Then for any c1,…,cn∈Fc_1, \dots, c_n\in\F we have

c1a1+⋯+cnan=A(c1⋮an).c_1a_1+\cdots+c_na_n = A\mat c_1\\ \vdots \\ a_n\rix.

det⁡A≠0  ⟹  {a1,…,an}\det A\neq0\implies \{a_1, \dots, a_n\} independent. If det⁡A≠0\det A\neq 0 then AA is invertible. This implies that N(A)={0}N(A)=\{0\}. Suppose that there are c1,…,cn∈Fc_1, \dots, c_n\in\F with c1a1+⋯+cnan=0c_1a_1+\cdots+c_na_n=0. Then c=(c1⋮cn)c=\tmat c_1\\\vdots\\ c_n\trix satisfies Ac=0Ac=0, so c∈N(A)c\in N(A). Therefore c=0c=0, i.e. c1=⋯=cn=0c_1=\cdots=c_n=0. This implies that {a1,…,an}\{a_1, \dots, a_n\} is independent.

{a1,…,an}\{a_1, \dots, a_n\} independent implies det⁡A≠0\det A\neq 0. Any c∈N(A)c\in N(A) satisfies c1a1+⋯+cnan=0c_1a_1+\cdots+c_na_n=0. Since {a1,…,an}\{a_1, \dots, a_n\} is independent this implies c1=⋯=cn=0c_1=\cdots= c_n=0, i.e. c=0c=0. We conclude that N(A)={0}N(A)=\{0\}.
It follows that AA is injective, and hence also that AA is bijective (because of the Bijectivity Theorem). Bijective means the same as invertible, so AA is invertible, and thus det⁡A≠0\det A\neq 0.