Uploaded by Ismail

Lecture notes - EMS412U - Matrix - Determinant

advertisement
EMS412U - Matrix
Topic 2: Determinant
Guang Li
October 17, 2021
Contents
1 What is determinant?
1
2 Determinant properties (1-10)
1
3 Determinant formula
5
A Determinant properties verified by the determinant formula
8
1
What is determinant?
• Determinant is a number associated with a square matrix.
• The determinant of a square matrix is closely related to many properties of the matrix,
and linear equations.
• The notation for the determinant of a matrix A is |A| or det(A).
• The determinant of a 1 × 1 matrix (actually just a scalar), denoted by A = a, is just itself,
i.e.
|A| = a
Note that this is not to be confused with the absolute value, even though the notation is
the same.
• The determinant of a 2 × 2 matrix
[
a, b
A=
c, d
]
is
|A| =
2
a, b
= ad − bc
c, d
Determinant properties (1-10)
Property 1: The determinant of an identity matrix is 1, i.e. |I| = 1.
1
(1)
Example:
1, 0
=1×1−0×0=1
0, 1
Property 2: Exchange of two rows reverses the sign of the determinant.
Example:
a, b
= ad − bc,
c, d
while
a, b
c d
.
= bc − ad = −(ad − bc) = −
a, b
c, d
Property 3: Two equivalent rows lead to a zero determinant.
Prove this: Exchange of rows gives the same matrix; so the determinant is not changed by
the exchange of the rows. But exchange of rows reverses the sign of the determinant according
to Property 2. Therefore the determinant of a matrix with two equivalent rows must be zero.
Example:
a, b
= ad − ab = 0,
a, b
Property 4: If one of the row of a matrix is multiplied by a factor, then the determinant
of the matrix will be multiplied by this factor.
Example:
a, b
ka, kb
=k
c, d
c, d
Verify this:
ka, kb
= kad − kbc = k(ad − bc)
c, d
k
a, b
= k(ad − bc)
c, d
This is NOT to be confused with the multiplication
[
]
[
a,
ka, kb
=k
c,
kc, kd
of a matrix by a scalar:
]
b
d
Exercise:
ka, kb
a, b
a, b
a, b
=k
=k·k
= k2
kc, kd
kc, kd
c, d
c, d
In general for a matrix A with order of n, det(kA) = k n det(A).
Exercise:
1, 0
1, 0
a, 0
= ad
=a·d
=a
0, 1
0, d
0, d
2
In general, the determinant of a diagonal matrix is
a11 0
0 ···
0 a22 0 · · ·
0
0 a33 · · ·
..
..
..
..
.
.
.
.
0
0 ···
0
0
0
0
..
.
= a11 a22 · · · ann
ann
Property 5: If a matrix has a row with all zeros then its determinant is zero.
Example:
0, 0
=0
c, d
From property 4 we have
a, b
ka, kb
=k
c, d
c, d
If we set k = 0, then
0 × a, 0 × b
a, b
=0×
=0
c,
d
c, d
Property 6: Addition property.
Example:
a + a′ , b + b′
a, b
a′ , b′
=
+
c,
d
c, d
c, d
Note that: In general, |A + B| is NOT equal to |A| + |B|.
Property 7: Subtracting k× row i from row j does not change the determinant.
Example:
a,
b
a, b
a,
b
=
+
Property 6
c − ka, d − kb
c, d
−ka, −kb
=
a, b
a, b
−k
Property 4
c, d
a, b
=
a, b
Property 3
c, d
Exercise:
Calculate the determinant using property 7).
a, b
a,
b
=
c, d
0, d − ac b
=
a,
b
0, d − ac b
=
a,
0
0, d − ac b
row 2 − ac ×row 1
b
row 1 − d−bc/a
× row 2
=ad − bc
Exercise:
3
Calculate the determinant using property 7).
1, 2, 1
1, 2, 1
1, 1, 2 = 0, −1, 1 r2 −r1
2, 1, 1
2, 1, 1
1, 2,
1
1, 2,
1
= 0, −1, 1 r3 −2×r1 = 0, −1, 1 r3 −3×r2
0, −3, −1
0, 0, −4
1, 2,
1
1, 2,
0
= 0, −1, 0 r2 −(− 41 )×r3 = 0, −1, 0 r1 −(− 14 )×r3
0, 0, −4
0, 0, −4
1, 0,
0
= 0, −1, 0 r1 −(−2)×r3
0, 0, −4
=1 · (−1) · (−4) = 4
We call this process as row elimination.
Property 8: The determinant of a triangle matrix is the multiplication of the diagonal
elements.
• The determinant of upper triangle matrix:
a11 ⋆
⋆ ···
0 a22 ⋆ · · ·
0
0 a33 · · ·
..
..
..
..
.
.
.
.
0
0 ···
0
⋆
⋆
⋆
..
.
= a11 a22 · · · ann
ann
• The determinant of upper triangle matrix:
a11 0
0 ···
⋆ a22 0 · · ·
⋆
⋆ a33 · · ·
..
..
..
..
.
.
.
.
⋆
⋆ ···
⋆
0
0
0
= a11 a22 · · · ann
0
ann
Property 9: Transpose of a matrix does not change its determinant, i.e. |AT | = |A|.
This means Properties 2 − 6 also hold for column operations.
Property 10: The determinant of multiplication of two matrices equals to the multiplication
of the determinant of each matrix, i.e. |AB| = |A||B|.
1. Note that dimensions of A and B must allow the product.
2. So if A = B, we have |A2 | = |A|2 .
3. The multiplication rule holds for n matrices. So we have |Ak | = |A|k .
4
3
Determinant formula
We know the determinant formula for a 2 by 2 matrix. What is the determinant for a matrix
with higher order? Let us start working with a 2 by 2 matrix to get some clues.
Calculate the determinant of a 2 × 2 matrix using the determinant properties:
a b
a 0
0 b
=
+
c d
c d
c d
=
0 b
0 b
a 0
a 0
+
+
+
0 d
c 0
0 d
c 0
=
0 b
a 0
+
c 0
0 d
=ad −
c 0
0 b
=ad − cb
We can see that
• Two nonzero terms;
• Each term is a product of two elements;
• Each element is from different rows and different columns.
Calculate the determinant of a 3 × 3 matrix
a11 , a12 , a13
a21 , a22 , a23
a31 , a32 , a33
a11 , 0,
0
a11 , 0,
0
0, a12 , 0
0, a23 + a21 , 0,
0
= 0, a22 , 0 + 0,
0,
0, a33
0, a32 , 0
0,
0, a33
0, a12 , 0
0,
0, a13
0,
0, a13
0, a23 + a21 , 0,
0 + 0, a22 , 0
+ 0,
a31 , 0,
0
0, a32 , 0
a31 , 0,
0
=a11 a22 a33 − a11 a23 a32 − a12 a21 a33 + a12 a23 a31 + a13 a21 a32 − a13 a22 a31
∑
=
(−1)p a1i a2j a3k
=a11 (a22 a33 − a23 a32 ) − a12 (a21 a33 − a12 a23 a31 ) + a13 (a21 a32 − a22 a31 )
=a11
a22 , a23
a , a23
a , a22
− a12 21
+ a13 21
a32 , a33
a31 , a33
a31 , a32
where p is the number of exchanges needed to make the matrix diagonal; {i, j, k} is an specified
order of {1, 2, 3} and we call this as a permutation.
The det of a 3 × 3 matrix ⇒ the det of three 2 × 2 matrices.
5
Calculate the determinant of a 3 × 3 matrix
a11 , a12 , a13
a21 , a22 , a23
a31 , a32 , a33
=a11
a22 , a23
a , a23
a , a22
− a12 21
+ a13 21
a32 , a33
a31 , a33
a31 , a32
=a11 M11 − a12 M12 + a13 M13
=a11 M11 + a12 (−M12 ) + a13 M13
=a11 (−1)1+1 M11 + a12 (−1)1+2 M12 + a13 (−1)1+3 M13
=a11 A11 + a12 A12 + a13 A13
• We call this procedure as expansion by the 1st row.
• Minors: M11 , M12 and M13 .
• Cofactors: A11 , A12 and A13 .
• Actually, it can be calculated by expanding by any row or column, e.g. by the 2nd row
a11 , a12 , a13
|A| = a21 , a22 , a23
a31 , a32 , a33
=a21 (−1)2+1
a12 , a13
a , a13
+ a22 (−1)2+2 11
a32 , a33
a31 , a33
+ a23 (−1)2+3
= − a21
a11 , a12
a32 , a32
a12 , a13
a , a13
a , a12
+ a22 11
− a23 11
a32 , a33
a31 , a33
a31 , a32
= − a21 a12 a33 + a21 a13 a32 + a22 a11 a33 − a22 a13 a31
− a23 a11 a32 + a23 a12 a31
Using this notation, we can write the determinant concisely. Expanding by the first row
gives
|A| = a11 A11 + a12 A12 + a13 A13
Expanding by the 1st row
= a21 A21 + a22 A22 + a23 A23
Expanding by the 2nd row
= a31 A31 + a32 A32 + a13 A33
Expanding by the 3rd row
• In general, the determinant of a n × n matrix can be calculated by expanding along the
ith row or jth column. For example, if we do the expansion along the ith row, we have
a11 , a12 ,
a21 , a22 ,
|A| = .
..
..,
.,
an1 , an2 ,
. . . , a1n
n
∑
. . . , a2n
=
aij (−1)i+j Mij
.
..
..
.,
j=1
. . . , ann
n
∑
=
aij Aij
j=1
where we call Mij as a minor and define the cofactor Aij = (−1)i+j Mij .
6
Example 1. Use determinant formula to calculate

