# Determinants

The **determinant** of a square matrix is a value determined by the elements of the matrix. In the case of a \(2 \times 2\) matrix, the determinant is calculated by

\[\text{det}\begin{pmatrix}a & b \\ c & d \end{pmatrix} = ad-bc,\]

while larger matrices have more complicated formulae.

Determinants, despite their apparently contrived definition, have a number of applications throughout mathematics; for example, they appear in the shoelace formula for calculating areas, which is doubly useful as a collinearity condition as three collinear points define a triangle with area 0. More generally, the determinant can be used to detect linear independence of certain vectors (or lack thereof). The determinant is also useful in multivariable calculus (especially in the Jacobian), and in calculating the cross product of vectors.

#### Contents

## Formal Definition and Motivation

Formally, the determinant is a function \(\text{det}\) from the set of square matrices to the set of real numbers, that satisfies 3 important properties:

- \(\text{det}(I) = 1\).
- \(\text{det}\) is linear in the rows of the matrix.
- If two rows of a matrix \(M\) are equal, \(\det(M)=0\).

The second condition is by far the most important. It means that any of the rows of the matrix is written as a linear combination of two other vectors, and the determinant can be calculated by "splitting" that row. For instance, in the below example, the second row \((0,2,3)\) can be written as \(2 \cdot (0,1,0) + 3 \cdot (0,0,1)\), so

\[\text{det}\begin{pmatrix}1&0&0\\0&2&3\\0&0&1\end{pmatrix} = 2 \cdot \text{det}\begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}+3 \cdot \text{det}\begin{pmatrix}1&0&0\\0&0&1\\0&0&1\end{pmatrix}=2.\]

A key theorem shows that

there is exactly one function satisfying the above 3 relations.

Unfortunately, this is very difficult to work with for all but the simplest matrices, so an alternative definition is better to use. There are two major options: **determinant by minors** and **determinant by permutations**.

## Properties of the Determinant

The determinant is a very important function because it satisfies a number of additional properties that can be derived from the 3 conditions stated above. They are as follows:

- Multiplicativity: \(\text{det}(AB)=\text{det}(A)\text{det}(B)\)
- Invariance under row operations: If \(A'\) is a matrix formed by adding a multiple of any row to another row, then \(\text{det}(A)=\text{det}(A')\).
- Invariance under transpose: \(\text{det}(A) = \text{det}(A^T)\)
- Sign change under row swap: If \(A'\) is a matrix formed by swapping the positions of two rows, then \(\text{det}(A')=-\text{det}(A)\).

The multiplicative property is of particular importance, due in part to its applications to inverse matrices.

## Determinant by Minors

The **determinant by minors** method calculates the determinant using recursion. The base case is simple: the determinant of a \(1 \times 1\) matrix with element \(a\) is simply \(a\). Note that this agrees with the conditions above, since

\[\text{det}\begin{pmatrix}a\end{pmatrix} = a \cdot \text{det}\begin{pmatrix}1\end{pmatrix}=a\]

as \(\text{det}\begin{pmatrix}1\end{pmatrix} = I\). The recursive step is as follows: denote by \(A_{ij}\) the matrix formed by deleting the \(i^\text{th}\) row and \(j^\text{th}\) column. For instance,

\[A = \begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix} \implies A_{11} = \begin{pmatrix}5&6\\8&9\end{pmatrix}.\]

Then the determinant is given by the following:

The determinant of an \(n \times n\) matrix \(A\) is

\[\text{det}(A) = \sum_{i=1}^n (-1)^{i+1}a_{1,i}\text{det}(A_{1i}) = a_{1,1}\text{det}A_{11}-a_{1,2}\text{det}A_{12}+\cdots.\]

For example,

What is the determinant of \(\begin{pmatrix}a&b\\c&d\end{pmatrix}?\)

We write

