Determinant of a matrix

In linear algebra, the determinant of a square matrix is a scalar value that reveals key properties of the matrix. Denoted by det(A) or |A|, it encapsulates both the algebraic and geometric characteristics of the matrix.

Example

For a square matrix

$$ A= \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} $$

its determinant is denoted by det(A):

$$ det(A) = -2 $$

or alternatively, using two vertical bars:

$$ | A | = \begin{vmatrix} 1 & 2 \\ 3 & 4 \end{vmatrix} = -2 $$

Note. The determinant can only be computed for square matrices, i.e., matrices with an equal number of rows and columns (m=n).

Finding the Determinant of a Matrix

Square Matrices of Order 1

For a 1x1 matrix, which contains a single element, the determinant is simply the value of that element, a11.

calculating the determinant in a square matrix of order one

Example. A matrix A of order 1 has one element, a11 = 5. Thus, det(A) = 5.
the determinant of matrix det(A)=5

Square Matrices of Order 2

For a 2x2 matrix, the determinant is calculated by taking the product of the elements on the main diagonal (a11·a22) and subtracting the product of the elements on the secondary diagonal (a21·a12).

calculating the determinant of a square matrix of order two

Example. For the following 2x2 matrix A, which has two rows and two columns, det(A) = -2.
an example

Sarrus' Rule

Sarrus' rule applies to 3x3 matrices (m=n=3) to find their determinant.

Consider a 3x3 matrix:

a matrix of order 3

Place the first two columns to the right:

how to find the determinant by Sarrus rule

Then, add the products of the diagonals from the top left to the bottom right:

sum the products of the diagonals

Next, subtract the products of the diagonals from the bottom left to the top right.

subtracts the products of the diagonals

The resulting algebraic sum of these products is the determinant of the matrix.

the determinant of the matrix

The Sarrus rule summarized
the rules of Sarrus

Laplace's Method

Laplace's method is one of the most widely used techniques for calculating determinants. It systematically reduces a determinant of order n to smaller determinants of order n-1.

Named after Pierre-Simon Laplace, this method is explained as follows:

How it works

Laplace’s method transforms the determinant calculation into smaller sub-determinants.

  1. Choose any column j of the matrix.

    Which column is best to choose? Any column will work, but selecting one with more zeros often reduces the number of steps.

  2. Once column j is chosen, compute the determinants of the submatrices A(ij) by eliminating row i and column j from matrix A, using the following formula.
    the determinant

Example. To find the determinant of a 3x3 matrix A, I use the Laplace expansion along column j=1. Summing the submatrix determinants results in det(A) = 0.
example of the method of Laplace

Row Laplace Method

Alternatively, the Laplace method can also be applied by selecting a row instead of a column.

In this case, the formula varies slightly as columns j are cycled from 1 to n.

the formula of method by row

This produces the same result.

Example. Here, I select the first row: $$ \begin{vmatrix} 2 & 3 & 5 & 1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 2 \end{vmatrix} = 2 \cdot \begin{vmatrix} 1 & 2 & 3 \\ 0 & 5 & 1 \\ 0 & 0 & 2 \end{vmatrix} - 3 \cdot \begin{vmatrix} 0 & 2 & 3 \\ 0 & 5 & 1 \\ 0 & 0 & 2 \end{vmatrix} + 5 \cdot \begin{vmatrix} 0 & 1 & 3 \\ 0 & 0 & 1 \\ 0 & 0 & 2 \end{vmatrix} - 1 \cdot \begin{vmatrix} 0 & 1 & 2 \\ 0 & 0 & 5 \\ 0 & 0 & 0 \end{vmatrix} $$ Calculating the four submatrix determinants: $$ \begin{vmatrix} 2 & 3 & 5 & 1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 2 \end{vmatrix} = 2 \cdot 10 - 3 \cdot 0 + 5 \cdot 0 - 1 \cdot 0 $$ The determinants of the submatrices are then multiplied by their coefficients and summed. $$ \begin{vmatrix} 2 & 3 & 5 & 1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 2 \end{vmatrix} = 20 $$ The matrix determinant is 20.

A Tip to Simplify Calculations. When using this method, choosing the row or column with the most zeros simplifies the calculation. In this case, I select the fourth row. $$ \begin{vmatrix} 2 & 3 & 5 & 1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 2 \end{vmatrix} = - 0 \cdot A_{(4,1)} + 0 \cdot A_{(4,2)} - 0 \cdot A_{(4,3)} + 2 \cdot \begin{vmatrix} 2 & 3 & 5 \\ 0 & 1 & 2 \\ 0 & 0 & 5 \end{vmatrix} $$ Since many coefficients are zero, I avoid calculating three determinants. $$ \begin{vmatrix} 2 & 3 & 5 & 1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 2 \end{vmatrix} = 2 \cdot \begin{vmatrix} 2 & 3 & 5 \\ 0 & 1 & 2 \\ 0 & 0 & 5 \end{vmatrix} $$ Then, I repeat the process for the third row of the submatrix. $$ \begin{vmatrix} 2 & 3 & 5 & 1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 2 \end{vmatrix} = 2 \cdot 5 \cdot \begin{vmatrix} 2 & 3 \\ 0 & 1 \end{vmatrix} = 2 \cdot 5 \cdot (2 \cdot 1) = 20 $$ This reduces a 4x4 matrix determinant to a 2x2. However, as this matrix is triangular, we could also find the determinant by multiplying the main diagonal elements. $$ \begin{vmatrix} 2 & 3 & 5 & 1 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 5 & 1 \\ 0 & 0 & 0 & 2 \end{vmatrix} = 2 \cdot 1 \cdot 5 \cdot 2 = 20 $$

Limitations of Laplace's Method. Using Laplace’s method for large matrices is inefficient. For high-order square matrices, methods like Gaussian elimination are far more efficient.

Gaussian Elimination Method

The Gaussian elimination method can also be used to find a matrix’s determinant.

Using Gaussian transformations, I convert the matrix into an upper triangular form.

example of triangular upper matrix

In triangular matrices, the determinant is simply the product of the main diagonal elements, making the calculation straightforward.

Gauss Rules

However, I must account for any sign changes.

Swapping two rows (Rx⇔Ry) reverses the determinant’s sign (-1·det).

Multiplying a row by a scalar (k Rx) scales the determinant by that factor (k det).

Adding a row to a multiple of another row (Rx+k·Ry) does not affect the determinant’s sign.

Example. In this exercise, I use Gaussian elimination to calculate the determinant of matrix A.
example of Gauss method to calculate the determinant of the matrix

Advantages of the Gaussian Method

For large matrices, Gaussian elimination is much faster than Laplace expansion.

And so on

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Matrices (linear algebra)