Some methods for calculating the determinant:

For a 2x2 matrix,
| a1 a2 |
| a3 a4 |

the determinant is defined as D = a1 * a4 - a2 * a3

For a 3x3 or above, row elimination can be used.
Choose any row or column. For each element in the row, remove the row and the column of the matrix the element is on, find the determinant of this matrix, and multiply it by the element. Even elements have a negative sign.

In practice for a 3 x 3 matrix, it works out to:
| a1 a2 a3 |
| a4 a5 a6 |
| a7 a8 a9 |


det =
| a5 a6 | a1 -
| a8 a9 |

| a4 a6 | a2 +
| a7 a9 |

| a4 a5 | a3
| a7 a8 |

This method gets very tedious as you get to larger matrices because of its recursive nature. For a four-by-four matrix, writing this out gives you four 3x3 determinants, which each require 3 2x2 determinants each. For a 5x5, you need 5 4x4, each of which needs 4 3x3, etc, etc, etc. Something you want to leave to a computer, obviously.