Download Note 8 : MATRIX ALGEBRA - Department of Computer Science

Document related concepts
no text concepts found
Transcript
Note 8 : MATRIX ALGEBRA
01
Note 8 : MATRIX
ALGEBRA
CS131: Mathematics for Computer Science II
Part II, Linear Algebra and Matrices
Note 8 : MATRIX ALGEBRA
Matrices
A matrix is a rectangular array of objects.
02
Note 8 : MATRIX ALGEBRA
Matrices
A matrix is a rectangular array of objects.
We shall usually consider only matrices of real numbers but more generally the
elements can be objects such as complex numbers, rational numbers, integers,
integers modulo n for some n ∈ N, or even other matrices.
03
Note 8 : MATRIX ALGEBRA
Matrices
A matrix is a rectangular array of objects.
We shall usually consider only matrices of real numbers but more generally the
elements can be objects such as complex numbers, rational numbers, integers,
integers modulo n for some n ∈ N, or even other matrices.


1 5
−3 2


A 2 × 2 matrix
04
Note 8 : MATRIX ALGEBRA
05
Matrices
A matrix is a rectangular array of objects.
We shall usually consider only matrices of real numbers but more generally the
elements can be objects such as complex numbers, rational numbers, integers,
integers modulo n for some n ∈ N, or even other matrices.


1 5
−3 2


A 2 × 2 matrix

3π

 0

− 23

e
√ 
2

π
3
A 3 × 2 matrix
Note 8 : MATRIX ALGEBRA
06
Matrices
A matrix is a rectangular array of objects.
We shall usually consider only matrices of real numbers but more generally the
elements can be objects such as complex numbers, rational numbers, integers,
integers modulo n for some n ∈ N, or even other matrices.


1 5
−3 2


A 2 × 2 matrix

3π

 0

− 23

e
√ 
2

π
3
A 3 × 2 matrix


2 + 3i
1−i
3 − 7i
i
−4
6 − 2i
A 2 × 3 matrix


Note 8 : MATRIX ALGEBRA
The Order of a Matrix
A matrix A of order m × n is an array of numbers arranged in m rows and n
columns and usually written as


a a · · · · · · a1n
 11 12



a
a
·
·
·
·
·
·
a
 21 22
2n 


A= .
or
A = [aij ]m×n .
.

.. 
 ..


am1 · · · · · · · · · amn
07
Note 8 : MATRIX ALGEBRA
The Order of a Matrix
A matrix A of order m × n is an array of numbers arranged in m rows and n
columns and usually written as


a a · · · · · · a1n
 11 12



a
a
·
·
·
·
·
·
a
 21 22
2n 


A= .
or
A = [aij ]m×n .
.

.. 
 ..


am1 · · · · · · · · · amn
The numbers aij are called the elements (or entries) of A.
08
Note 8 : MATRIX ALGEBRA
The Order of a Matrix
A matrix A of order m × n is an array of numbers arranged in m rows and n
columns and usually written as


a a · · · · · · a1n
 11 12



a
a
·
·
·
·
·
·
a
 21 22
2n 


A= .
or
A = [aij ]m×n .
.

.. 
 ..


am1 · · · · · · · · · amn
The numbers aij are called the elements (or entries) of A.
Element aij is in the i th row and j th column.
09
Note 8 : MATRIX ALGEBRA
10
Column Vectors and Row Vectors
• A column matrix or column vector is a m × 1 matrix.


a
 11 


 a21 

Column vector: 
 .. 
 . 


am1
Note 8 : MATRIX ALGEBRA
11
Column Vectors and Row Vectors
• A column matrix or column vector is a m × 1 matrix.


a
 11 


 a21 

Column vector: 
 .. 
 . 


am1
• A row matrix or row vector is a 1 × n matrix.
Row vector: [b11 b12 · · · b1n ]
Note 8 : MATRIX ALGEBRA
12
Column Vectors and Row Vectors
• A column matrix or column vector is a m × 1 matrix.


a
 11 


 a21 

Column vector: 
 .. 
 . 