1 2

A= 6 5
7 8
the determinant of the matrix

3
4
1
Solution:
Expanding along the first row we have
|A| = a11 A11 + a12 A12 + a13 A13 = 1 × (−27) + 2 × 22 + 3 × 13 = 56
But
a21 A11 + a22 A12 + a23 A33 = 6 × (−27) + 5 × 22 + 4 × 13 = 0
a31 A11 + a32 A12 + a13 A33 = 7 × (−27) + 8 × 22 + 1 × 13 = 0
The last two results give you a zero, and this is not a coincidence. Actually, if you sum up
the products of a row and the cofactors derived from another row, then the result must be zero.
Why? a21 A11 + a22 A12 + a23 A33 can be viewed as the expanding along the first row of a matrix
with two equivalent rows:


6 5 4
B = 6 5 4
7 8 1
and |B| = 0. So |B| = a21 A11 + a22 A12 + a23 A33 = 0.
Example 2. Evaluate
1
1
1
1
1 1+a
1
1
D=
=?
1
1
1+b
1
1
1
1
1+c
Solution:
1
0
D=
1
1
1
1
1
a
0
0
1 1+b
1
1
1
1+c
subtracting row 1 from row 2
1
0
=
0
1
1
a
0
1
1
1
0
0
b
0
1 1+c
subtracting row 1 from row 3
1
0
=
0
1
1
a
0
1
1
1
0
0
b
0
1 1+c
subtracting row 1 from row 3
1
0
=
0
0
1
a
0
0
1
0
b
0
a 0 0
=1 0 b 0
0 0 c
1
0
0
c
subtracting row 1 from row 4
expanding by col. 1
=abc
7
Example 3. Calculate
x+y
x
y
y
x+y
x =?
x
y
x+y
Solution:
x+y
x
y
y
x+y
x
x
y
x+y
r +r +r
2
3
==1===
===
2(x + y) 2(x + y) 2(x + y)
y
x+y
x
x
y
x+y
1
1
1
x
= 2(x + y) y x + y
x
y
x+y
1
1
1
r2 −y×r1
x
x−y
======= 2(x + y) 0
r1 −x×r1
0 y−x
y
expand along r1
============== 2(x + y)
x
x−y
y−x
y
= 2(x + y)(xy + (x − y)2 ) = 2(x3 + y 3 )
A
Determinant properties verified by the determinant formula
This appendix contains supplementary reading material, which helps you get a better understanding of the determinant properties using the determinant formula.
Suppose


