0% found this document useful (0 votes)
80 views35 pages

Cofactor Expansion and Determinants

This document covers the concepts of cofactor expansion and properties of determinants in linear algebra. It explains how to calculate the determinant of a square matrix, the definition of cofactors, and provides examples of determinant calculations for various matrices. Additionally, it discusses the computational complexity of calculating determinants and the characteristics of upper and lower triangular matrices.

Uploaded by

uwkfsss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views35 pages

Cofactor Expansion and Determinants

This document covers the concepts of cofactor expansion and properties of determinants in linear algebra. It explains how to calculate the determinant of a square matrix, the definition of cofactors, and provides examples of determinant calculations for various matrices. Additionally, it discusses the computational complexity of calculating determinants and the characteristics of upper and lower triangular matrices.

Uploaded by

uwkfsss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cofactor Expansion (3.

1)
Properties of Determinants (3.2)

Linear Algebra

Sections 3.1 ∼ 3.2

Borching Su, National Taiwan University, Taipei, Taiwan

October 15, 2021

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 1 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Table of contents

1 Cofactor Expansion (3.1)


Upper and Lower Triangular Matrices

2 Properties of Determinants (3.2)

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 2 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Overview of Chapter 3

The determinant of a square matrix is a scalar that provides


information about the matrix.
Ex: Invertibility of the matrix.
In this chapter, we will learn
How to calculate the determinant of a matrix.
Properties of determinants.
In this course, we will use determinants in Chapter 5 when we
learn to calculate the eigenvalues of a square matrix.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 3 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Cofactor and Determinants (1/2)

Submatrix Aij for Cofactor


Suppose A = [aij ] ∈ Mn×n is an n × n square matrix with n > 1.
An (n − 1) × (n − 1) matrix Aij is defined as the submatrix A
obtained by removing the ith row and the jth column of A.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 4 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Cofactor and Determinants (2/2)

Determinants
Suppose A = [aij ] ∈ Mn×n is an n × n square matrix.
The determinant of A, denoted by det A or |A|, is defined as
det A = a11 for n = 1 and

det A = a11 · det A11 − a12 · det A12 + · · · + (−1)1+n a1n det A1n

for n > 1.

Cofactor
The (i, j)-cofactor cij of A is defined as (−1)i+j det Aij .

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 5 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Example

[ ]
a b
A= ⇒ A11 = [d], and A12 = [c]
c d
⇒ det A = a · det A11 − b · det A12 = ad − bc.
A is not invertible ⇔ [a c]T and [b d]T are L.D.
⇔ a = c = 0 or [a c]T = k[b d]T for some
k ⇔ det A = ad − bc = 0
Later it will be shown that for any A ∈ Mn×n , A is not
invertible if and only if det A = 0.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 6 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Example

Example: Find the scalars ] A − cI2 is not


