# 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 alternate 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 calculating 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\]

since \(\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 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\) be 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 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.

For instance,

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:

**1- Triangular determinant:**

**a. 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}\\ X=a\times f\times k\times p\)

**b. 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}\\ \\ X=a\times f\times k\times p\)

**2- 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}\\ \\ X=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:

## \(X=\begin{vmatrix} 1 & 2 & 2 & 1 \\ 1 & 2 & 4 & 2 \\ 2 & 7 & 5 & 2 \\ -1 & 4 & -6 & 3 \end{vmatrix}\)

Find the value of determinant(\(X\))

\[[X]=\begin{bmatrix} 1 & 2 & 2 & 1 \\ 1 & 2 & 4 & 2 \\ 2&7&5&2 \\ -1&4&-6&3 \end{bmatrix} \] \[\begin{matrix} row_1 \rightarrow row_1 \\ row_2 - 2row_1 \rightarrow row_2 \\ row_3 - 2row_1 \rightarrow row_3 \\ row_4 - 3row_1 \rightarrow 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} row_1 \rightarrow row_1 \\ row_2 \rightarrow row_2 \\ row_3 \rightarrow row_3 \\ row_4 +12row_3 \rightarrow 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} row_1 \rightarrow row_1 \\ row_2 \rightarrow row_2 \\ row_3 \rightarrow row_3 \\ row_4 +17row_2 \rightarrow 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} row_4 \rightarrow row_1 \\ row_2 \rightarrow row_2 \\ row_3 \rightarrow row_3 \\ row_1 \rightarrow 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} \] Therefore, \(\det {[X]} = X = -(-21)(-2)(1)(1) = \boxed {-42}\)

## Sarrus' rule

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

1- 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}\)

2-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\)

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

## Evaluate: \(\left| \begin{matrix} 0 & 1 & 2 \\ 3 & 5 & 5 \\ 5 & 7 & 5 \end{matrix} \right| \)

\(\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \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 \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \begin{matrix} 0 & 1 & 2 \\ 3 & 5 & 5 \end{matrix}\\ =(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)=\boxed { 2 } \)

## See Also

**Cite as:**Determinants.

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