Lecture Notes: Determinant of A Square Matrix: Taoyf@cse - Cuhk.edu - HK
Lecture Notes: Determinant of A Square Matrix: Taoyf@cse - Cuhk.edu - HK
Yufei Tao
Department of Computer Science and Engineering
Chinese University of Hong Kong
taoyf@cse.cuhk.edu.hk
1 Determinant Definition
Let A = [aij ] be an n × n matrix (i.e., A is a square matrix). Given a pair of (i, j), we define M ij
to be the (n − 1) × (n − 1) matrix obtained by removing the i-th row and j-th column of A. For
example, suppose that
1 2 1
A = 3 0 -2
-1 -1 2
Then:
2 1 1 1 1 1
M 21 = , M 22 = , M 32 =
-1 2 -1 2 3 -2
Besides det(A), we may also denote the determinant of A as |A|. Henceforth, if we apply (1)
to compute det(A), we say that we expand A by row i∗ . It is important to note that the value of
det(A) does not depend on the choice of i∗ . We omit a proof of this fact, but illustrate it in the
following examples.
For instance:
2 1
-1 = 2 × 2 − 1 × (−1) = 5.
2
= 2 × 2 + (−1) × (−1) = 5.
1
Alternatively, choosing i∗ = 2, we get:
2 1 2+1
-1 2 = (−1)
· (−1) · det(M 21 ) + (−1)2+2 · 2 · det (M 22 )
= 1 × 1 + 2 × 2 = 5.
Choosing i∗ = 1, we get:
0 −2 3 −2 3 0
det(A) = 1
− 2 + 1
−1 2 −1 2 −1 −1
= 1(0 − 2) − 2(6 − 2) + 1(−3 − 0) = −13.
2 Properties of Determinants
Lemma 1. Let A = [aij ] be an n × n matrix with n > 1. Choose an arbitrary j ∗ ∈ [1, n]. The
determinant of A equals:
n
X ∗
det(A) = (−1)i+j · aij ∗ · det(M ij ∗ ).
i=1
The value of the above equation does not depend on the choice of j ∗ .
We omit a proof but illustrate the lemma with an example below. Henceforth, if we compute
det(A) by the above lemma, we say that we expand A by column j ∗ .
2
Choosing j ∗ = 1, we get:
0 −2 2 1 2 1
det(A) = 1
− 3 + (−1)
−1 2 −1 2 0 −2
= 1(0 − 2) − 3(4 + 1) − 1(−4 − 0) = −13.
Proof. If A has a zero row, then det(A) = 0 follows from expanding A by that row. The case
where A has a zero column is similar.
Determinant of a Row-Echelon Matrix. The next lemma shows that the determinant of a
matrix in row-echelon form is simply the product of the values on the main diagonal.
Lemma 2. Let A = [aij ] be an n × n matrix in row-echelon form. Then, det(A) = Πni=1 aii .
Proof. We can prove the lemma by induction. First, correctness is obvious for n = 1. Assuming
correctness for n ≤ t − 1 (for t ≥ 2), consider n = t. Expanding A by the first row gives:
n
X
det(A) = (−1)1+j · a1j · det(M 1j ). (2)
j=1
From induction we know that det(M 11 ) = Πni=2 aii . Furthermore, for j > 1, det(M 1j ) = 0 because
the first column of M 1j contains all 0’s. It thus follows that (2) equals Πni=1 aii .
3. Let r i and r j be two row vectors of A. Update row r i to r i + c · r j , where c can be any real
value.
3
3. has no change after Operation 3.
Example 4.
1 2 1 1
2 1 1
2 1 1
2 1
3 0 -2 = 3
0 -2 = 0
-6 -5 = 0
-6 -5 = −13.
-1 -1 2 0 1 3 0 1 3 0 0 13/6
Proof. We prove only the row case. Switching the two rows gets back the same matrix. However, by
Lemma 3, the determinant of the matrix should be multiplied by −1. Therefore, we get det(A) =
−det(A), meaning det(A) = 0.
Determinant under Matrix Multiplication. We state the following result without proof:
Example 5.
1 2 1
3 0 -2 = −13
-1 -1 2
-2 1 0
0 1 1 = −3
1 -2 0
1 2 1 -2 1 0 -1 1 2
3 0 -2 0 1 1 = -8
7 0 = 39.
-1 -1 2 1 -2 0 4 -6 -1
Relationships with Ranks. We close the lecture notes by giving two lemmas that relate deter-
minants to ranks:
4
Proof. We can first apply elementary row operations to convert A into row-echelon form A∗ . Thus,
A has rank n if and only if A∗ has rank n. Since A∗ is a square matrix, that it has rank n is
equivalent to saying that all the numbers on its main diagonal are non-zero. Thus, by Lemma 2,
we know that A∗ has rank n if and only if det(A∗ ) 6= 0. Finally, by Lemma 3, det(A) 6= 0 if and
only if det(A∗ ) 6= 0. We thus complete the proof.
Lemma 6. Let A be an m × n matrix. A has rank r if and only if both the following hold
simultaneously:
Example 6. Let A be as shown in (3). It can be verified that rank A = 2. Indeed, you can easily
find a 2 × 2 submatrix of A with a non-zero determinant. On the other hand, any 3 × 3 submatrix
of A always has determinant 0.