am1
• A row matrix or row vector is a 1 × n matrix.
Row vector: [b11 b12 · · · b1n ]
• It is often useful to think of members of Rn as either row vectors or column
vectors in different contexts.
Note 8 : MATRIX ALGEBRA
Equality of Matrices
Two matrices A and B are equal if they have the same order and all the
corresponding elements are equal
13
Note 8 : MATRIX ALGEBRA
Equality of Matrices
Two matrices A and B are equal if they have the same order and all the
corresponding elements are equal
i.e. A = [aij ]m×n and B = [bij ]m×n for some m and n and aij = bij for every i
and j .
14
Note 8 : MATRIX ALGEBRA
Addition of Matrices
• The sum A + B of two matrices A and B is defined only when
A and B have the same order.
• The sum is obtained by adding corresponding elements.
• Thus A+B = [aij + bij ]m×n if A = [aij ]m×n and B = [bij ]m×n .
15
Note 8 : MATRIX ALGEBRA
Addition of Matrices
• The sum A + B of two matrices A and B is defined only when
A and B have the same order.
• The sum is obtained by adding corresponding elements.
• Thus A+B = [aij + bij ]m×n if A = [aij ]m×n and B = [bij ]m×n .
Scalar Multiplication
• In scalar multiplication every element in the matrix is multiplied by the
scalar.
• Thus λ A = [λ aij ]m×n if A = [aij ]m×n and λ ∈ R.
16
Note 8 : MATRIX ALGEBRA
17
The Zero Matrix
• The zero matrix of order m × n is the m × n matrix whose elements are all 0.
• The zero matrix of order m × n is denoted by O or Om×n .
Note 8 : MATRIX ALGEBRA
18
The Zero Matrix
• The zero matrix of order m × n is the m × n matrix whose elements are all 0.
• The zero matrix of order m × n is denoted by O or Om×n .
The Negative of Matrix A
• The negative of matrix A = [aij ]m×n is the matrix
−A = [−aij ]m×n .
Note 8 : MATRIX ALGEBRA
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
19
Note 8 : MATRIX ALGEBRA
20
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
(1) A + (B + C ) = (A + B ) + C
[associativity of addition]
Note 8 : MATRIX ALGEBRA
21
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
(1) A + (B + C ) = (A + B ) + C
(2) A + O = A = O + A
[associativity of addition]
[additive identity]
Note 8 : MATRIX ALGEBRA
22
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
(1) A + (B + C ) = (A + B ) + C
(2) A + O = A = O + A
(3) A + (−A) = O = (−A) + A
[associativity of addition]
[additive identity]
[additive inverse]
Note 8 : MATRIX ALGEBRA
23
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
(1) A + (B + C ) = (A + B ) + C
(2) A + O = A = O + A
(3) A + (−A) = O = (−A) + A
(4) A + B = B + A
[associativity of addition]
[additive identity]
[additive inverse]
[commutativity of addition]
Note 8 : MATRIX ALGEBRA
24
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
(1) A + (B + C ) = (A + B ) + C
(2) A + O = A = O + A
(3) A + (−A) = O = (−A) + A
(4) A + B = B + A
(5) (λ + µ)A = λ A + µ A
[associativity of addition]
[additive identity]
[additive inverse]
[commutativity of addition]
[distributivity]
Note 8 : MATRIX ALGEBRA
25
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
(1) A + (B + C ) = (A + B ) + C
(2) A + O = A = O + A
(3) A + (−A) = O = (−A) + A
(4) A + B = B + A
[associativity of addition]
[additive identity]
[additive inverse]
[commutativity of addition]
(5) (λ + µ)A = λ A + µ A
[distributivity]
(6) λ(A + B ) = λ A + λ B
[distributivity]
Note 8 : MATRIX ALGEBRA
26
Properties of Addition and Scalar Multiplication
For any m × n matrices A and B and any λ, µ ∈ R:
(1) A + (B + C ) = (A + B ) + C
(2) A + O = A = O + A
(3) A + (−A) = O = (−A) + A
(4) A + B = B + A
[associativity of addition]
[additive identity]
[additive inverse]
[commutativity of addition]
(5) (λ + µ)A = λ A + µ A
[distributivity]
(6) λ(A + B ) = λ A + λ B
[distributivity]
(7) λ(µ A) = (λ µ)A
[associativity]
Note 8 : MATRIX ALGEBRA
Multiplying Matrices
The product of two matrices is defined only when the number of columns in the
first is the same as the number of rows in the second.
27
Note 8 : MATRIX ALGEBRA
Multiplying Matrices
The product of two matrices is defined only when the number of columns in the
first is the same as the number of rows in the second.
The product AB = [cij ]m×n of A = [aij ]m×p and B = [bij ]p×n is the m × n
matrix where
• The ij th element of AB is the scalar product of the
i th row vector of A with the j th column vector of B .
28
Note 8 : MATRIX ALGEBRA
Multiplying Matrices
The product of two matrices is defined only when the number of columns in the
first is the same as the number of rows in the second.
The product AB = [cij ]m×n of A = [aij ]m×p and B = [bij ]p×n is the m × n
matrix where
• The ij th element of AB is the scalar product of the
i th row vector of A with the j th column vector of B .
Pp
• i.e. cij = r =1 air brj = (ai1 , ai2 , . . . , aip ).(b1j , b2j , . . . , bpj ).
29
Note 8 : MATRIX ALGEBRA
30
Multiplying Matrices
The product of two matrices is defined only when the number of columns in the
first is the same as the number of rows in the second.
The product AB = [cij ]m×n of A = [aij ]m×p and B = [bij ]p×n is the m × n
matrix where
• The ij th element of AB is the scalar product of the
i th row vector of A with the j th column vector of B .
Pp
• i.e. cij = r =1 air brj = (ai1 , ai2 , . . . , aip ).(b1j , b2j , . . . , bpj ).

