Calculating the determinant of a matrix

The determinant of a 2x2 matrix
a b
c d

is (ad-bc)

You can calculate higher determinants iteratively by expanding along any row or column.

det(A) = ∑ Ai,j.(-1)i+j.det(Mi,j)

where the sum is along one row or column only, Ai,j is the element in the i'th row and j'th column, and Mi,j is the sub-matrix formed from A by omitting the i'th row and the j'th column.

For example, to find the determinant of

13-1
014
-1-21

let's expand along the top row, to get

1 x (1x1 - 4x-2) -3 x (0x1 - 4x-1) +-1 x (0x-2 - 1x-1) =-4
13-1
014
-1-21
13-1
014
-1-21
13-1
014
-1-21

This approach works for any n x n matrix.

Since you can choose any row or column for this expansion, use it to your advantage by choosing the row or column with the most 0's. In the example above, the easiest route would be to expand down the first column, but I wanted to show the working.

Just remember to use the right pattern of + and -: the second row starts with a -, for example.

+-+
-+-
+-+

In fact, since the determinant of a 1x1 matrix [a] is a, this approach also works for the determinant of a 2x2 matrix - try it.

For more approaches see Wikipedia.

If the determinant is 0 the matrix is said to be singular. The set of simultaneous equations represented by the matrix is soluble, and the matrix has an inverse, if and only if the determinant is non-zero.

Back to