\[\text{det}\begin{pmatrix}a&b\\c&d\end{pmatrix} = a ~\text{det}\begin{pmatrix}d\end{pmatrix} - b ~\text{det}\begin{pmatrix}c\end{pmatrix} = ad-bc.\ _\square\]

Unfortunately, these calculations can get quite tedious; already for \(3 \times 3\) matrices, the formula is too long to memorize in practice.

## Determinant by Permutations

An alternate method, **determinant by permutations**, calculates the determinant using permutations of the matrix's elements. Let \(\sigma\) be a permutation of \(\{1, 2, 3, \ldots, n\}\), and \(S\) the set of those permutations.

Then the determinant of an \(n \times n\) matrix \(A\) is

\[\sum_{\sigma \in S}\left(\text{sgn}(\sigma)\prod_{i=1}^{n}a_{i,\sigma(i)}\right).\]

This may look more intimidating than the previous formula, but in fact it is more intuitive. It essentially says the following:

Choose \(n\) elements of \(A\) such that no two are in the same row and no two are in the same column, and multiply them, possibly also by \(-1\) if the permutation has the odd sign. The determinant is the sum over all choices of these \(n\) elements.

This definition is especially useful when the matrix contains many zeros, as then most of the products vanish.

Here is an example:

What is the determinant of \(\begin{pmatrix}a&b\\c&d\end{pmatrix}?\)

There are two permutations of \(\{1,2\}\): \(\{1,2\}\) itself and \(\{2,1\}\). The first has positive sign (as it has 0 transpositions) and the second has negative sign (as it has 1 transposition), so the determinant is

\[\text{det}(A) = \sum_{\sigma \in S}\left(\text{sgn}(\sigma)\prod_{i=1}^{n}a_{i,\sigma(i)}\right) = 1 \cdot a_{1,1}a_{2,2} + (-1) \cdot a_{1,2}a_{2,1} = ad-bc.\]

Unsurprisingly, this is the same result as above. \(_\square\)

## Special Cases

The simplest cases to calculate the determinant are **upper-triangular** (and **lower-triangular**) matrices, by using the permutation method above:

Triangular determinant

- Upper triangular determinant (elements which are below the main diagonal are
**zero**):

\[X=\text{det}\begin{vmatrix} a & b & c & d \\ 0 & f & g & h \\ 0 & 0 & k & l \\ 0 & 0 & 0 & p \end{vmatrix}=a\times f\times k\times p.\] - Lower triangular determinant (elements which are above the main diagonal are
**zero**): \[X=\text{det}\begin{vmatrix} a & 0 & 0 & 0 \\ e & f & 0 & 0 \\ i & j & k & 0 \\ m & n & o & p \end{vmatrix}=a\times f\times k\times p.\]

