Determinants

Contents

Definition of detA\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 ikili_k\neq i_l for all klk\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<lik>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

ϵi1i2in=(1)δ(i1,i2,,in)={+1if δ(i1,,in) is even1if δ(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 ϵi1i2in\epsilon_{i_1i_2\cdots i_n} is called the Levi-Civita symbol.

The determinant

detA=defi1,,inϵi1i2ina1i1a2i2anin\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 ϵi1i2in\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=adbc\left| \begin{matrix} a & b \\ c & d \end{matrix} \right| = ad-bc

3×33\times3 determinants

a1a2a3b1b2b3c1c2c3=a1b2c3a1b3c2a2b1c3+a2b3c1+a3b1c2a3b2c1\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:

a11a12a1n0a22a2n00a33a3n000ann=a11a22ann\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

detI=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=(detA)(detC)\left|\begin{matrix} A & B \\ 0 & C \end{matrix}\right| = (\det A)(\det C)

Properties

Determinant of the transpose

detA=detA\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 detA=detB\det A = -\det B

The determinant as a function of its rows

If we have nn row vectors a1,,anFna_1, \dots ,a_n\in\F^n, given by

a1=(a11a12a1n),a2=(a21a22a2n),an=(an1an2ann),\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)=a11a12a1na21a22a2nan1an2ann\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,,anFna, b, a_1, a_2, \dots, a_n\in \F^n and tFt\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 (n1)×(n1)(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+jdetA~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

detA=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 iji\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:

123321243=a21c21+a22c22+a23c23=32143+2132311224=\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=CA=(detA)I,AC^\top = C^\top A= (\det A) \, I,

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

A1=1detAC.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+jdetA~ijc_{ij}=(-1)^{i+j}\det \tilde A_{ij}. Consider B=ACB=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 iji\neq j then rows ii and jj in the resulting determinant are equal, so the determinant vanishes: Bij=0B_{ij}=0 for all iji\neq j.

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

The result is

AC=(detA0000detA0000detA0000detA)=(detA)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 yFny\in\F^n the solution of Ax=yAx=y is given by

x1=y1a12a1ny2a22a2nynan2anna11a12a1na12a22a2na1nan2ann,x2=a11y1a1na12y2a2na1nynanna11a12a1na12a22a2na1nan2ann,,xn=a11a12y1a12a22y2a1nan2yna11a12a1na12a22a2na1nan2ann,\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 CyC^\top y:

Cy=(c11c21cn1c1nc2ncnn)(y1yn)=(y1c11++yncn1y1c1n++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=A1yx=A^{-1}y is given by

x=1detA(y1c11++yncn1y1c1n++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++yncnidetA.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 detA\det A with the column vector yy.

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

(abcd)1=1adbc(dbca)\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)=A0IB(add the first n columns B timesto the second n columns)=AABI0=(1)nIA0AB=(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,

A0IB=a11a12a1n000a21a22a2n000an1an2ann000100b11b12b1n010b21b22b2n001bn1bn2bnn. \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:

A0IB=a11a12a1na11b11a11b12a11b1na21a22a2na21b11a21b12a21b1nan1an2annan1b11an1b12an1b1n100000010b21b22b2n001bn1bn2bnn \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

A0IB=a11a12a1na11b11+a12b21a11b1n+a12b21a21a22a2na21b11+a22b21a21b1n+a22b21an1an2annan1b11+an2b21an1b1n+an2b211000001000001bn1bnn \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

A0IB=a11a12a1na11b11++a1nbn1a11b1n++a1nbnna21a22a2na21b11++a2nbn1a21b1n++a2nbnnan1an2annan1b11++annbn1an1b1n++annbnn100000100000100 \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

A0IB=AABI0. \left|\begin{matrix} A & 0 \\ -I & B \end{matrix} \right| = \left|\begin{matrix} A & AB \\ -I & 0 \end{matrix}\right|.

Theorem. AA is invertible     detA0\iff \det A\neq 0

Proof

If AA is invertible then the matrix B=A1B=A^{-1} satisfies AB=IAB=I. This implies det(AB)=1\det (AB)=1 and hence (detA)(detB)=1(\det A) (\det B)=1. Therefore detA0\det A\neq0.

Conversely, if detA0\det A\neq0 then AA is invertible because we have a formula for its inverse, A1=CdetAA^{-1}= \frac{C^\top}{\det A}.

Theorem. If a1,,anFna_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,,cnFc_1, \dots, c_n\in\F we have

c1a1++cnan=A(c1an).c_1a_1+\cdots+c_na_n = A\mat c_1\\ \vdots \\ a_n\rix.

detA0    {a1,,an}\det A\neq0\implies \{a_1, \dots, a_n\} independent. If detA0\det A\neq 0 then AA is invertible. This implies that N(A)={0}N(A)=\{0\}. Suppose that there are c1,,cnFc_1, \dots, c_n\in\F with c1a1++cnan=0c_1a_1+\cdots+c_na_n=0. Then c=(c1cn)c=\tmat c_1\\\vdots\\ c_n\trix satisfies Ac=0Ac=0, so cN(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 detA0\det A\neq 0. Any cN(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 detA0\det A\neq 0.