Skip to main content

Determinant of a matrix

Determinant of a matrix, by RMIT, licensed under CC BY-NC 4.0

A determinant is a number that can be calculated for any square matrix. The determinant is used in calculating vector cross products, eigenvalues, eigenvectors and solving simultaneous equations. Use this resource to learn how to find the determinant of \(2\times2\) and \(3\times3\) matrices.

Determinant of a \(2\times2\) matrix

The determinant of a \(2\times2\) matrix is called a second order determinant.

For: \[A = \left[ \begin{array}{cc} a & b\\
c & d
\end{array} \right]\] the determinant is denoted by \(\det A\) or \(\left|A\right|\), where:
\[\begin{align*} \left| A\right| & = \left| \begin{array}{cc} a & b\\
c & d
\end{array} \right|\\
& = ad-bc
\end{align*}\]

A matrix that has a determinant of \(0\) is called a singular matrix. Singular matrices do not have an inverse; you will learn about inverses later. If the determinant is not \(0\), the matrix is called non-singular.

Example 1 – finding the determinant of \(2\times2\) matrices

\[\begin{align*} \left| \begin{array}{cc} 2 & 3\\
1 & 5
\end{array} \right|
& = \left( 2\times5 \right)-\left( 1\times3 \right)\\
& = 10-3\\
& = 7
\end{align*}\]

\[\begin{align*} \left| \begin{array}{cc} 3 & 2\\
-1 & 1
\end{array} \right|
& = \left( 3\times1 \right)-\left((-1)\times2\right)\\
& = 3-(-2)\\
& = 3+2\\
& = 5
\end{align*}\]

\[\begin{align*} \left| \begin{array}{cc} -2 & -1\\
6 & 3
\end{array} \right|
& = \left((-2)\times3\right)-\left(6\times(-1)\right)\\
& = -6+6\\
& = 0
\end{align*}\]

Your turn – finding the determinant of \(2\times2\) matrices

  1. Evaluate the following determinants.
    1. \(\left| \begin{array}{cc} 2 & 5\\
      1 & 2
      \end{array} \right| \)
    2. \(\left| \begin{array}{cc} -1 & 1\\
      -2 & 5
      \end{array} \right| \)
    3. \(\left| \begin{array}{cc} 2 & -3\\
      -2 & 6
      \end{array} \right| \)
    4. \(\left| \begin{array}{cc} 0 & -3\\
      1 & 0
      \end{array} \right| \)
    5. \(\left| \begin{array}{cc} 1 & -3\\
      -3 & 9
      \end{array} \right| \)

    1. \(-1\)
    2. \(-3\)
    3. \(18\)
    4. \(3\)
    5. \(0\)

Determinant of a \(3\times3\) matrix

The determinant of a \(3\times3\) matrix is called a third order determinant.

For: \[A = \left[ \begin{array}{ccc} a & b & c\\
d & e & f\\
g & h & i
\end{array} \right] \] the determinant is denoted by \(\det A\) or \(\left| A \right|\), where: \[\left| A \right| = a\left| \begin{array}{cc} e & f\\
h & i
\end{array} \right|
-b\left| \begin{array}{cc} d & f\\
g & i
\end{array} \right|
+c\left| \begin{array}{cc} d & e\\
g & h
\end{array} \right| \]

  • To get the first term, we multiply \(a\) by the determinant of the \(2\times2\) matrix formed when we remove everything in the same column and row as \(a\)—that is, \(b\), \(c\), \(d\) and \(g\).
  • To get the second term, we multiply \(b\) by the determinant of the \(2\times2\) matrix formed when we remove everything in the same column and row as \(b\)—that is, \(a\), \(c\), \(e\) and \(h\).
  • To get the final term, we multiply \(c\) by the determinant of the \(2\times2\) matrix formed when we remove everything in the same column and row as \(c\)—that is, \(a\), \(b\), \(f\) and \(i\).

This is just one way of expanding out the matrices. You don't have to choose the first row elements \(a\), \(b\) and \(c\) like we have here. You could choose to start with the second row: \(d\), \(e\) and \(f\), or even the first column: \(a\), \(d\) and \(g\). But to get the maths right, you need to consider place signs.

Place signs

Place signs tell you whether you need to add or subtract the expanded values to find the determinant.

Each element in a matrix has a place sign. They alternate in the following pattern.

\[ \left|\begin{array}{ccc} + & - & +\\ - & + & -\\ + & - & + \end{array}\right| \]

We apply these signs to the elements. Using the same example as before, but expanding \(d\), \(e\) and \(f\) instead, we get the following:

\[\left| A \right| = \boldsymbol{-}d\left| \begin{array}{cc} b & c\\ h & i \end{array} \right| \boldsymbol{+}e\left| \begin{array}{cc} a & c\\ g & i \end{array} \right| \boldsymbol{-}f\left| \begin{array}{cc} a & b\\ g & h \end{array} \right| \]

See how the signs match up with where the element is in the matrix.

Example 1 – finding the determinant of \(3\times3\) matrices

Calculate the determinant of the following matrix.
\[ A = \left[ \begin{array}{ccc} 2 & 1 & 3\\
1 & -1 & 2\\
2 & 1 & 4
\end{array} \right]\]

Let's look at two ways to calculate the determinant. For the first method, let's expand along row \(1\).