a11 · · · · · · a1p
.
.
.
.
.
.


 ai1

 ..
.
am1

b11 · · ·
  ..
 .

ai2 · · · aip 
  ..
.  .
.
.
bp1 · · ·
· · · · · · amp
b1j
···
b2j
.
.
.
bpj
···
b1n
.
.
.
.
.
.
bpn







c11 · · · · · · · · · c1n
.
 ..
.
.
 .

=
cij
 .
.
 .
.
.
.
cm1 · · · · · · · · · cmn






Note 8 : MATRIX ALGEBRA
31
Examples
"
(i)


1 2 0 −3
2 0 −1 

 −5 0 1 1 
−3 1 4
3 0 2 −1
#
Note 8 : MATRIX ALGEBRA
32
Examples
"
(i)


#
"
1 2 0 −3
2 0 −1 
−1 4 −2 −5

 −5 0 1 1  =
−3 1 4
4 −6 9 6
3 0 2 −1
#
Note 8 : MATRIX ALGEBRA
33
Examples


#
"
1 2 0 −3
2 0 −1 
−1 4 −2 −5

(i)
 −5 0 1 1  =
−3 1 4
4 −6 9 6
3 0 2 −1


h
i −1


(ii) 2 1 −3  −2 
0
"
#
Note 8 : MATRIX ALGEBRA
34
Examples


#
"
1 2 0 −3
2 0 −1 
−1 4 −2 −5

(i)
 −5 0 1 1  =
−3 1 4
4 −6 9 6
3 0 2 −1


h
i −1
h
i


(ii) 2 1 −3  −2  = −4
0
"
#
Note 8 : MATRIX ALGEBRA
35
Examples


#
"
1 2 0 −3
2 0 −1 
−1 4 −2 −5

(i)
 −5 0 1 1  =
−3 1 4
4 −6 9 6
3 0 2 −1


h
i −1
h
i


(ii) 2 1 −3  −2  = −4
0


1 h
i


(iii)  −1  1 2 0 3
0
"
#
Note 8 : MATRIX ALGEBRA
36
Examples


#
"
1 2 0 −3
2 0 −1 
−1 4 −2 −5

(i)
 −5 0 1 1  =
−3 1 4
4 −6 9 6
3 0 2 −1


