1.2 Matrices: determinants, inverses, and rank
Transpose
 Definition
 Let A be an n × m matrix (i.e. a matrix with n rows and m columns). The transpose A' of A is the m × n matrix in which, for i = 1, ..., m, the ith row is the ith column of A.
Determinant
An important characteristic of a square matrix (a matrix with the same number of rows as columns) is its “determinant”. We can conveniently define the determinant of a matrix inductively, in terms of the determinants of smaller matrices. Definition

The determinant of a 1 × 1 matrix is the single number in the matrix. For any n ≥ 2, the determinant of the n × n matrix A is
A = ∑nwhere a_{1j} is the number in the first row and jth column of A and A_{1j} is the n − 1 × n − 1 matrix obtained by deleting the first row and jth column of A.
j=1(−1)^{1+j}a_{1j}A_{1j}
A  =  a_{11}A_{11} − a_{12}A_{12} + a_{13}A_{13} − ... + (−1)^{1+n}A_{1n}. 
To use the definition to find the determinant of an n × n matrix, you first write down the expression it gives for the determinant as a sum of the determinants of a collection of n − 1 × n − 1 matrices. Then, for each of these determinants, you substitute the expression the definition gives as a sum of the determinants of a collection of n − 2 × n − 2 matrices. You continue in the same way until you get to an expression involving the determinants of a collection of 1 × 1 matrices, which the definition says are simply the single elements of the matrices. If n is bigger than 3, this process will involve a lot of bytes (or paper). But in principle it is possible. The following examples illustrate it.
 Example

Let A be the 2 × 2 matrix
a b c d .
 Example

Let A be the 3 × 3 matrix
a b c d e f g h i . e f h i , a(ei − fh) − b(di − fg) + c(dh − eg).
 Proposition

The determinant of the n × n matrix A is equal to
∑nfor any i = 1, ..., n and is also equal to
j=1(−1)^{i+j}a_{ij}A_{ij}∑nfor any j = 1, ..., n, where A_{ij} is the matrix obtained by deleting the ith row and jth column of A.
i=1(−1)^{i+j}a_{ij}A_{ij}
 Source
 For a proof, see Simon and Blume (1994), Theorem 26.1 on p. 743.
Notice that, as in the original definition, the coefficients (−1)^{i+j} in each of these sums alternate in sign. Notice also that the sign of the first term in either sum is positive if the exponent of −1 in that term is even and negative if the exponent is odd. In particular, it is not always positive. For example, the coefficient (−1)^{i+1} of the first term in the first sum is negative if i is even.
The first expression in the proposition is called the expansion along the ith row of the matrix; the second expression is called the expansion along the jth column of the matrix.
The next example verifies the proposition for an arbitrary 3 × 3 matrix. Example

Let A be a 3 × 3 matrix; denote its elements as in an earlier example (to avoid a dizzying collection of subscripts). The first sum in the proposition is
−a_{21}A_{21} + a_{22}A_{22} − a_{23}A_{23} = −d(bi − ch) + e(ai − cg) − f(ah − bg)for i = 2 anda_{31}A_{31} + a_{32}A_{32} − a_{33}A_{33} = g(bf − ce) − h(af − cd) + i(ae − bd)for i = 3, both of which are equal to the value of A calculated in the earlier example. The second sum in the proposition isa_{11}A_{11} − a_{21}A_{21} + a_{31}A_{31} = a(ei − fh) − d(bi − ch) + g(bf − ce)for j = 1,−a_{12}A_{12} + a_{22}A_{22} − a_{32}A_{32} = −b(di − fg) + e(ai − cg) − h(af − cd)for j = 2 anda_{13}A_{13} + a_{23}A_{23} − a_{33}A_{33} = c(dh − eg) − f(ah − bg) + i(ae − bd)for j = 3, all of which are equal to the value of A calculated in the earlier example.
 Example
 Let A be an n × n matrix in which all the elements are zero except the ones on the “main diagonal”—that is, the elements a_{kk} in the kth row and kth column for k = 1, ..., n. Applying the definition, the determinant of A is simply a_{11} times the determinant of the matrix obtained by deleting the first row and first column of A (because all the other elements in the first row of A are zero). This latter matrix has the same structure as A, and its determinant is a_{22} times the determinant of the matrix obtained by deleting the first two rows and first two columns of A. Proceeding in the same way, we see that the determinant of A is a_{11}a_{22}···a_{nn}, the product of all the elements on the main diagonal of the matrix (the only positive elements in the matrix).
Inverse
 Definition
 The square matrix is nonsingular if its determinant is not zero.
 Example

The determinant of the matrix
a b c d
 Definition

Let A be an n × n matrix. If there is a matrix B such that
BA = AB = I,where I is the n × n identity matrix (in which every entry on the main diagonal is 1 and all other entries are 0), then B is an inverse of A, denoted A^{−1}.
 Proposition
 A square (n × n) matrix has at most one inverse.
 Proof
 Let A be a n × n matrix, and suppose that B and C are both inverses of A. Then by the definition of an inverse, BA = AB = I and CA = AC = I, where I is the n × n identity matrix. Thus C = CI = C(AB) = (CA)B = IB = B, so that C and B are the same.
 Proposition
 A matrix has an inverse if and only if it is nonsingular.
 Source
 For a proof, see Simon and Blume (1994), Theorem 26.3 on p. 732.
 Proposition

The inverse of the nonsingular n × n matrix A is the n × n matrix for which the (i,j)th component is
(−1)^{i+j}A_{ji}/A,where A_{ji} is the matrix obtained by deleting the jth row and ith column of A.
 Source
 For a proof, see Simon and Blume (1994), Theorem 26.7 (which follows from Theorem 26.6) on p. 736.
 Example

For the 2 × 2 matrix
A = a b c d 1 ad − bc d −b −c a .
 Example

The inverse of the matrix
A = a b c d e f g h i 1 A A_{11} −A_{21} A_{31} −A_{12} A_{22} −A_{32} A_{13} −A_{23} A_{33}
Rank
The “rank” of a matrix is usually defined as the maximal number of linearly independent column vectors in the matrix. But to give this definition, I would need to define the concept of linear independence, which is not otherwise needed in this tutorial. So instead I give a definition that uses only concepts defined so far. (This definition is usually given as a result, following a definition in terms of linearly independence.) Note that the matrix in the definition is not required to be square. Definition
 The rank of a matrix A is the number of rows and columns in the largest square matrix obtained by deleting rows and columns of A that has a determinant different from 0.
 Example

The rank of the matrix
1 0 1 0
 Example

The rank of the matrix
1 0 2 0 2 4