\[\begin{align*} \left| A\right| & = \left| \begin{array}{ccc} 2 & 1 & 3\\
1 & -1 & 2\\
2 & 1 & 4
\end{array} \right|\\
& = 2\left|\begin{array}{cc} -1 & 2\\
1 & 4
\end{array} \right|
-1\left| \begin{array}{cc} 1 & 2\\
2 & 4
\end{array} \right|
+3\left| \begin{array}{cc} 1 & -1\\
2 & 1
\end{array} \right|\\
& = 2\left(\left(-1\right)\times4-1\times2\right)-\left(1\times4-2\times2\right)+3\left(1\times1-2\times\left(-1\right)\right)\\
& = 2\left(-4-2\right)-\left(4-4\right)+3\left(1+2\right)\\
& = -12+9\\
& = -3
\end{align*} \]

Now, let's try expanding along column \(2\).

\[\begin{align*} \left| A\right| & = \left| \begin{array}{ccc} 2 & 1 & 3\\
1 & -1 & 2\\
2 & 1 & 4
\end{array} \right|\\
& = -1\left|\begin{array}{cc} 1 & 2\\
2 & 4
\end{array} \right|
-1\left| \begin{array}{cc} 2 & 3\\
2 & 4
\end{array} \right|
-1 \left| \begin{array}{cc} 2 & 3\\
1 & 2
\end{array} \right|\\
& = -1\left(1\times4-2\times2\right)-\left(2\times4-2\times3\right)-1\left(2\times2-1\times3\right)\\
& = -1\left(4-4\right)-\left(8-6\right)-1\left(4-3\right)\\
& = -2-1\\ & =-3
\end{align*}\]

As you can see, no matter which column or row you choose to expand, you can achieve the same correct answer as long as you use the correct place signs.

Calculate the determinant of the following matrix.
\[ B = \left[ \begin{array}{ccc} 1 & 3 & -2\\
1 & -1 & 3\\
2 & 6 & -4
\end{array} \right]\] Let's expand along column \(1\).
\[\begin{align*} \left| B\right| & = \left| \begin{array}{ccc} 1 & 3 & -2\\
1 & -1 & 3\\
2 & 6 & -4
\end{array} \right|\\
& = 1\left|\begin{array}{cc} -1 & 3\\
6 & -4
\end{array} \right|
-1\left| \begin{array}{cc} 3 & -2\\
6 & -4
\end{array} \right|
+2\left| \begin{array}{cc} 3 & -2\\
-1 & 3
\end{array} \right|\\
& = 1\left(\left(-1\right)\times\left(-4\right)-6\times3\right)-1\left(3\times\left(-4\right)-6\times\left(-2\right)\right)+2\left(3\times3-\left(-1\right)\times\left(-2\right)\right)\\
& = \left(4-18\right)-\left(-12-\left(-12\right)\right)+2\left(9-2\right)\\
& = -14+14\\
& = 0
\end{align*}\]

Here, row \(3\) of \(B\) is a multiple of row \(1\). In general, when a row is a multiple of another row, the determinant is \(0\). Similarly, if a column is a multiple of another column, the determinant is \(0\).

Calculate the determinant of the following matrix.
\[ C = \left[ \begin{array}{ccc} 1 & 5 & 6\\
3 & -2 & 2\\
4 & 0 & 1
\end{array} \right]\]

You can be strategic about which column or row you choose to expand. This time, we can expand about column \(2\) or row \(3\). This is because column \(2\) or row \(3\) contain a \(0\) which makes the calculation easier.

\[\begin{align*} \left| C\right| & = \left| \begin{array}{ccc} 1 & 5 & 6\\
3 & -2 & 2\\
4 & 0 & 1
\end{array} \right|\\
& 4\left|\begin{array}{cc} 5 & 6\\
-2 & 2
\end{array} \right|
-0\left| \begin{array}{cc} 1 & 6\\
3 & 2
\end{array} \right|
+1\left| \begin{array}{cc} 1 & 5\\
3 & -2
\end{array} \right|\\
& = 4\left(5\times2-\left(-2\right)\times6\right)+1\left(1\times\left(-2\right)-3\times5\right)\\
& = 4\left(10+12\right)+1\left(-2-15\right)\\
& = 88-17\\
& = 71
\end{align*}\]

Your turn – finding the determinant of \(3\times3\) matrices

  1. Evaluate the following determinants.
    1. \(\left| \begin{array}{ccc} -1 & 1 & 3\\
      2 & 3 & 1\\
      -1 & 1 & 5
      \end{array} \right|\)
    2. \(\left| \begin{array}{ccc} 3 & -1 & -3\\
      1 & 4 & 1\\
      3 & 1 & 1
      \end{array} \right|\)
    3. \(\left| \begin{array}{ccc} -1 & 5 & 2\\
      3 & -5 & -6\\
      -2 & 3 & 4
      \end{array} \right|\)
    4. \(\left| \begin{array}{ccc} -2 & 3 & -3\\
      6 & 0 & 2\\
      2 & 0 & 4
      \end{array} \right|\)
    5. \(\left| \begin{array}{ccc} a & 0 & 0\\
      0 & b & 0\\
      0 & 0 & c
      \end{array} \right|\)

    1. \(-10\)
    2. \(40\)
    3. \(0\)
    4. \(-60\)
    5. \(abc\)

Keywords