Determinants and Cofactor Expansion

Review of Definitions from Part A

Subscript Notation Aij

A subscript AijA_{ij} represents the matrix obtained by deleting the ithi^{th} row and the jthj^{th} column of matrix A.

Example:

For a given matrix:

[123 4910 131416 ]\begin{bmatrix} 1 & 2 & 3 \ 4 & 9 & 10 \ 13 & 14 & 16 \ \end{bmatrix}

A23A_{23} (deleting the second row and the third column) results in:

[12 49 1314 ]\begin{bmatrix} 1 & 2 \ 4 & 9 \ 13 & 14 \ \end{bmatrix}

Definition of the Determinant

Two by Two Matrix

For a matrix [ab cd ]\begin{bmatrix} a & b \ c & d \ \end{bmatrix}, the determinant is defined as ad−bcad - bc.

One by One Matrix

For a one by one matrix, the determinant is simply the scalar value of that matrix.

n by n Matrix

The determinant can be defined using a formula with alternating signs along the top row:

det(A)=a<em>11det(A</em>11)−a<em>12det(A</em>12)+a<em>13det(A</em>13)−…det(A) = a<em>{11}det(A</em>{11}) - a<em>{12}det(A</em>{12}) + a<em>{13}det(A</em>{13}) - \dots

Where A1jA_{1j} is the matrix obtained by deleting the first row and the jthj^{th} column.

Example of Determinant Calculation

Compute the determinant of the matrix:

[120 3−12 −4−35 ]\begin{bmatrix} 1 & 2 & 0 \ 3 & -1 & 2 \ -4 & -3 & 5 \ \end{bmatrix}

Using the definition, we go along the first row:

det(A)=1⋅det([−12 −35 ])−2⋅det([32 −45 ])+0det(A) = 1 \cdot det(\begin{bmatrix} -1 & 2 \ -3 & 5 \ \end{bmatrix}) - 2 \cdot det(\begin{bmatrix} 3 & 2 \ -4 & 5 \ \end{bmatrix}) + 0

det(A)=1((−1)(5)−(2)(−3))−2((3)(5)−(2)(−4))+0det(A) = 1((-1)(5) - (2)(-3)) - 2((3)(5) - (2)(-4)) + 0

det(A)=1(−5+6)−2(15+8)det(A) = 1(-5 + 6) - 2(15 + 8)

det(A)=1(1)−2(23)=1−46=−45det(A) = 1(1) - 2(23) = 1 - 46 = -45

Notation

Instead of writing det(A)det(A), vertical lines can be used: ∣A∣|A|.

Cofactors

The cofactor C<em>ijC<em>{ij} is the determinant of the matrix A</em>ijA</em>{ij} multiplied by (−1)i+j(-1)^{i+j}.

C<em>ij=(−1)i+jdet(A</em>ij)C<em>{ij} = (-1)^{i+j}det(A</em>{ij})

Where:

  • AijA_{ij} is a matrix (deleting the ith row and jth column).

  • CijC_{ij} is a number.

Determinant Using Cofactors

The determinant can be calculated by expanding along any row or column:

Expanding along the ith row:

det(A)=a<em>i1C</em>i1+a<em>i2C</em>i2+⋯+a<em>inC</em>indet(A) = a<em>{i1}C</em>{i1} + a<em>{i2}C</em>{i2} + \dots + a<em>{in}C</em>{in}

Expanding down the jth column:

det(A)=a<em>1jC</em>1j+a<em>2jC</em>2j+⋯+a<em>njC</em>njdet(A) = a<em>{1j}C</em>{1j} + a<em>{2j}C</em>{2j} + \dots + a<em>{nj}C</em>{nj}

Key points:

  • When going along the ith row, always delete the ith row and successively delete the first column, the second column, and so on.

  • When going down the jth column, always delete the jth column and successively delete the first row, the second row, and so on.

  • The sign depends on whether the sum of the row and column indices is even or odd.

Matrix of Signs

[+−+−… −+−+… +−+−… −+−+… ⋮⋮⋮⋮⋱]\begin{bmatrix} + & - & + & - & \dots \ - & + & - & + & \dots \ + & - & + & - & \dots \ - & + & - & + & \dots \ \vdots & \vdots & \vdots & \vdots & \ddots \end{bmatrix}

Example of Cofactor Expansion

Calculate the determinant by cofactor expansion down the third column:

[120 3−12 −4−31 ]\begin{bmatrix} 1 & 2 & 0 \ 3 & -1 & 2 \ -4 & -3 & 1 \ \end{bmatrix}

Expanding down the third column:

det(A)=0⋅C<em>13+2⋅C</em>23+1⋅C33det(A) = 0 \cdot C<em>{13} + 2 \cdot C</em>{23} + 1 \cdot C_{33}