h
i −1
h
i


(ii) 2 1 −3  −2  = −4
0




1 h
1 20 3
i




(iii)  −1  1 2 0 3 =  −1 −2 0 −3 
0
0 00 0
"
#
Note 8 : MATRIX ALGEBRA
37
Examples
(i)
(ii)
(iii)
(iv)


#
"
1 2 0 −3
2 0 −1 
−1 4 −2 −5

 −5 0 1 1  =
−3 1 4
4 −6 9 6
3 0 2 −1


h
i −1
h
i


2 1 −3  −2  = −4
0




1 h
1 20 3
i




 −1  1 2 0 3 =  −1 −2 0 −3 
0
0 00 0
"
#" #
a11 a12
x1
a21 a22
x2
"
#
Note 8 : MATRIX ALGEBRA
38
Examples
(i)
(ii)
(iii)
(iv)


#
"
1 2 0 −3
2 0 −1 
−1 4 −2 −5

 −5 0 1 1  =
−3 1 4
4 −6 9 6
3 0 2 −1


h
i −1
h
i


2 1 −3  −2  = −4
0




1 h
1 20 3
i




 −1  1 2 0 3 =  −1 −2 0 −3 
0
0 00 0
"
#" # "
#
a11 a12
x1
a11 x1 + a12 x2
=
.
a21 a22
x2
a21 x1 + a22 x2
"
#
Note 8 : MATRIX ALGEBRA
Square Matrices
• A square matrix is one with the same number of rows as columns
i.e. of the form A = [aij ]n×n for some n.
39
Note 8 : MATRIX ALGEBRA
Square Matrices
• A square matrix is one with the same number of rows as columns
i.e. of the form A = [aij ]n×n for some n.
– We call A = [aij ]n×n a square matrix of order n.
40
Note 8 : MATRIX ALGEBRA
Square Matrices
• A square matrix is one with the same number of rows as columns
i.e. of the form A = [aij ]n×n for some n.
– We call A = [aij ]n×n a square matrix of order n.
• Products AB and BA are both defined if A and B are square matrices of
order n.
41
Note 8 : MATRIX ALGEBRA
Square Matrices
• A square matrix is one with the same number of rows as columns
i.e. of the form A = [aij ]n×n for some n.
– We call A = [aij ]n×n a square matrix of order n.
• Products AB and BA are both defined if A and B are square matrices of
order n.
• Matrix multiplication is not commutative
– i.e. AB and BA are not necessarily equal.
42
Note 8 : MATRIX ALGEBRA
43
Square Matrices
• A square matrix is one with the same number of rows as columns
i.e. of the form A = [aij ]n×n for some n.
– We call A = [aij ]n×n a square matrix of order n.
• Products AB and BA are both defined if A and B are square matrices of
order n.
• Matrix multiplication is not commutative
– i.e. AB and BA are not necessarily equal.
"
#"
# "
#
–
01
00
10
e.g.
=
but
00
10
00
"
00
10
#"
#
"
#
01
00
=
.
00
01
Note 8 : MATRIX ALGEBRA
44
Square Matrices
• A square matrix is one with the same number of rows as columns
i.e. of the form A = [aij ]n×n for some n.
– We call A = [aij ]n×n a square matrix of order n.
• Products AB and BA are both defined if A and B are square matrices of
order n.
• Matrix multiplication is not commutative
– i.e. AB and BA are not necessarily equal.
"
#"
# "
#
–
01
00
10
e.g.
=
but
00
10
00
"
00
10
#"
#
"
#
01
00
=
.
00
01
• If A is a square matrix then the products AA, AAA, AAAA, . . . are all defined
and are denoted by A2 , A3 , A4 , . . ..
Note 8 : MATRIX ALGEBRA
Diagonal Matrices
• In a square matrix A = [aij ]n×n , the diagonal elements are those of the form
aii for some i .
45
Note 8 : MATRIX ALGEBRA
Diagonal Matrices
• In a square matrix A = [aij ]n×n , the diagonal elements are those of the form
aii for some i .
• A diagonal matrix is a square matrix whose non-diagonal elements are all
zero.
46
Note 8 : MATRIX ALGEBRA
47
Diagonal Matrices
• In a square matrix A = [aij ]n×n , the diagonal elements are those of the form
aii for some i .
• A diagonal matrix is a square matrix whose
zero.