[ c for which
11 12
invertible, where A =
−8 −9
Solution: [ ]
11 − c 12
det(A − cI2 ) = det
−8 −9 − c
⇒ If c = −1 or c = 3, A − cI2 is not invertible.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 7 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Example (any 3 × 3 matrix)

a11 a12 a13


a21 a22 a23 = a11 c11 + a12 c12 + a13 c13
a31 a32 a33

a22 a23 a21 a23 a21 a22


= (−1)1+1 a11 + (−1)1+2 a12 + (−1)1+3 a13
a32 a33 a31 a33 a31 a32

= a11 a22 a33 − a11 a23 a32 + a12 a23 a31 − a12 a21 a33 + a13 a21 a32 − a13 a22 a31

⇒ there are six terms, three with “+” sign, and three with “−”
sign.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 8 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Cofactor Expansion Along Different Rows (1/2)


For 3 × 3 matrices

Cofactor expansion along the 1st row


a11 a12 a13
a21 a22 a23 = a11 c11 + a12 c12 + a13 c13
a31 a32 a33
1+1 a22 a23 a21 a23 a21 a22
= (−1) a11 + (−1)1+2 a12 + (−1)1+3 a13
a32 a33 a31 a33 a31 a32
= a11 a22 a33 − a11 a23 a32 − a12 a21 a33 + a12 a23 a31 + a13 a21 a32 − a13 a22 a31
Cofactor expansion along the 2nd row
a21 c21 + a22 c22 + a23 c23
a12 a13 a11 a13 a11 a12
= (−1)2+1 a21 + (−1)2+2 a22 + (−1)2+3 a23
a32 a33 a31 a33 a31 a32
= −a21 a12 a33 + a21 a13 a32 + a22 a11 a33 − a22 a13 a31 − a23 a11 a32 + a23 a12 a31
Cofactor expansion along the 3rd row
a31 c31 + a32 c32 + a33 c33
a12 a13 a11 a13 a11 a12
= (−1)3+1 a31 + (−1)3+2 a32 + (−1)3+3 a33
a22 a23 a21 a23 a21 a22
= a31 a12 a23 − a31 a13 a22 − a32 a11 a23 + a32 a13 a21 + a33 a11 a22 − a33 a12 a21

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 9 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Cofactor Expansion Along Different Rows (2/2)


For 3 × 3 matrices

Observation: For any 3 × 3 matrices, the cofactor expansions


along the 1st, 2nd, or 3rd rows are all the same.
Question: Can we argue that, for any n × n matrices (n is
any positive integer), the cofactor expansion along the ith row
is also a constant for i = 1, 2, · · · , n?

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 10 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Cofactor Expansion Along Different Rows (1/3)


For n × n matrices

Theorem 3.1 (Cofactor Expansion)


For any i = 1, 2, ..., n we have

det A = ai1 ci1 + ai2 ci2 + · · · + ain cin ,

where cij denotes the (i, j)-cofactor of A.

Proof:
By induction on the size k of the matrix A, for k = 1, 2, 3, prove
by brute force.
Assume for k = n − 1 the Theorem holds. We will show that for
k = n, the Theorem also holds.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 11 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Cofactor Expansion Along Different Rows (2/3)


For n × n matrices

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 12 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Cofactor Expansion Along Different Rows (3/3)


For n × n matrices

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 13 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Example
 
1 2 3 8 5
 4 5 6 9 1 
 
Consider the matrix M = 
 7 9 8 4 7 . Find det M .

 0 0 0 1 0 
0 0 0 0 1
detM = 0 + 0 + 0 + 0 + 1(−1)5+5 detM55 = detM55
1 2 3 8
 4 5 6 9 
= det 
 7 9 8 4 

0 0 0 1
 
1 2 3
= 0 + 0 + 0 + 1(−1)4+4 det  4 5 6 
7 9 8

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 14 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Example

Generalizing the idea, we have for any A ∈ Mm×m and


B ∈ Mm×n , [ ]
A B
det = det A.
O In
Question: For an n × n matrix A in general, how many
multiplications and how many additions do you need to calculate
det A?

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 15 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Computational Complexity (1/2)

Without zero entries, the cofactor expansion of an arbitrary


n × n matrix requires at least n! arithmetic operations.

For n = 20, n! > 2.433 × 1018 .


For n = 100, n! > 9.333 × 10157 .
We need to come up with something faster. For example:
 
3 −4 −7 −5  
 0  3 −4 −7
8 −2 6 
det 
 0 = 4(−1)4+4 · det  0 8 −2 
0 9 −1 
0 0 9
0 0 0 4
= ···

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 16 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Computational Complexity (2/2)

The fast example continues...


 
3 −4 −7 −5  
 0  3 −4 −7
8 −2 6 
det 
 0 = 4(−1)4+4 · det  0 8 −2 
0 9 −1 
0 0 9
0 0 0 4
[ ]
3 −4
= 4 · 9(−1) 3+3
· det
0 8
[ ]
= 4 · 9 · 8(−1)2+2 · det 3
= 4 · 9 · 8 · 3.

We took advantage of the property of an upper triangular


matrix in the example above.
Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 17 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Upper and Lower Triangular matrices (1/2)

Upper triangular matrix


An n × n matrix A is said to be upper triangular if aij = 0 for all
i, j that satisfy i > j.

Lower triangular matrix


An n × n matrix A is said to be lower triangular if aij = 0 for all
i, j that satisfy i < j.

Theorem 3.2
The determinant of an upper triangular n × n matrix or a lower
triangular n × n matrix equals the product of its diagonal entries.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 18 / 35
Cofactor Expansion (3.1)
Upper and Lower Triangular Matrices
Properties of Determinants (3.2)

Upper and Lower Triangular matrices (2/2)

Theorem 3.2
The determinant of an upper triangular n × n matrix or a lower
triangular n × n matrix equals the product of its diagonal entries.

Corollary
(a) det In = 1
(b) For any upper or lower triangular A ∈ Mm×m
det A = 0 ⇔ at least one diagonal entry of A is zero.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 19 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Question

Consider two n × n matrices A and B. Is

det (AB) = det A · det B

always true?

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 20 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Properties of Determinants

Theorem 3.3
Let A be an n × n matrix.
(a) If B is a matrix obtained by interchanging two rows of A, then
det B = −det A.
(b) If B is a matrix obtained by multiplying each entry of some
row of A by a scalar k, then det B = kdet A.
(c) If B is a matrix obtained by adding a multiple of some row of
A to a different row, then det B = det A.
(d) For any n × n elementary matrix E, we have
det EA = (det E)(det A).

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 21 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Theorem 3.3 (a)

Theorem 3.3
Let A be an n × n matrix.
(a) If B is a matrix obtained by interchanging two rows of A, then
det B = −det A.
Proof: If B is obtained by interchanging row r and row s = r + 1 of A,
⇒ arj = bsj and Arj = Bsj ∀j.
⇒ (−1)r+1 ar1 det Ar1 + (−1)r+2 ar2 det Ar2 + · · · + (−1)r+n arn det Arn
= (−1)r+1 bs1 det Bs1 + (−1)r+2 bs2 det Bs2 + · · · + (−1)r+n bsn det Bsn
= −(−1)s+1 bs1 det Bs1 −(−1)s+2 bs2 det Bs2 −· · ·−(−1)s+n bsn det Bsn
⇒ det A = − det B.
If B is obtained by interchanging row r and row s > r + 1 of A,
⇒ B may be obtained from A by making adjacent row interchanges:

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 22 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Illustration of the Proof for Theorem 3.3(a)

B may be obtained from A by making adjacent row interchanges:

⇒ det B = (−1)s−r (−1)s−r−1 · det A = (−1)2(s−r)−1 · det A = − det A.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 23 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Theorem 3.3(b)

Theorem 3.3
Let A be an n × n matrix.
(b) If B is a matrix obtained by multiplying each entry of some
row of A by a scalar k, then det B = kdet A.

Proof
(b) If B is obtained by multiplying row r of A by k, then Bri = Ari for any i.
⇒ det B
= (−1)r+1 br1 det Br1 + (−1)r+2 br2 det Br2 + · · · + (−1)r+n brn det Brn
= (−1)r+1 kar1 det Ar1 + (−1)r+2 kar2 det Ar2 + · · · + (−1)r+n karn det Arn
= k · det A.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 24 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Theorem 3.3(c)

Theorem 3.3
Let A be an n × n matrix.
(c) If B is a matrix obtained by adding a multiple of some row of
A to a different row, then det B = det A.
Proof: If C ∈ Mn×n has two identical rows, then by (a) det C = − det C ,
since C = C with the two identical rows interchanged.
⇒ det C = 0.
If B is obtained by adding k times row s of A to row r (̸= s),
⇒ det B = (−1)r+1 br1 det Br1 + · · · + (−1)r+n brn det Brn
= (−1)r+1 (ar1 + kas1 ) det Ar1 + · · · + (−1)r+n (arn + kasn ) det Arn
= (−1)r+1 ar1 det Ar1 + · · · + (−1)r+n arn det Arn
+k · [(−1)r+1 as1 det Ar1 + · · · + (−1)r+n asn det Arn ]
= det A + k · det C , where rows r and s of C are identical.
⇒ det B = det A + k · 0 = det A.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 25 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Theorem 3.3 (d)

Theorem 3.3
Let A be an n × n matrix.
(d) For any n × n elementary matrix E, we have
det EA = (det E)(det A).

Proof: If E ∈ Mn×n is an elementary matrix obtained by


interchanging two rows of In , then det E = − det In = −1,
and by (a) det EA = − det A = (det E)(det A).
For the other two types of elementary matrices, the proofs are
similar.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 26 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Calculating Determinants Using Gaussian Elimination


With the steps 1-4 of the Gaussian elimination algorithm,
every A ∈ Mn×n may be transformed into a row echelon form
by using elementary row operations other than scaling
operations.
Matrices in the row echelon form are upper triangular.

If an n × n matrix A is transformed into an upper triangular matrix


U by elementary row operations other than scaling operations, then

det A = (−1)r u11 u22 · · · unn ,

where r is the number of row interchanges performed.


Proof:
Ek · · · E2 E1 A = U ⇒ det(Ek ) · · · det(E2 ) det(E1 ) det(A) = det U .
Since det(Ek ) = ±1, we have (−1)r det A = det U .
Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 27 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Example

⇒ det A = (−1)2 det U = (−1)2 · (−2) · 1 · 4 · 1 = −8.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 28 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Calculating Determinants Using Gaussian Elimination

Using Gaussian elimination to evaluate determinants is much


faster than using cofactor expansion, especially for large
matrices.

For any A ∈ Mn×n , A is not invertible if and only if det A = 0.

Proof: rank A < n ⇔ its row echelon form has the zero bottom
row.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 29 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Properties of Determinants

Theorem 3.4
Let A and B be square matrices of the same size. The following
statements are true.
(a) A is invertible if and only if det A ̸= 0.
(b) det AB = (det A)(det B).

Proof: (b) If A is invertible, then ∃ elementary matrices E1 , E2 , · · · , Ek ,


such that A = Ek · · · E2 E1 .
⇒ (det A)(det B) = (det Ek ) · · · (det E2 )(det E1 )(det B)
= (det Ek ) · · · (det E2 )(det E1 B) = · · ·
= det(Ek · · · E2 E1 B) = det AB.
If A is not invertible, then ∃ an invertible P such that PA = R, the
reduced row echelon form of A. ⇒ R, and thus RB, have the zero
bottom rows.
⇒ (det P)(det AB) = det P(AB) = det RB = 0 ⇒ det AB = 0, but
(det A)(det B) = 0 · (det B) = 0.
Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 30 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Properties of Determinants

Theorem 3.4 (c)


Let A and B be square matrices of the same size. The following
statements are true.
(c) det AT = det A.

Proof (c) If A is invertible, then ∃ elementary matrices


E1 , E2 , · · · , Ek , such that A = Ek · · · E2 E1 , and
AT = E1T E2T · · · EkT .
⇒ det AT = det(E1T E2T · · · EkT ) = (det E1T )(det E2T ) · · · (det EkT )
= (det E1 )(det E2 ) · · · (det Ek )
= (det Ek ) · · · (det E2 )(det E1 )
= det(Ek · · · E2 E1 ) = det A.
If A is not invertible, then AT is not invertible, otherwise
(AT )T = A would be invertible. ⇒ det AT = 0 = det A.
Note: det EiT = det Ei
Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 31 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Properties of Determinants

Theorem 3.4 (d)


Let A and B be square matrices of the same size. The following
statements are true.
(d) If A is invertible, then det A−1 = 1 .
det A
Proof: det AA−1 = det In = 1 = (det A)(det A−1 ).

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 32 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Properties of Determinants

Theorem 3.4
Let A and B be square matrices of the same size. The following
statements are true.
(a) A is invertible if and only if det A ̸= 0.
(b) det AB = (det A)(det B).
(c) det AT = det A.
(d) If A is invertible, then det A−1 = 1 .
det A

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 33 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Example

 
1 −1 2
What is the condition on c for the matrix  −1 0 c  to be
2 1 7
invertible?
[ 1 −1 2 ] [ 1 −1 2
] [ 1 −1 2
] [ 1 −1 2
]
−1 0 c → 0 −1 c + 2 → 0 −1 c + 2 → 0 −1 c+2
2 1 7 2 1 7 0 3 3 0 0 3c + 9

∴ The matrix is invertible if and only if c ̸= −3.

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 34 / 35
Cofactor Expansion (3.1)
Properties of Determinants (3.2)

Examples

Example:

[ ] [ ]
Im O ′ A B
⇒ det M = det · = (det C )(det A).
O C O In

Example:
[ ] [ ]
1 0 0 0
A= ,B = , det(A + B) ̸= det A + det B.
0 0 0 1

Revision 1 (Last Updated: October 17, 2021) Click here to report any errors/typos. 35 / 35

You might also like