The determinant of is the sum of three terms defined by a row or column. Each term is the product of an entry, a sign, and the minor for the entry. The signs look like this:
A minor is the 2×2 determinant formed by deleting the row and column for the entry. For example, this is the minor for the middle entry:
Here is the expansion along the first row:
You would probably never write down the following matrix, but the patterns of the signs and the deleted rows and columns of the original matrix may be helpful. The determinant is the sum of any one of the rows or columns of this complicated matrix:
The same method works for determinants of any size. Consider the 4×4 matrix:
Choose a row or column, typically with as many zeros as possible to save multiplications.
Form terms made of three parts:
1. the entries from the row or column
2. the signs from the row or column; they form a checkerboard pattern:
+

+


+

+
+

+


+

+
3. the minors; these are the determinants of the matrix with the row and column of the entry taken out; here dots are used to show those. For example, here are the minors for the first row:
, , ,
Here is the determinant of the matrix by expanding along the first row:
 + 
The product of a sign and a minor is called a cofactor.
Even when there are many zero entries, row reduction is more systematic, simpler, and less prone to error. Row reduction on a determinant uses the three elementary row operations. If you factor a number from a row, it multiplies the determinant. If you switch rows, the sign changes. And you can add or subtract a multiple of one row from another. When the matrix is upper triangular, multiply the diagonal entries and any terms factored out earlier to compute the determinant.