a11 0 0




e.g.
 0 a22 0 
0 0 a33
non-diagonal elements are all
other notations:
diag[a11 , a22 , a33 ].
diag[aii ]
Note 8 : MATRIX ALGEBRA
Identity Matrices.
• The identity matrix of order n is the n × n diagonal matrix whose diagonal
elements are all 1.
48
Note 8 : MATRIX ALGEBRA
49
Identity Matrices.
• The identity matrix of order n is the n × n diagonal matrix whose diagonal
elements are all 1.
• It is denoted by I or In .
–

e.g. I1 = [1],
I2 = 
10
01

,

100




I3 =  0 1 0 
.
001
Note 8 : MATRIX ALGEBRA
50
Identity Matrices.
• The identity matrix of order n is the n × n diagonal matrix whose diagonal
elements are all 1.
• It is denoted by I or In .
–

e.g. I1 = [1],
I2 = 
10
01

,

100




I3 =  0 1 0 
.
001
• If A is a square matrix then A0 denotes the identity matrix I of the same
order.
Note 8 : MATRIX ALGEBRA
51
Identity Matrices.
• The identity matrix of order n is the n × n diagonal matrix whose diagonal
elements are all 1.
• It is denoted by I or In .
–

e.g. I1 = [1],
I2 = 
10
01


,
100




I3 =  0 1 0 
.
001
• If A is a square matrix then A0 denotes the identity matrix I of the same
order.
The functions exp A, sin A and cos A can also be defined.
Note 8 : MATRIX ALGEBRA
52
Properties of Matrix Multiplication
The following identities hold whenever the products on the left-hand side (or
right-hand side) exist:
(1)
(AB )C = A(BC )
associativity of ×
Note 8 : MATRIX ALGEBRA
53
Properties of Matrix Multiplication
The following identities hold whenever the products on the left-hand side (or
right-hand side) exist:
(1)
(AB )C = A(BC )
(2a) A(B + C ) = AB + AC
(2b) (A + B )C = AC + BC
associativity of ×
distributivity of × over +
distributivity of + over ×
Note 8 : MATRIX ALGEBRA
54
Properties of Matrix Multiplication
The following identities hold whenever the products on the left-hand side (or
right-hand side) exist:
(1)
(AB )C = A(BC )
(2a) A(B + C ) = AB + AC
(2b) (A + B )C = AC + BC
(3)
IA = A = AI
associativity of ×
distributivity of × over +
distributivity of + over ×
multiplicative identity
Note 8 : MATRIX ALGEBRA
55
Properties of Matrix Multiplication
The following identities hold whenever the products on the left-hand side (or
right-hand side) exist:
(1)
(AB )C = A(BC )
(2a) A(B + C ) = AB + AC
(2b) (A + B )C = AC + BC
(3)
IA = A = AI
(4)
OA = O = AO
associativity of ×
distributivity of × over +
distributivity of + over ×
multiplicative identity
additive identity
Note 8 : MATRIX ALGEBRA
56
Properties of Matrix Multiplication
The following identities hold whenever the products on the left-hand side (or
right-hand side) exist:
(1)
(AB )C = A(BC )
(2a) A(B + C ) = AB + AC
(2b) (A + B )C = AC + BC
(3)
IA = A = AI
(4)
OA = O = AO
(5a) Ap Aq = Ap+q = Aq Ap
(5b) (Ap )q = Apq
associativity of ×
distributivity of × over +
distributivity of + over ×
multiplicative identity
additive identity
indices
indices
Note 8 : MATRIX ALGEBRA
Transpose
• The transpose AT of matrix A is obtained by interchanging the rows and
columns.
57
Note 8 : MATRIX ALGEBRA
Transpose
• The transpose AT of matrix A is obtained by interchanging the rows and
columns.
• Thus if A = [aij ]m×n then AT = [a 0ij ]n×m where a 0ij = aji .
58
Note 8 : MATRIX ALGEBRA
59
Transpose
• The transpose AT of matrix A is obtained by interchanging the rows and
columns.
• Thus if A = [aij ]m×n then AT = [a 0ij ]n×m where a 0ij = aji .
Examples