- Upper triangular determinant (elements which are below the main diagonal are
Diagonal determinant (elements which are under and above the main diagonal are

**zero**): \[X=\text{det}\begin{vmatrix} a & 0 & 0 & 0 \\ 0 & f & 0 & 0 \\ 0 & 0 & k & 0 \\ 0 & 0 & 0 & p \end{vmatrix}=a\times f\times k\times p.\]

This is useful because matrices can be transformed into this form by row operations, which do not affect the determinant:

Find the value of the determinant

\[X=\begin{vmatrix} 1 & 2 & 2 & 1 \\ 1 & 2 & 4 & 2 \\ 2 & 7 & 5 & 2 \\ -1 & 4 & -6 & 3 \end{vmatrix}.\]

We have

\[\begin{align} [X]=&\begin{bmatrix} 1 & 2 & 2 & 1 \\ 1 & 2 & 4 & 2 \\ 2&7&5&2 \\ -1&4&-6&3 \end{bmatrix} \\\\\\ \begin{matrix} \text{row}_1 \rightarrow \text{row}_1 \\ \text{row}_2 - 2\text{row}_1 \rightarrow \text{row}_2 \\ \text{row}_3 - 2\text{row}_1 \rightarrow \text{row}_3 \\ \text{row}_4 - 3\text{row}_1 \rightarrow \text{row}_4 \end {matrix} \Rightarrow &\begin{bmatrix} 1&2&2&1\\ -1&-2&0&0\\ 0&3&1&0\\ -4&-2&-12&0 \end{bmatrix} \\\\\\ \begin{matrix} \text{row}_1 \rightarrow \text{row}_1 \\ \text{row}_2 \rightarrow \text{row}_2 \\ \text{row}_3 \rightarrow \text{row}_3 \\ \text{row}_4 +12\text{row}_3 \rightarrow \text{row}_4 \end {matrix} \Rightarrow &\begin{bmatrix} 1&2&2&1\\ -1&-2&0&0\\ 0&3&1&0\\ -4&34&0&0 \end{bmatrix} \\\\\\ \begin{matrix} \text{row}_1 \rightarrow \text{row}_1 \\ \text{row}_2 \rightarrow \text{row}_2 \\ \text{row}_3 \rightarrow \text{row}_3 \\ \text{row}_4 +17\text{row}_2 \rightarrow \text{row}_4 \end {matrix} \Rightarrow &\begin{bmatrix} 1&2&2&1\\ -1&-2&0&0\\ 0&3&1&0\\ -21&0&0&0 \end{bmatrix} \\\\\\ \begin{matrix} \text{row}_4 \rightarrow \text{row}_1 \\ \text{row}_2 \rightarrow \text{row}_2 \\ \text{row}_3 \rightarrow \text{row}_3 \\ \text{row}_1 \rightarrow \text{row}_4 \end {matrix} \Rightarrow - &\begin{bmatrix} -21&0&0&0\\ -1&-2&0&0\\ 0&3&1&0\\ 1&2&2&1 \end{bmatrix}. \end{align}\]

Therefore, \(\det {[X]} = X = -(-21)(-2)(1)(1) = -42.\ _\square\)

## Sarrus' Rule

**Sarrus' rule** is a shortcut for calculating the determinant of a \(3 \times 3\) matrix.

Rewrite the first two rows while occupying hypothetical fourth and fifth rows, respectively: \[\left| \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right| \Rightarrow \left| \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right| \\ \quad \quad \quad \quad \quad \quad \ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{matrix}\]

Multiply the diagonal elements: \[\begin{matrix} \left| \begin {matrix}1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{matrix}\right| \\ \begin{matrix} 1 & 2 & 3 \\ 4& 5 & 6 \end{matrix}\end{matrix}= 1 \cdot 5 \cdot 9+4 \cdot 8\cdot 3+7\cdot 2 \cdot 6 -3\cdot 5 \cdot 7 -6 \cdot 8 \cdot 1 - 9 \cdot 2 \cdot 4 = 0.\]

The descending diagonal from left to right has a \(+\) sign , while the descending diagonal from right to left has a \(-\text{}\) sign.

Evaluate

\[\left| \begin{matrix} 0 & 1 & 2 \\ 3 & 5 & 5 \\ 5 & 7 & 5 \end{matrix} \right|. \]

We have

\[\left| \begin{matrix} 0 & 1 & 2 \\ 3 & 5 & 5 \\ 5 & 7 & 5 \end{matrix} \right| \Rightarrow \left| \begin{matrix} 0 & 1 & 2 \\ 3 & 5 & 5 \\ 5 & 7 & 5 \end{matrix} \right| \\\quad \quad \quad\quad \quad \quad \begin{matrix} 0 & 1 & 2 \\ 3 & 5 & 5 \end{matrix}\]

This gives

\[(0\times 5\times 5)+(3\times 7\times 2)+(5\times 1\times 5)-(2\times 5\times 5)-(5\times 7\times 0)-(5\times 1\times 3)=2.\ _\square\]

## See Also

**Cite as:**Determinants.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/expansion-of-determinants/