✖

Determinants

In linear algebra, the determinant is a function that assigns to every square matrix A a scalar, which we write as |A|. For matrices of numbers, the determinant is a real number.

Permutations of an n-tuple

To define the determinant, we need to know how to work with permutations of an n-tuple, and in particular how to find the sign of a permutation. It is best explained with an example. Take the ordered triple (1, 2, 3), which is mapped to the triple (2, 3, 1). For permutations, we usually write this as follows:

(123231)

Now we need to find how many swaps of numbers we had to use to get from the first triple to the second, where we may only swap numbers that are next to each other. So we start with the triple (1, 2, 3). First we swap the 1 and the 2: (2, 1, 3). Then we swap the 1 and the 3: (2, 3, 1), which gives the permutation we wanted. We needed two swaps to reach the image. The sign of a permutation is easy to find – if the number of swaps is even, the sign is positive; if it is odd, the sign is negative. In our case, the sign of the permutation is therefore positive. Let’s find the sign of the permutation in one more example:

(42311342)

We proceed as follows:

(4,2,3,1)→(4,2,1,3)→(4,1,2,3)→(1,4,2,3)→(1,4,3,2)→(1,3,4,2)

That completes the process. We needed five swaps in total, so this time the permutation has an odd sign.

We write the sign of a permutation using the Levi-Civita symbol:

ϵi1,…,in={+1if (i1,i2,…,in) is an even permutation of (1,2,3,4,…,n)−1if (i1,i2,…,in) is an odd permutation of (1,2,3,4,…,n)0otherwise

Definition of the determinant

The determinant is a number. It is defined only for square matrices and is written either det A or |A|. It is defined as follows:

|A|=∑i1,…,innϵi1,…,ina1i1⋅a2i2⋅…⋅anin

Let’s work out the determinant of a square matrix of order 2 × 2:

A=(4213)

If we substitute n = 2 into the definition, we get this formula:

|A|=∑i1,i22ϵi1,i2⋅a1i1⋅a2i2

For i1 and i2 we substitute the values 1 and 2 in turn. This gives four possibilities in total: a) i1 = 1, i2 = 1, b) i1 = 1, i2 = 2, c) i1 = 2, i2 = 1, d) i1 = 2, i2 = 2.

In cases a) and d) the symbol is zero, because ϵ1,1 = 0 and ϵ2,2 = 0. So these terms contribute zero to the sum in the formula, because 0 · a1i1 · a2i2 = 0.

That leaves b) and c). In case b) i1 = 1, i2 = 2 we have ϵ1,2 = 1, because (1, 2) is an even permutation of (1, 2). This gives the first term:

1⋅a1i1⋅a2i2=1⋅a11⋅a22=4⋅3=12

In the remaining case we have i1 = 2, i2 = 1. The value of ϵ2,1 is −1. This gives the second term:

−1⋅a1i1⋅a2i2=−1⋅a12⋅a21=−1⋅2⋅1=−2

Now we add all four cases a) + b) + c) + d) and get

|A|=0+12−2+0=10.

The determinant of A is 10.

Notice that in the end we found the determinant as a difference:

|A|=a11⋅a22−a12⋅a21

This formula holds for any matrix of order 2 × 2.

The rule of Sarrus

We use the rule of Sarrus to work out the determinant of a matrix of order 3. This is already a little more complicated. Let’s try it on this matrix:

A=(53217−80−27)

We proceed in a similar way to the matrix of order 2, but to keep things clear we extend the matrix by two more rows – below the matrix we copy its first two rows:

A′=(53217−80−2753217−8)

The first and fourth rows are now the same, and so are the second and fifth. Now we add up the products of the entries on the main diagonals and subtract the sum of the products of the entries on the anti-diagonals. Substituting, we get:

|A|=[5⋅7⋅7+1⋅(−2)⋅2+0⋅3⋅(−8)]−[2⋅7⋅0+(−8)⋅(−2)⋅5+7⋅3⋅1]=140

Properties of the determinant

  • If we multiply a row or column of the matrix A by a number c ≠ 0, we get a matrix A', and their determinants satisfy c|A| = |A'|. So if you multiply a row of a matrix by 3 and work out the determinant, you get the determinant of the original matrix by dividing your result by 3.

  • Multiplying the ith row and adding it to the jth row does not change the determinant. The same holds for columns.

  • If at least one row of the matrix is zero, the determinant is zero.

  • A non-singular matrix always has a non-zero determinant, and a singular matrix always has determinant zero.

  • The determinant of a matrix in row echelon form is the product of the entries on the main diagonal.

  • If we swap two rows of a matrix, the sign of the determinant changes.

  • |A| = |AT|

  • |A · B| = |A| · |B|

  • |A−1| = 1/|A|