352


234

A=
, B = 1 0 1
, C = [a1 a2 . . . an ]

105
216
"
If

#
Note 8 : MATRIX ALGEBRA
60
Transpose
• The transpose AT of matrix A is obtained by interchanging the rows and
columns.
• Thus if A = [aij ]m×n then AT = [a 0ij ]n×m where a 0ij = aji .
Examples

352


234

A=
,
B = 1 0 1
, C = [a1 a2 . . . an ]

105
216
 




a1
 
21
312




 a2 
T
T
T





A = 3 0, B = 5 0 1,
C =
 ..  .
 . 
45
216
an
"
If
then

#
Note 8 : MATRIX ALGEBRA
61
Properties of Transposes
(1) (AT )T = A
Note 8 : MATRIX ALGEBRA
62
Properties of Transposes
(1) (AT )T = A
(2) (A + B )T = AT + B T
when A + B exists
Note 8 : MATRIX ALGEBRA
63
Properties of Transposes
(1) (AT )T = A
(2) (A + B )T = AT + B T
when A + B exists
(3) (λ A)T = λ AT
for any λ ∈ R
Note 8 : MATRIX ALGEBRA
64
Properties of Transposes
(1) (AT )T = A
(2) (A + B )T = AT + B T
when A + B exists
(3) (λ A)T = λ AT
for any λ ∈ R
(4) (AB )T = B T AT
when AB exists.
Note 8 : MATRIX ALGEBRA
Inverse Matrix
• Only square matrices have inverses.
65
Note 8 : MATRIX ALGEBRA
Inverse Matrix
• Only square matrices have inverses.
• Matrix B is the inverse of matrix A if A and B are square matrices of the
same order and if
AB = I = BA.
66
Note 8 : MATRIX ALGEBRA
Inverse Matrix
• Only square matrices have inverses.
• Matrix B is the inverse of matrix A if A and B are square matrices of the
same order and if
AB = I = BA.
• If A has an inverse, then that inverse is unique.
67
Note 8 : MATRIX ALGEBRA
Inverse Matrix
• Only square matrices have inverses.
• Matrix B is the inverse of matrix A if A and B are square matrices of the
same order and if
AB = I = BA.
• If A has an inverse, then that inverse is unique.
• If A is the inverse of B then B is the inverse of A.
68
Note 8 : MATRIX ALGEBRA
Inverse Matrix
• Only square matrices have inverses.
• Matrix B is the inverse of matrix A if A and B are square matrices of the
same order and if
AB = I = BA.
• If A has an inverse, then that inverse is unique.
• If A is the inverse of B then B is the inverse of A.
• The inverse of matrix A is denoted by A−1 .
69
Note 8 : MATRIX ALGEBRA
Inverse Matrix
• Only square matrices have inverses.
• Matrix B is the inverse of matrix A if A and B are square matrices of the
same order and if
AB = I = BA.
• If A has an inverse, then that inverse is unique.
• If A is the inverse of B then B is the inverse of A.
• The inverse of matrix A is denoted by A−1 .
More about how to calculate A−1 in a minute!
70
Note 8 : MATRIX ALGEBRA
71
The Determinant of a 2x2 Matrix

• The determinant of a 2 × 2 matrix A = 
a b
cd

 is defined to be the number