det(A)=0⋅det([3−1 −4−3 ])+(−1)⋅2⋅det([12 −4−3 ])+1⋅det([12 3−1 ])det(A) = 0 \cdot det(\begin{bmatrix} 3 & -1 \ -4 & -3 \ \end{bmatrix}) + (-1) \cdot 2 \cdot det(\begin{bmatrix} 1 & 2 \ -4 & -3 \ \end{bmatrix}) + 1 \cdot det(\begin{bmatrix} 1 & 2 \ 3 & -1 \ \end{bmatrix})

det(A)=0−2((−3)−(−8))+((−1)−(6))det(A) = 0 - 2((-3) - (-8)) + ((-1) - (6))

det(A)=−2(5)+(−7)=−10−7=−17det(A) = -2(5) + (-7) = -10 - 7 = -17

The Importance of Zeros

Cofactor expansion is most useful when there are many zeros in the matrix. Choose a column or row with a bunch of zeros to simplify calculations.

Example:

[∗∗∗1 ∗∗∗0 ∗∗∗0 ∗∗∗0 ]\begin{bmatrix} * & * & * & 1 \ * & * & * & 0 \ * & * & * & 0 \ * & * & * & 0 \ \end{bmatrix}

Expanding down the last column simplifies the calculation.

Iterated Cofactor Expansion

Calculate the determinant:

[1∗∗∗ 01∗∗ 002∗ 0005 ]\begin{bmatrix} 1 & * & * & * \ 0 & 1 & * & * \ 0 & 0 & 2 & * \ 0 & 0 & 0 & 5 \ \end{bmatrix}

Expand down the first column, then the first column of the resulting matrix, and so on.

det(A)=1⋅det([1∗∗ 02∗ 005 ])=1⋅1⋅det([2∗ 05 ])=1⋅1⋅(2⋅5)=10det(A) = 1 \cdot det(\begin{bmatrix} 1 & * & * \ 0 & 2 & * \ 0 & 0 & 5 \ \end{bmatrix}) = 1 \cdot 1 \cdot det(\begin{bmatrix} 2 & * \ 0 & 5 \ \end{bmatrix}) = 1 \cdot 1 \cdot (2 \cdot 5) = 10

Computational Complexity of Cofactor Expansion

For an n by n matrix, cofactor expansion requires n!n! multiplications. As n increases, the computation becomes very intensive.

n!=n⋅(n−1)⋅(n−2)⋅⋯⋅2⋅1n! = n \cdot (n-1) \cdot (n-2) \cdot \dots \cdot 2 \cdot 1

Example:

Calculating the determinant of a 25 by 25 matrix requires approximately 25!25! multiplications, which is about 102510^{25}.

With fast computers performing 101510^{15} floating-point operations per second, it would take about 500 years to complete the calculation directly.

Need for a Better Method

Due to the computational complexity, a better method is needed for large matrices. Row operations will be discussed to address this issue.

Theory Behind Row Operations

Notation: A Subscript i(b)

Ai(b)A_{i}(b) denotes the matrix obtained by replacing the ith column of matrix A with the vector b.

Example:

If matrix A=[12 34 ]A = \begin{bmatrix} 1 & 2 \ 3 & 4 \ \end{bmatrix} and b=[5 6 ]b = \begin{bmatrix} 5 \ 6 \ \end{bmatrix}, then:

A1(b)=[52 64 ]A_{1}(b) = \begin{bmatrix} 5 & 2 \ 6 & 4 \ \end{bmatrix}

A2(b)=[15 36 ]A_{2}(b) = \begin{bmatrix} 1 & 5 \ 3 & 6 \ \end{bmatrix}

Linearity Property

Let T be a transformation defined as T(x)=det(A<em>i(x))T(x) = det(A<em>{i}(x)), where A</em>i(x)A</em>{i}(x) is the matrix A with its ith column replaced by the vector x.

T is a linear transformation.

This means:

  1. T(u+v)=T(u)+T(v)T(u + v) = T(u) + T(v)

  2. T(ku)=kT(u)T(ku) = kT(u)

Determinant with Repeated Columns

If the ith column of A is replaced with its own jth column (where i≠ji \neq j), the determinant is zero.

det(A<em>i(A</em>j))=0det(A<em>{i}(A</em>{j})) = 0

This is because the columns become linearly dependent.

Adding a Scalar Multiple of a Column

of one column of a square matrix to another column in the same matrix leaves the determinant unchanged. Linearity tells us if instead of replacing the ith column with Cij, you add CAj to the ith column, that that must have left the determinant unchanged,

The operation of adding a multiple of one column to another does not change the determinant.

det(A<em>i(A</em>i+cAj))=det(A)det(A<em>{i}(A</em>{i} + cA_{j})) = det(A)

Transpose and Row Operations

Similar reasoning applies to rows. Adding a scalar multiple of one row to another leaves the determinant unchanged.

This is equivalent to a type one row operation.