Pulsars
0 %
Log inSign up

The determinant as a measure of area

Computing a determinant without exhausting yourself

Beyond 3 × 3 a method is needed. Two techniques coexist: cofactor expansion, universal but expensive, and Gaussian elimination, far quicker.

Expansion along a row or column

The idea is to reduce a determinant of size n to determinants of size n - 1. Pick a row (or column), and for each of its entries multiply by the determinant obtained by deleting its row and its column, with an alternating sign.

The chequerboard of signs:

   [ +  -  + ]
   [ -  +  - ]
   [ +  -  + ]        sign = (-1) to the power (i + j)

On an example, expanding along the first row:

  | 2  -1   0 |
  | 1   3   2 |
  | 0   1   4 |

= 2 × | 3  2 |  - (-1) × | 1  2 |  + 0 × | 1  3 |
      | 1  4 |           | 0  4 |        | 0  1 |

= 2 × (12 - 2)  + 1 × (4 - 0)  + 0
= 20 + 4 = 24

The right reflex: expand along the row or column containing the most zeros. Every zero removes an entire sub-computation.

Triangular matrices: free of charge

  | 2   7  -1 |
  | 0   3   5 |   =  2 × 3 × 4  =  24
  | 0   0   4 |

For a triangular (or diagonal) matrix, the determinant is simply the product of the diagonal entries. This is what makes the second method so efficient.

The fast method: reduce first

Gaussian elimination turns any matrix into a triangular one. All you need is how each operation affects the determinant:

Operation                                   Effect on the determinant
------------------------------------------  -------------------------
swap two rows                               changes the SIGN
multiply a row by k                         multiplies by k
add a multiple of one row to another        CHANGES NOTHING

The third line is the key: the most-used operation of elimination leaves the determinant intact. So we reduce freely, then multiply the diagonal.

| 2  -1   0 |          | 2  -1   0 |
| 1   3   2 |    ->    | 0  3.5  2 |    ->   det = 2 × 3.5 × (4 - 4/7)
| 0   1   4 |          | 0   1   4 |              = 2 × 3.5 × 24/7 = 24

The gain is spectacular: cofactor expansion costs about n! operations (at 20 × 20 that is already beyond any computer), elimination only .

Two time-saving properties

- A matrix with two IDENTICAL rows (or columns) has determinant zero.
- A matrix with a ZERO row (or column) has determinant zero.
- More generally: if the rows are DEPENDENT, the determinant is zero.

So before computing, check whether a row is a combination of the others: the answer is sometimes immediate.

Summary

  • Expansion: run along a row or column, with the sign chequerboard (-1)^(i+j).
  • Choose the row or column with the most zeros.
  • Determinant of a triangular matrix = product of the diagonal.
  • Swapping two rows changes the sign; adding a multiple of a row changes nothing.
  • Efficient method: reduce then multiply the diagonal ( instead of n!).
  • Dependent rows, zero row, identical rows → determinant zero.