Let A be a square matrix of order n, and B be the matrix of the same size whose (i,j) entry is (-1)i+j times the determinant of the matrix obtained from A by deleting its (j,i) [sic] entry. (This B is often, and confusingly, called the adjoint of A. Blecch. We'll call it the cofactor matrix; see below.) Then A B = B A = det(A) times the identity matrix. Corollary: a square matrix with integer entries has an integer inverse if and only if its determinant is 1 or -1. (Likewise with Z replaced by any commutative ring: the determinant must be a ``unit'', i.e. an invertible element of the ring.)

The entries if B are called ``cofactors'' of A. These are (up to a plus-or-minus sign) special cases of ``minors'' of a matrix. A minor of a (not necessarily square) matrix A is the determinant of a square matrix obtained by omitting some rows and/or columns of A. [A determinant of order 0 is deemed to equal 1, as in 0!=x0=1.] We have seen already that a square matrix of order n has rank <n if and only if its determinant vanishes. This generalizes as follows: the rank of any matrix A is the largest integer r such that some order-r minor of A does not vanish.

Proof: It is clear that the rank is at least r, because we have r linearly independent columns. We'll show that, conversely, if there are r linearly independent columns then at least one of the minors formed with these columns is nonzero. This is because the submatrix of A formed with these columns has rank r; therefore, so does its transpose. So, its rows span Fr, and include a basis. Using these rows gives the desired minor.

Corollary: the rank of the cofactor matrix of A is n,1,0 according as the rank of A is n, n-1, or less than n-1.