ad − bc.
a b .
• The determinant is denoted by det(A), | A | or c
d
Note 8 : MATRIX ALGEBRA
Examples
"
(1) If A = 2 −3
1 2
#
then det(A) = (2 × 2) − ((−3) × 1) = 4 + 3 = 7.
72
Note 8 : MATRIX ALGEBRA
Examples
"
#
(1) If A = 2 −3 then det(A) = (2 × 2) − ((−3) × 1) = 4 + 3 = 7.
1 2
1 0
(2) = (1 × −1) − (0 × 0) = −1 + 0 = −1.
0 −1 73
Note 8 : MATRIX ALGEBRA
Examples
"
#
(1) If A = 2 −3 then det(A) = (2 × 2) − ((−3) × 1) = 4 + 3 = 7.
1 2
1 0
(2) = (1 × −1) − (0 × 0) = −1 + 0 = −1.
0 −1 "
#
"
#
"
#
(3) If A = a b and B = x y then AB = ax + bz ay + bt , so
cd
z t
cx + dz cy + dt
det(AB ) = (ax + bz )(cy + dt) − (ay + bt)(cx + dz )
= axcy + axdt + bzcy + bzdt − aycx − aydz − btcx − btdz
= ad (xt − yz ) − bc(xt − yz ) = (ad − bc)(xt − yz )
= det(A) det(B )
74
Note 8 : MATRIX ALGEBRA
Examples
"
#
(1) If A = 2 −3 then det(A) = (2 × 2) − ((−3) × 1) = 4 + 3 = 7.
1 2
1 0
(2) = (1 × −1) − (0 × 0) = −1 + 0 = −1.
0 −1 "
#
"
#
"
#
(3) If A = a b and B = x y then AB = ax + bz ay + bt , so
cd
z t
cx + dz cy + dt
det(AB ) = (ax + bz )(cy + dt) − (ay + bt)(cx + dz )
= axcy + axdt + bzcy + bzdt − aycx − aydz − btcx − btdz
= ad (xt − yz ) − bc(xt − yz ) = (ad − bc)(xt − yz )
= det(A) det(B )
(4) Similarly, det(A1 A2 . . . An ) = det(A1 ) det(A2 ) . . . det(An )
for any matrices A1 , A2 , . . . An s.t. A1 A2 . . . An exists.
75
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
76
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
Answer: No!
77
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
Answer: No!
Theorem Every matrix is invertible iff its determinant is nonzero.
78
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
Answer: No!
Theorem Every matrix is invertible iff its determinant is nonzero.
Proof:
• Suppose first that matrix A is invertible.
79
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
Answer: No!
Theorem Every matrix is invertible iff its determinant is nonzero.
Proof:
• Suppose first that matrix A is invertible.
– We know that det(A) det(A−1 ) = det(AA−1 ) = det(I ) = 1.
80
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
Answer: No!
Theorem Every matrix is invertible iff its determinant is nonzero.
Proof:
• Suppose first that matrix A is invertible.
– We know that det(A) det(A−1 ) = det(AA−1 ) = det(I ) = 1.
– This means that det(A) 6= 0.
81
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
Answer: No!
Theorem Every matrix is invertible iff its determinant is nonzero.
Proof:
• Suppose first that matrix A is invertible.
– We know that det(A) det(A−1 ) = det(AA−1 ) = det(I ) = 1.
– This means that det(A) 6= 0.
• Suppose now that matrix A had a nonzero determinant.
82
Note 8 : MATRIX ALGEBRA
Question: Do all square matrices have inverses?
Answer: No!
Theorem Every matrix is invertible iff its determinant is nonzero.
Proof:
• Suppose first that matrix A is invertible.
– We know that det(A) det(A−1 ) = det(AA−1 ) = det(I ) = 1.
– This means that det(A) 6= 0.
• Suppose now that matrix A had a nonzero determinant.
– We will discuss this result in general in Note 10.
83
Note 8 : MATRIX ALGEBRA
The Inverse of a 2x2 Matrix
A 2 × 2 matrix is invertible iff its determinant is nonzero.
"
#
"
#
If A = a b and det(A) 6= 0 then A−1 = det1 A d −b
cd
−c a
84
Note 8 : MATRIX ALGEBRA
Examples
Calculate, where possible, the inverses of the following 2x2 matrices:
"
#
(1) A = 1 1
02
"
#
(1) B = 1 4
12
"
#
(1) C = 3 −1
1 3
"
#
(1) D = −1 4
2 −8
85
Related documents