Professional Documents
Culture Documents
CH 2
CH 2
Matrices
2.1 Operations with Matrices
2.2 Properties of Matrix Operations
2.3 The Inverse of a Matrix
2.4 Elementary Matrices
Elementary Linear Algebra
Matrix:
a11
a
21
A [aij ] a31
am1
a12
a22
a32
am 2
aij
a13
a 23
a33
am 3
a1n
a2 n
M mn
a3n
amn mn
row: m
column: n
size: mn
Elementary Linear Algebra: Section 2.1, pp.46-47
2/61
ai 2 ain
cj
c
mj
Square matrix:
row matrix
column matrix
m=n
3/61
Diagonal matrix:
d1 0
0 d
2
A diag (d1 , d 2 , , d n )
0 0
0
0
M nn
d n
Trace:
If A [aij ]nn
4/61
Ex:
1 2 3
r1
A
4 5 6
r2
r1 1 2 3 , r2 4 5 6
1 2 3
A
4
5
6
c1 c2
c3
1
2
3
c1 , c2 , c3
4
5
6
5/61
Equal matrix:
If A [aij ]mn , B [bij ]mn
Then A B if and only if aij bij 1 i m, 1 j n
Ex 1: (Equal matrix)
1 2
A
3
4
a b
B
c
d
If A B
Then a 1, b 2, c 3, d 4
6/61
Matrix addition:
If A [aij ]mn , B [bij ]mn
Then A B [aij ]mn [bij ]mn [aij bij ]mn
Ex 2: (Matrix addition)
1 2 1 3 1 1 2 3 0 5
0 1 1 2 0 1 1 2 1 3
1 1
11
3 3 3 3
2 2
2 2
0
0
0
7/61
Scalar multiplication:
If A [aij ]mn , c : scalar
Then cA [caij ]mn
Matrix subtraction:
A B A (1) B
Ex 3: (Scalar multiplication and matrix subtraction)
1 2 4
3 0 1
2 1 2
0 0
2
B 1 4 3
3 2
1
8/61
Sol:
(a)
3A 3
(b)
1 2 4 31 3 2
3 4 3 6 12
3 0 1 3 3 3 0 3 1 9 0 3
2 1 2 3 2 31
3 2 6 3
6
0
0
0 0
2
2
4 3
B 1 1 4 3 1
1 3 2
3 2
1
(c)
3A B
1 6 12
3 6 12 2
0 0
9 0 3 1 4 3 10 4 6
4
6 3
6 1
3 2 7 0
9/61
Matrix multiplication:
If A [aij ]mn , B [bij ]n p
Then AB [aij ]mn [bij ]n p [cij ]m p
Size of AB
n
1j
b
21
2
j
2
n
ai1 ai 2 ain
ci1 ci 2 cij cin
an1 an 2 ann
10/61
Ex 4: (Find AB)
3
1
3
B
A 4 2
4
0
5
Sol:
(1)(3) (3)(4)
AB (4)(3) (2)(4)
(5)(3) (0)(4)
2
1
(1)(2) (3)(1)
(4)(2) (2)(1)
(5)(2) (0)(1)
9 1
4 6
15 10
Elementary Linear Algebra: Section 2.1, p.50
11/61
am1 x1 am 2 x2 amn xn bm
m linear equations
a11
a
21
am1
a12 a1n x1 b1
a22 a2 n x2 b2
am 2 amn xn bm
m n n 1
m 1
12/61
Partitioned matrices:
a11
A a21
a31
a12
a22
a32
a13
a23
a33
a14
A11
a24
A21
a34
a11
A a21
a31
a12
a22
a32
a13
a23
a33
a14 r1
a24 r2
a34 r3
a11
A a21
a31
a12
a22
a32
a13
a23
a33
a14
a24 c1 c2
a34
submatrix
A12
A22
c3
c4
13/61
row vector:
column vector:
diagonal matrix:
trace:
equality of matrices:
matrix addition:
scalar multiplication:
matrix multiplication:
partitioned matrix:
14/61
Zero matrix:
0 mn
15/61
c, d : scalar
16/61
(2) A ( A) 0 mn
(3) cA 0 mn c 0 or A 0 mn
Notes:
(1) 0mn: the additive identity for the set of all mn matrices
(2) A: the additive inverse of A
17/61
Transpose of a matrix:
a11
a
If A 21
a
m1
a12 a1n
a22 a2 n
M mn
am 2 amn
a21 am1
a22 am 2
a
1n
a2 n amn
Then AT
a11
a
12
M nm
18/61
(a) A
(b) A 4 5 6
)
8
7 8 9
1 1
Sol: (a)
2
A
AT 2 8
8
(b)
1 2 3
1 4 7
A 4 5 6 AT 2 5 8
7 8 9
3 6 9
(c
0
1
)
0 2 1
T
A 2 4
A
1
4
1 1
19/61
Properties of transposes:
(1) ( AT )T A
( 2) ( A B )T AT B T
(3) (cA)T c( AT )
( 4) ( AB )T B T AT
20/61
Symmetric matrix:
A square matrix A is symmetric if A = AT
Skew-symmetric matrix:
A square matrix A is skew-symmetric if AT = A
Ex:
1 2 3
If A a 4 5 is symmetric, find a, b, c?
b c 6
Sol:
1 2 3
1 a b
T
A
A
A a 4 5 AT 2 4 c
a 2, b 3, c 5
b c 6
3 5 6
Elementary Linear Algebra: Section 2.2, p.68 & p.72
21/61
Ex:
0 1 2
If A a 0 3 is a skew-symmetric, find a, b, c?
b c 0
Sol:
0 a b
0 1 2
A a 0 3
AT 1 0 c
b c 0
2 3 0
A AT a 1, b 2, c 3
( AAT )T ( AT )T AT AAT
AAT is symmetric
22/61
Real number:
ab = ba (Commutative law for multiplication)
Matrix:
AB BA
mn n p
Three
situations:
(1) If m p, then AB is defined, BA is undefined.
(2) If m p, m n, then AB M mm , BA M nn (Sizes are not the
(3) If m p n, then AB M mm , BA M mm
same)
23/61
Ex 4:
Sow that AB and BA are not equal for the matrices.
1 3
2 1
B
A
and
0
2
2
Sol:
1 3
AB
5
2 1 2
0 2 4 4
7
2 1 1 3 0
BA
0
2
2
1
4
Note:
AB BA
24/61
Real number:
ac bc, c 0
(Cancellation law)
ab
Matrix:
AC BC
C0
25/61
0
1
2
3
1
2
Sol:
1
AC
0
2
BC
2
3
1
4
3
1 2 2 4
1
2 1 2
1 2 2 4
1 2 1 2
So
AC BC
But
A B
26/61
zero matrix:
identity matrix:
transpose matrix:
symmetric matrix:
skew-symmetric matrix:
27/61
Inverse matrix:
Consider A M nn
If there exists a matrix B M nn such that AB BA I n ,
Then (1) A is invertible (or nonsingular)
(2) B is the inverse of A
Note:
A matrix that does not have an inverse is called
noninvertible (or singular).
28/61
AB I
C ( AB) CI
(CA) B C
IB C
BC
Notes:
(1) The inverse of A is denoted by A1
(2) AA1 A1 A I
Elementary Linear Algebra: Section 2.3, pp.73-74
29/61
1 3
Sol:
AX I
4 x11
1 3 x
21
x11 4 x21
x 3x
11
21
x12 1 0
x22 0 1
x12 4 x22 1 0
x12 3x22 0 1
30/61
x11 4 x21 1
x11 3 x21 0
(1)
x12 4 x22 0
x12 3 x22 1
(2)
1 4 1 r 12(1) , r21( 4 ) 1 0 3
1 3 0
0 1 1
(1)
x11 3, x21 1
1 4 0 r 12(1) , r21( 4 ) 1 0 4 x 4, x 1
12
22
1 3 1
0 1 1
(2)
Thus
x11
X A
x21
1
x12 3 4
-1
(
AX
AA
)
x22 1
1
31/61
Note:
4 1 0
1
1 3 0 1
A
I
1 0 3 4
r (1) ,r ( 4 )
12
21
0
1
1
1
I
A1
Gauss JordanElimination
32/61
Sol:
1 1 0 1 0 0
A I 1 0 1 0 1 0
6 2 3 0 0 1
1 1 0 1 0 0
0 1 1 1 1 0
6 2 3 0 0 1
r12( 1 )
1 1 0 1 0 0
0 1 1 1 1 0
0 0 1 2 4 1
(4)
r23
1 1 0 1 0 0
0 1 1 1 1 0
0 4 3 6 0 1
r13( 6 )
1 1 0 1 0 0
0 1 1 1 1 0
0 0 1 2 4 1
r3( 1)
33/61
1 1 0 1 0 0
0 1 0 3 3 1
0 0 1 2 4 1
(1 )
r32
1 0 0 2 3 1
0 1 0 3 3 1
0 0 1 1 4 1
(1 )
r21
[ I A 1 ]
Check:
AA1 A1 A I
34/61
(k 0)
k factors
(3) Ar A s Ar s
r , s : integers
( Ar ) s Ars
d1 0
0 d
2
( 4) D
0 0
0
d1k
0
0
Dk
d n
0
0 0
k
d2 0
k
0 dn
35/61
(
A
)
A
k factors
1 1
(3) cA is invertible and (cA) A , c 0
c
1
36/61
Pf:
( AB)( B 1 A1 ) A( BB 1 ) A1 A( I ) A1 ( AI ) A1 AA1 I
( B 1 A1 )( AB) B 1 ( A1 A) B B 1 ( I ) B B 1 ( IB) B 1 B I
If AB is invertible, then its inverse is unique.
So ( AB ) 1 B 1 A1
Note:
37/61
AC BC
( AC )C 1 ( BC )C 1
(C is invertible, so C -1 exists)
A(CC 1 ) B(CC 1 )
AI BI
AB
Note:
If C is not invertible, then cancellation is not valid.
Elementary Linear Algebra: Section 2.3, p.82
38/61
Pf:
Ax b
A1 Ax A1b
( A is nonsingular)
Ix A1b
x A1b
39/61
Note:
For square systems (those having the same number of equations
as variables), Theorem 2.11 can be used to determine whether the
system has a unique solution.
Note:
Ax b
(A is an invertible matrix)
| b A1 A | A1b I | A1b
A 1
40/61
inverse matrix:
invertible:
nonsingular:
singular:
power:
41/61
Note:
Only do a single elementary row operation.
42/61
(a ) 0 3 0
(b)
(c) 0 1 0
0
1
0
0 0 1
0 0 0
Yes (r2(3) ( I 3 ))
1 0 0
(d ) 0 0 1
0 1 0
Yes (r23 ( I 3 ))
No (not square)
No (Row multiplication
must be by a nonzero constant)
(e) 1 0
2 1
1 0 0
( f ) 0 2 0
0 0 1
No (Use two elementary
row operations)
Yes (r12(2) ( I 2 ))
43/61
Notes:
r(I ) E
r ( A) EA
44/61
(b) 0
0
0
1
2
0
0 1 0 4
1 1 0 4
1
1
1
( )
( )
0 0 2
6 4 0 1
3 2 (r2 2 ( A) R2 2 A)
3
1 0 1
3
1
1 0 1
1 0 0
(c) 2 1 0
0 0 1
1
0 1 1
0 1
2 2
3 0 2
1 (r12( 2) ( A) R12( 5) A)
0
4 5 0
4 5
45/61
Sol:
1 3 5
0
A 1 3 0 2
2 6 2 0
0 1 0
E1 r12 ( I 3 ) 1 0 0
0 0 1
1 0 0
1
( )
E3 r3 2 (I 3 ) 0 1 0
0 0 12
E2 r13( 2 ) ( I 3 )
1 0 0
0 1 0
2 0 1
46/61
0 1 0
A1 r12 ( A) E1 A 1 0 0
0 0 1
( 2 )
13
A2 r
0 1 3 5 1 3 0 2
1 3 0 2 0 1 3 5
2 6 2 0 2 6 2 0
1 0 0
( A1 ) E2 A1 0 1 0
2 0 1
1
( )
2
3
A3 r
1 3 0 2 1 3 0 2
0 1 3 5 0 1 3 5
2 6 2 0 0 0 2 4
1 0 0 1 3 0 2 1 3 0 2
( A2 ) E3 A2 0 1 0 0 1 3 5 0 1 3 5
1 0 0 2 4 0 0 1 2
0 0
2
row-echelon form
1
( )
2
3
B E3 E2 E1 A or B r
47/61
Row-equivalent:
Matrix B is row-equivalent to A if there exists a finite number
of elementary matrices such that
B Ek Ek 1 E2 E1 A
48/61
Notes:
(2) ( Ri( k ) ) 1 R
49/61
Ex:
Elementary Matrix
0 1 0
E1 1 0 0 R12
0 0 1
1 0 0
E2 0 1 0 R13( 2)
2 0 1
1
1 0 0
( )
E3 0 1 0 R3 2
0 0 12
Inverse Matrix
0 1 0
1
1
( R12 ) E1 1 0 0 R12
0 0 1
1 0 0
) E 0 1 0 R13( 2 ) (Elementary Matrix)
2 0 1
( 2 ) 1
13
(R
1
2
1 0 0
( 2)
) E 0 1 0 R3 (Elementary Matrix)
0 0 2
1
( )
2 1
3
(R
(Elementary Matrix)
1
3
50/61
Ex 4:
Find a sequence of elementary matrices whose product is
Sol:
1 2
A
3
8
1 2
1
r1( 1)
A
8
3
3
1
( )
( 2 )
1 2
1
r2 2
r21
0 1
0
2
1 2
r12( 3 )
8
0 2
0
I
1
( )
2
2
( 2 )
Therefore R21
R R12( 3) R1( 1) A I
52/61
1
( )
2 1
2
( 2 ) 1
Thus A ( R1( 1) ) 1 ( R12( 3) ) 1 ( R ) ( R21
)
( 2)
R1( 1) R12( 3) R2( 2 ) R21
1 0 1 0 1 0 1 2
3 1 0 2 0 1
0
1
Note:
If A is invertible
Then Ek E3 E2 E1 A I
A1 Ek E3 E2 E1
Ek E3 E2 E1[ AI ] [ I A1 ]
Elementary Linear Algebra: Section 2.4, p.92
53/61
54/61
LU-factorization:
If the nn matrix A can be written as the product of a
lower
triangular matrix L and an upper triangular matrix U, then
A=LU is an LU-factorization
of
A triangular matrix
L
is
a
lower
A LU
U is an upper triangular matrix
Note:
If a square matrix A can be row reduced to an upper triangular
matrix U using only the row operation of adding a multiple of
one row to another row below it, then it is easy to find an LUfactorization of A.
Ek E2 E1 A U
A E11 E21 Ek1U
A LU
55/61
Ex 5: (LU-factorization)
1 3 0
1
2
(a) A
(b) A 0
1 3
1 0
2 10 2
Sol: (a)
1
2
r12(-1)
A
1 2 U
1 0
0 2
R12( 1) A U
A ( R12( 1) ) 1U LU
( 1) 1
12
L (R
) R
(1)
12
1 0
1
1
56/61
(b)
1 3 0
1 3 0
1 3 0
(4)
r13( 2 )
r23
A 0
1 3 0
1 3 0 1 3 U
2 10 2
0 4 2
0 0 14
( 4 ) ( 2 )
R23
R13 A U
( 4 ) 1
A ( R13( 2 ) ) 1 ( R23
) U LU
( 4 ) 1
( 4 )
L ( R13( 2 ) ) 1 ( R23
) R13( 2) R23
1 0 0
0 1 0
2 0 1
1 0 0 1 0 0
0 1 0 0 1 0
0 4 1 2 4 1
57/61
Ax b
If A LU , then LUx b
Two steps:
(1) Write y = Ux and solve Ly = b for y
(2) Solve Ux = y for x
58/61
0 14
2 10 2 2 4 1 0
(1) Let y Ux, and solve Ly b
1 0 0 y1 5
0 1 0 y2 1
2 4 1 y3 20
y1 5
y2 1
y3 20 2 y1 4 y2
20 2(5) 4(1) 14
59/61
x3 1
x2 1 3 x3 1 (3)(1) 2
x1 5 3 x2 5 3(2) 1
60/61
row equivalent:
LU-factorization: LU
61/61