The determinant can be defined recursively, where the determinant of a 1 by 1 matrix is the single entry in that matrix. Given a larger matrix, delete the first row and the jth column. This leaves n-1 rows and n-1 columns. By induction we can compute the determinant of this smaller matrix. This is called a subdeterminant. Multiply this by the entry in row 1 column j, then negate the result if j is even. Finally, add up all these products as j runs from 1 to n to obtain det(M). Call this recursive procedure det1(M).
If the general 2×2 matrix is written (a,b|c,d), its determinant is a×det(d)-b×det(c), or ad-bc. Use this formula to find the determinant of the following 3×3 matrix.
7 3 1 0 9 5 4 2 0
The 3 subdeterminants are -10, -20, and -36, giving a determinant of -46. Write a general 3×3 matrix as follows:
a b c d e f g h i
Compute its determinant and group the positive terms together, giving the following.
aei + bfg + cdh - ceg - bdi - afh
The main diagonal appears as a positive product, and the antidiagonal, going from upper right to lower left, is negated. If you shift the main diagonal, so that it starts with b, down and to the right to f, then down and to the right and wrapping around to g, it too is positive. Similarly, the diagonal cdh is positive. The three diagonals that slant the other way are negative. This is a fast and easy trick for computing the determinant of a 3×3 matrix. Unfortunately its generalization to larger matricies is not "fast and easy".