a11 a12 a13
A = a21 a22 a23 
a31 a32 a33
Two rows (or columns) equal
a11 a12 a13
|B| = a21 a22 a23
a21 a22 a23
= a11
a22 a23
a
a
a
a
− a12 21 23 + a13 21 22
a22 a23
a21 a23
a21 a22
= a11 (a22 a23 − a22 a23 ) − a12 (a21 a23 − a21 a23 ) + a13 (a21 a22 − a21 a22 )
=0
8
Multiple of row by a scalar
λa11 λa12 λa13
a22
a23
|B| = a21
a31
a32
a33
a
a
a
= λa11 22 23 − λa12 21
a32 a33
a31
(
a
a
a
= λ a11 22 23 − a12 21
a32 a33
a31
a23
a
a
+ λa13 21 22
a33
a31 a32
a23
a
a
+ a13 21 22
a33
a31 a32
)
a11 a12 a13
= λ a21 a22 a23
a31 a32 a33
= λ|A|
Exercise
λa11 λa12 λa13
|B| = |λA| = λa21 λa22 λa23 =?|A|
λa31 λa32 λa33
a11
a12
a13
a11
a12
a13
a22
a23
= λ λa21 λa22 λa23 = λ2 a21
λa31 λa32 λa33
λa31 λa32 λa33
a11 a12 a13
= λ3 a21 a22 a23 = λ3 |A|
a31 a32 a33
a11
a12
a13
|B| = λa11 λa12 λa22 =?|A|
a31
a32
a33
a11 a12 a13
= λ a11 a12 a13 = 0
a31 a32 a33
Interchange of two rows (or columns) Consider |A| and |B| in which rows 1 and 2 are
interchanged
a21 a22 a23
|B| = a11 a12 a13
a31 a32 a33
a11 a12 a13
|A| = a21 a22 a23
a31 a32 a33
Expanding A by the 1st row
|A| = a11
a
a
a
a
a22 a23
− a12 21 23 + a13 21 22
a31 a32
a31 a33
a32 a33
(2)
and expanding A by the 2nd row
|B| = −a11
a
a
a
a
a22 a23
+ a12 21 23 − a13 21 22
a31 a32
a31 a33
a32 a33
9
(3)
So |A| = −|B|.
Interchanging two rows (or columns) changes the sign of the determinant.
Adding rule
Expanding by the 1st row:
a11 + b11 a12 + b12 a13 + b13
a21
a22
a23
a31
a32
a33
=(a11 + b11 )A11 + (a12 + b12 )A12 + (a13 + b13 )A13
=(a11 A11 + a12 A12 + a13 A13 ) + (b11 A11 + b12 A12 + b13 A13 )
b11 b12 b13
a11 a12 a13
= a21 a22 a23 + a21 a22 a23
a31 a32 a33
a31 a32 a33
In general, |A + B| ̸= |A| + |B|.
Adding multiple roles or columns
Consider
a11 a12 a13
A = a21 a22 a23
a31 a32 a33
Then
a11 + λa21 a12 + λa22 a13 + λa23
a21
a22
a23
B=
a31
a32
a33
a11 a12 a13
λa21 λa22 λa23
a22
a23
= a21 a22 a23 + a21
a31 a32 a33
a31
a32
a33
a11 a12 a13
a21 a22 a23
a11 a12 a13
= a21 a22 a23 + λ a21 a22 a23 = a21 a22 a23 = |A|
a31 a32 a33
a31 a32 a33
a31 a32 a33
This means adding multiple or rows or columns makes no difference to the determinant.
10
Download