Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

For a square nxn matrix A, the determinant is denoted in a few different ways:

detA=A=A11A1nAn1Ann\det \vv{A} =|\vv{A}|=\begin{vmatrix} A_{11} & \cdots & A_{1n} \\ \vdots & & \vdots \\ A_{n1} & \cdots & A_{nn} \end{vmatrix}

The determinant is defined in a recursive way.For n=1n=1, A=A11|\vv{A}|= A_{11} ( the matrix element) For n2n \ge 2, A|\vv{A}| is defined as:

A=j=1nAijCij=j=1n(1)i+jAijMij|\vv{A}|= \sum_{j=1}^n A_{ij} C_{ij} = \sum_{j=1}^n (-1)^{i+j} A_{ij} M_{ij}

where i is any row of A, CijC_{ij} is the cofactor of A:

Cij=(1)i+jMij,C_{ij} = (-1)^{i+j} M_{ij},

and MijM_{ij} is the minor of A. The minor is the determinant of the matrix obtained by removing row i and column j from A. Equivalently,

A=i=1nAijCij=i=1n(1)i+jAijMij|\vv{A}| = \sum_{i=1}^n A_{ij} C_{ij} = \sum_{i=1}^n (-1)^{i+j} A_{ij} M_{ij}

where now j is any column of A.

2x2 matrix

We will use the definition of the determinant to show this must be the case! Let’s use the first definition and pick the first row i=1i=1:

abcd=(1)1+1A11M11+(1)1+2A12M12=aabcdbabcd=adbc\begin{align} \begin{vmatrix}a & b \\ c & d\end{vmatrix} &= (-1)^{1+1} \cdot A_{11} M_{11} + (-1)^{1+2} A_{12} M_{12} \\ &= a \begin{vmatrix} \phantom{a} & \phantom{b} \\ \phantom{c} & d \end{vmatrix} - b \begin{vmatrix} \phantom{a} & \phantom{b} \\ c & \phantom{d} \end{vmatrix} \\ &= a d - b c \end{align}

Larger matrices

The determinants of larger matrices can be computed by reducing them to sums of 2x2 determinants. To do this quickly, it can be helpful to envision (1)i+j(-1)^{i+j} as a checkerboard of signs, then visualize the minors.

For example, to evaluate

130264102\begin{vmatrix}1 & 3 & 0 \\ 2 & 6 & 4 \\ -1 & 0 & 2 \end{vmatrix}

The sign matrix is:

[+++++]\begin{bmatrix}+ & - & + \\ - & + & - \\ + & - & + \end{bmatrix}

Even faster, start from the plus sign in the upper left corner, then alternate until you get to your chosen row or column! Let’s use row 3:

A=+(1)306401024+21326=(3406)+2(1623)=12\begin{align} |\vv{A}| &= + (-1) \cdot \begin{vmatrix} 3 & 0 \\ 6 & 4 \end{vmatrix} - 0 \cdot \begin{vmatrix}1 & 0 \\ 2 & 4 \end{vmatrix} + 2 \cdot \begin{vmatrix}1 & 3 \\ 2 & 6 \end{vmatrix} \\ &= -(3 \cdot 4 - 0 \cdot 6) + 2(1 \cdot 6 - 2 \cdot 3) \\ &= -12 \end{align}

Note that the same result could be achieved using any row or column. For example, column 3 gives:

A=+(0)261041310+21326=4(0+3)+2(66)=12\begin{align} |\vv{A}|&= +(0) \cdot \begin{vmatrix}2 & 6 \\ -1 & 0 \end{vmatrix} - 4 \cdot \begin{vmatrix}1 & 3 \\ -1 & 0 \end{vmatrix} + 2 \cdot \begin{vmatrix}1 & 3 \\ 2 & 6 \end{vmatrix} \\ &= -4 \cdot (0+3) + 2 \cdot (6-6)\\ &= -12 \end{align}

It’s usually a good idea to expand along the row or column with the most zeros! For example, let’s evaluate

1200435002750020=2120430025=251243=10(3+8)=110\begin{align} \begin{vmatrix} 1 & -2 & 0 & 0 \\ 4 & 3 & 5 & 0 \\ 0 & 2 & 7 & 5 \\ 0 & 0 & 2 & 0 \end{vmatrix} &= -2 \cdot \begin{vmatrix}1 & -2 & 0 \\ 4 & 3 & 0 \\ 0 &2 & 5 \end{vmatrix} \\ &= -2 \cdot 5 \cdot \begin{vmatrix}1 & -2 \\ 4 & 3 \end{vmatrix} \\ &= -10 \cdot (3+8) \\ &= -110 \end{align}

where we chose row 4, then column 3 to do the calculation faster!