These properties give a fairly simple way to work out a determinant. We just reduce the matrix to row echelon form and then multiply the entries on the main diagonal. Here goes:

A=(138250−225)

Using standard row operations, we now reduce the matrix to row echelon form:

(138250−225)∼(1380−1−160821)∼(1380−1−1600−107)

Now we take the product of the entries on the diagonal: 1 · (−1) · (−107) = 107.

Work out the determinant of this matrix:

A=(3215275664104−311)

First, it is a good idea to swap the first and second rows so that the smallest number is at the top. We must not forget to change the sign:

|3215275664104−311|=−|2756321564104−311|

Next, it is quite handy to multiply the second row by 2 so that the numbers add up nicely. We must not forget to multiply the whole determinant by one half:

−|2756321564104−311|=−12|27566421064104−311|

Now we carry on in the usual way:

−12|27566421064104−311|=−12|27560−17−13−80−17−14−180−17−9−11|=−12|27560−17−13−800−1−10004−3|=−12|27560−17−13−800−1−10000−43|=−12⋅2⋅(−17)⋅(−1)⋅(−43)=731

Laplace expansion

Laplace was a very nice gentleman who came up with another algorithm for working out determinants. To follow this recipe, we need to be able to form a special submatrix of the original matrix. Given a matrix A, we form a submatrix by removing one row and one column from A. We write this new matrix as SijA, which tells us that we removed the ith row and the jth column from A. Example:

A=(138250−225)

The submatrix S12A should look like this:

S12A=(20−25)

Next we define a minor, which is simply the determinant of the submatrix SijA defined above. We write it in the same way, but with the letter M, so MijA=|SijA|. We can also speak of the minor of the entry aij, which is exactly MijA.

Using these minors, we can work out the determinant of the original matrix. First we choose a row (or column) of the matrix. Then for each entry in this row we work out its minor, which gives as many minors as the row has entries. Now we can write the determinant of the original n × n matrix A as a weighted sum of these minors:

|A|=∑j=1n(−1)i+j⋅aij⋅MijA

where i is the row we have chosen. If we instead sum over i, we fix the variable j, the column index.

In practice, you have a matrix and want its determinant. You take one column of the matrix (or a row), find the minor of each entry in that column, attach the sign (−1)i + j and add everything up, multiplying each determinant by the entry whose minor it is. Because the minor MijA is multiplied by the entry aij, it helps if that entry is zero: the term disappears, so there is no more calculation and you save yourself work. Let’s work out the determinant of this matrix:

A=(548610239)

The matrix contains only one zero, so ideally we expand along either the second row or the third column. Let’s choose the row. First we extract the submatrices:

S21A=(4839)S22A=(5829)S23A=(5423)

Now we work out the determinants, which gives the minors. For a matrix of order 2 this is trivial.

M21A=|4839|=12M22A=|5829|=29M23A=|5423|=7

Now we can substitute into the formula, with i = 2:

|A|=(−1)2+1⋅6⋅|4839|+(−1)2+2⋅1⋅|5829|+(−1)2+3⋅|5423|⋅0=(−1)2+1⋅6⋅12+(−1)2+2⋅1⋅29+(−1)2+3⋅7⋅0=−43

Notice that because the entry at the end of the second row is zero, the third term was also zero. Another example:

Work out the determinant of this matrix using Laplace’s method:

A=(723266678109105733)

The third column consists entirely of multiples of 3. We can use this to create zeros in that column and prepare the ground for applying Laplace’s method. So we add −2 times the first row to the second row, −3 times the first row to the third row and −1 times the first row to the fourth row.

(723266678109105733)∼(7232−8203−13404−2501)

This has not changed the value of the determinant, but it will be easier to work with. We expand along the third column, where there is only one non-zero entry, so only the minor of the third entry of the first row remains in the expansion:

|723266678109105733|=(−1)1+3⋅3|−823−1344−251|=3|−823−1344−251|

In the third column of the new matrix there is a 1 at the very end, which we can easily use to create zeros in this column:

(−823−1344−251)∼(−2−130−5−160−251)

Now we expand along the third column. Again there is only one non-zero entry:

3|−2−130−5−160−251|=3⋅((−1)3+3⋅1⋅|−2−13−5−16|)=3⋅|−2−13−5−16|

We can now work this out in the usual way: 3 · (32 − 65) = −99.