Download Lecture Note: ppt

Document related concepts
no text concepts found
Transcript
Chapter 2A


Matrices
2A.1 Definition, and Operations of Matrices: 1 Sums and
Scalar Products; 2 Matrix Multiplication
2A.2 Properties of Matrix Operations; Mechanics of Matrix
Multiplication

2A.3 The Inverse of a Matrix

2A.4 Elementary Matrices
2-1
2A.1 Operations with Matrices

Matrix:
 a11 a12 a13 L
a
 21 a22 a 23 L
A  [aij ]   a31 a32 a33 L

 M M M
 am1 am 2 am 3 L
(i, j)-th entry:
a ij
row: m
column: n
size: m×n
2-2
a1n 
a2 n 
a3 n 
 M m n

M

amn  mn

i-th row vector
ri  ai 1 ai 2 L

j-th column vector
 c1 j 
 
 c2 j 
cj   
M
 
 cmj 

row matrix
ain 
column matrix
Square matrix: m = n
2-3

Diagonal matrix:
 d1
0
A  diag(d1 , d 2 ,L , d n )  
M

0

0
K
d2 L
M O
0 L
Trace:
If A  [aij ]nn
Then Tr ( A)  a11  a22  L  ann
2-4
0
0 
 M nn
M

dn 

Ex:
1 2 3  r1 
A
 

4 5 6 r2 

r1  1 2 3, r2  4 5 6
1 2 3
A
 c1 c2

 4 5 6
c3 
1 
 2
 3
 c1   , c2   , c3   
 4
5 
6 
2-5

Equal matrix:
Let A  [aij ]mn , B  [bij ]mn
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
2-6

Matrix addition:
If A  [aij ]mn , B  [bij ]mn
Then A  B  [aij ]mn  [bij ]mn  [aij  bij ]mn

Scalar multiplication:
If A  [aij ]mn , c : scalar
Then cA  [caij ]mn
2-7


Matrix subtraction:
A  B  A  (1) B
Example: Matrix addition
 1 2  1 3  1  1 2  3  0 5
 0 1   1 2   0  1 1  2   1 3

 
 
 

 1  1
  3   3 
   
 2  2
 1  1  0 
  3  3   0 

  
 2  2 0
2-8

Matrix multiplication:
The i, j entry of the matrix product is the dot product of
row i of the left matrix with column j of the right one.
2-9

Matrix multiplication:
 a11 a12 L
 M M

 ai 1 ai 2 L

 M M
 an1 an 2 L

a1n 
M
ain 

M
ann 
 b11

 b21
 M

 bn1
L
b1 j
L
M b2 j L
M M
L
bnj
L
b1n  

b2 n  


 ci 1 ci 2 L
M
 
bnn  
Notes: (1) A+B = B+A, (2) AB  BA
2 - 10
cij L



cin 



Matrix form of a system of linear equations:
 a11 x1  a12 x2  L  a1n xn  b1
 a x  a x L  a x  b
 21 1
22 2
2n n
2

M

 am1 x1  am 2 x2  L  amn xn  bm
m linear equations

 a11 a12 L a1n   x1   b1 
a
 x  b 
a
L
a
22
2n   2 
 21
 2
 M M M M  M  M

   
 am1 am 2 L amn   xn   bm 
=
=
=
A
x
b
2 - 11
Single matrix equation
Axb
m  n n1
m 1

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 
2 - 12
submatrix
A12 
A22 
c3
c4 

a linear combination of the column vectors of matrix A:
 a11 a12 L a1n 
a

a
L
a
22
2n 
A   21
 c1
 M M M M


a
a
L
a
m2
mn 
 m1
c2 L
 x1 
x 
x   2
 M
 
 xn 
cn 
 a11 x1  a12 x2  L  a1n xn 
 a11 
 a21 
 a1n 
 a x  a x L  a x 
a 
a 
a 
22 2
2n n 
 Ax   21 1
 x1  21   x2  22   L  xn  2 n 


 M
 M
 M
M


 


 
a
x

a
x

L

a
x
a
a
m2 2
mn n  m1
 m1 1
 m1 
 m2 
 amn 
=
c2
=
=
c1
cn
linear combination of
column vectors of A
2 - 13
Keywords in Section 2.1:

row vector: 列向量

column vector: 行向量

diagonal matrix: 對角矩陣

trace: 跡數

equality of matrices: 相等矩陣

matrix addition: 矩陣相加

scalar multiplication: 純量積

matrix multiplication: 矩陣相乘

partitioned matrix: 分割矩陣
2 - 14
2A.2 Properties of Matrix Operations

Three basic matrix operators:
(1) matrix addition
(2) scalar multiplication
(3) matrix multiplication

Zero matrix:

Identity matrix of order n:
0 mn
In
2 - 15

Properties of matrix addition and scalar multiplication:
If A, B, C  M mn ,
c, d : scalar
Then (1) A+B = B + A
Commutative law for addition
(2) A + ( B + C ) = ( A + B ) + C
Associative law for addition
(3) ( cd ) A = c ( dA )
Associative law for scalar multiplication
(4) 1A = A
Unit element for scalar multiplication
(5) c( A+B ) = cA + cB Distributive law 1 for scalar multiplication
(6) ( c+d ) A = cA + dA
Distributive law 2 for scalar multiplication
2 - 16

Properties of zero matrices:
If A  M mn ,
c : scalar
Then (1) A  0mn  A
(2) A  ( A)  0mn
(3) cA  0mn  c  0 or A  0mn

Notes:
(1) 0m×n: the additive identity for the set of all m×n matrices
(2) –A: the additive inverse of A
2 - 17

Properties of matrix multiplication:

Properties of the identity matrix:
If A  M mn
Then (1) AI n  A
(2) I m A  A
2 - 18

Transpose of a matrix:

Properties of transposes:
 a11 a12 L a1n 
a

a
L
a
22
2n 
If A   21
 M m n
 M M M M


 am1 am 2 L amn 
 a11 a21 L am1 
a

a
L
a
22
m2 
Then AT   12
 M nm
 M M M M


 a1n a2 n L amn 
2 - 19
(1) ( AT )T  A
(2) ( A  B)T  AT  BT
(3) (cA)T  c( AT )
(4) ( AB)T  BT AT

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
2 - 20

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

Note: AAT is symmetric
Pf:
( AAT )T  ( AT )T AT  AAT
 AAT is symmetric
2 - 21


Real number:
ab = ba (Commutative law for multiplication)
Matrix:
ABB A
m  n n p
Three situations of the non-commutativity may occur :
(1) If m  p , then AB is defined ,BA is undefined.
(2) If m  p, m  n, then AB  M mm, BA  M nn (Sizes are not the same)
(3) If m  p  n, then AB  M mm, BA  M mm
(Sizes are the same, but matrices are not equal)
2 - 22

Example (Case 3):
Show that AB and BA are not equal for the matrices.
2  1
 1 3
B
A
and


0
2
2

1




Sol:
5
 1 3 2  1 2
AB  





2

1
0
2
4

4


 

7
2  1  1 3 0
BA  





0
2
2

1
4

2


 

2 - 23

Real number:
ac  bc, c  0
(Cancellation law)
 a b

Matrix:
AC  BC
C0
(1) If C is invertible (i.e., C-1 exists), then A = B
(2) If C is not invertible, then A  B (Cancellation is not valid)
2 - 24

Example: An example in which cancellation is not valid
Show that AC=BC
 1 3
 2 4
 1  2
A
, B
, C



0
1
2
3

1
2






Sol:
1
AC  
0
2
BC  
2
3  1  2  2 4




1  1
2   1 2
4  1  2   2 4




3  1 2    1 2
So
AC  BC
But
A B
2 - 25
C is noninvertible,
(i.e., row 1 and row 2
are not independent)
Keywords in Section 2.2:

zero matrix: 零矩陣

identity matrix: 單位矩陣

transpose matrix: 轉置矩陣

symmetric matrix: 對稱矩陣

skew-symmetric matrix: 反對稱矩陣
2 - 26
2A.3 The Inverse of a Matrix

Inverse matrix:
Consider A  M nn
If there exists a matrix B  M nn 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).
2 - 27

Theorem: The inverse of a matrix is unique
If B and C are both inverses of the matrix A, then B = C.
Pf:
AB  I
C ( AB)  CI
(CA) B  C
IB  C
BC
Consequently, the inverse of a matrix is unique.

Notes:
(1) The inverse of A is denoted by A1
(2) AA1  A1 A  I
2 - 28

Find the inverse of a matrix A by Gauss-Jordan Elimination:
A

-Jordan Eliminatio n
| I  Gauss

  I | A1 
Example: Find the inverse of the matrix
4
 1
A

 1  3
Sol:
AX  I
4  x11
 1
 1  3  x

  21
 x11  4 x21
 x  3 x
 11
21
x12   1 0


x22  0 1
x12  4 x22   1 0


 x12  3x22  0 1
2 - 29

x11  4 x21  1
 x11  3 x21  0
(1)
x12  4 x22  0
 x12  3 x22  1
(2)
 1 4 M 1  1   2 ;  4  2   1  1 0 M  3 
 x11  3, x21  1
(1)  




 1 3 M 0 
 0 1 M 1
 1 4 M 0  1   2 ;  4  2  1  1 0 M 4 
 x12  4, x22  1
(2)  




  1  3 M 1
 0 1 M 1
Thus
  3  4
X A 

1
1


1
2 - 30

Note:
 1 4 M1
 1 3 M 0

A
I
0  Gauss  JordanElimination  1 0 M 3 4 





1   2 ;  4  2  1
1
0
1
M
1
1


I
A 1
If A can’t be row reduced to I, then A is singular.
2 - 31

Example: Find the inverse of the following matrix
 1  1 0
A   1 0  1
 6 2 3
Sol:
A
M I
 1 1 0 M 1 0 0 
  1 0 1 M 0 1 0 
 6 2 3 M 0 0 1 
 1 1 0 M 1 0 0 
 1 1 0 M 1 0 0 
 1   2
 0
 6 1   3
0


1

1
M

1
1
0

1

1
M

1
1
0




 6 2 3 M 0 0 1
 0 4 3 M 6 0 1
 1 1 0 M 1 0 0 
 1 1 0 M 1 0 0 
 3
4 2  3
0

 0 1 1 M 1 1 0  
1

1
M

1
1
0





 0 0
 0 0 1 M 2 4 1
1 M 2 4 1
2 - 32
 1 1 0 M 1 0 0 
3  2
 2  1

  0
1 0 M 3 3 1 

 0 0 1 M 2 4 1
 [ I M A1 ]
 1 0 0 M  2  3 1
 0 1 0 M  3  3  1


 0 0 1 M 1 4 1
So the matrix A is invertible, and its inverse is
  2  3  1
A1   3 3 1
 1 4 1
You can check: AA1  A1 A  I
2 - 33

Power of a square matrix:
(1) A0  I
(2) Ak  144
AA
42L444A3
(k  0)
k factors
(3) Ar  As  Ar  s
r , s : integers
( Ar )s  Ars
 d1
0
(4) D  
M

0
0
L
d2 L
M O
0
L
0
 d1k 0 L

k
0 
0
d
L
k
2

D 
M M
M


dn 
 0 0 L
2 - 34
0

0
M
k
d n 

Theorem: Properties of inverse matrices
If A is an invertible matrix, k is a positive integer, and c is a scalar,
then
(1) A1 is invertible and ( A1 )1  A
(2) Ak is invertible and
1
1
1 k
k
( Ak )1  A1*k  14444
A1 A42
L
A

(
A
)

A
444443
k factors
1 1
(3) cA is invertible and (cA)  A , c  0
c
1
(4) AT is invertible and ( AT )1  ( A1 )T
2 - 35

Theorem: The inverse of a product
If A and B are invertible matrices of size n, then AB is invertible and
( AB) 1  B 1 A1
Pf:
( AB)( B 1 A1 )  A( BB 1 ) A1  A( I ) A1  ( AI ) A1  AA1  I
( B 1 A1 )( AB)  B 1 ( A1 A) B  B 1 ( I ) B  B 1 ( IB)  B 1B  I
If AB is invertible, then its inverse is unique.
So ( AB) 1  B 1 A1

Note:
 A1 A2 A3 L
An   An1 L A31 A21 A11
1
2 - 36

Theorem: Cancellation properties
If C is an invertible matrix, then the following properties
hold:
(1) If AC=BC, then A=B (Right cancellation property)
(2) If CA=CB, then A=B (Left cancellation property)
Pf:
AC  BC
( AC )C 1  ( BC )C 1

(C is invertible, so C-1 exists)
A(CC 1 )  B(CC 1 )
AI  BI
AB
Note:
If C is not invertible, then cancellation is not valid.
2 - 37

Theorem: Systems of linear equations with unique solutions
If A is an invertible matrix, then the system of linear equations
Ax = b has a unique solution given by x  A1b
Pf:
Ax  b
A1 Ax  A1b
( A is nonsingular)
Ix  A1b
x  A1b
If x1 and x2 were two solutions of equation Ax  b.
then Ax1  b  Ax2  x1  x2
This solution is unique.
2 - 38
(Left cancellation property)
Keywords in Section 2.3:

inverse matrix: 反矩陣

invertible: 可逆

nonsingular: 非奇異

singular: 奇異

power: 冪次
2 - 39
2A.4 Elementary Matrices

Row elementary matrix:
An nn matrix is called an elementary matrix if it can be obtained
from the identity matrix I by a single elementary row operation.

Note:
Only do a single elementary row operation.
2 - 40

Ex: (Elementary matrices and nonelementary matrices)
1 0 0
(a) 0 3 0
0 0 1
Yes (32 (I 3 ))
1 0 0
(d ) 0 0 1
0 1 0
(b) 1 0 0
0 1 0
1 0 0
(c) 0 1 0
0 0 0
No (not square)
No (Row multiplica tion
must be by a nonzero constan t)
(e) 1 0
2 1
1 0 0 
( f ) 0 2 0 
0 0 1
Yes ([ 2   3 ](I 3 )) Yes ([21   2 ](I 2 ))
2 - 41
No (Use two elementary
row operations)

Theorem: Representing elementary row operations
Let E be the elementary matrix obtained by performing an
elementary row operation on Im. If that same elementary row
operation is performed on an mn matrix A, then the resulting
matrix is given by the product EA.
(I )  E
 ( A)  EA

Notes:
(1)  ij ( A)  Pij A
(2) k i ( A)  M i ( k ) A
(3) [k i   j ]( A)  C ij ( k ) A
2 - 42

Example: Using elementary matrices
Find a sequence of elementary matrices that can be used to write
the matrix A in row-echelon form.
1 3 5
0
A   1  3 0 2


2  6 2 0
Sol:
0 1 0
E1  12 ( I 3 )   1 0 0 
 0 0 1 
 1 0 0
E2  [2 1   3 ]( I 3 )   0 1 0 
 2 0 1
 1 0 0
1


E3  [  3 ]( I 3 )   0 1 0 
2
 0 0 12 
2 - 43
 0 1 0   0 1 3 5   1 3 0 2 
A1  12 ( A)  E1 A   1 0 0   1 3 0 2    0
1 3 5 
 0 0 1   2 6 2 0   2 6 2 0 
 1 0 0 1
A2  [2 1   3 ]( A1 )  E2 A1   0 1 0   0
 2 0 1   2


1 0 0  1 3


1
A3  [  3 ]( A2 )  E3 A2   0 1 0   0 1
2

1   0 0
0 0


2
 B  E3 E2 E1 A
 3 0 2   1 3 0
2
1 3 5    0
1 3
5 
6 2 0   0
0 2 4 
0 2   1 3 0 2 
3 5    0
1 3 5   B
2 4  0 0 1 2 
row-echelon form
1
or B  [  3 ][2 1   3 ]12 ( A)
2
2 - 44

Row-equivalent:
Matrix B is row-equivalent to A if there exists a finite number
of elementary matrices such that
B  Ek Ek 1 L E2 E1 A
2 - 45

Theorem: Elementary matrices are invertible
If E is an elementary matrix, then E 1 exists and
is an elementary matrix.

Notes:
(1) (Pij )1  Pij
1
(2) [M i ( k )]  M i ( )
k
(3) [Cij (k )]1  Cij (k )
1
2 - 46
Ex:
Elementary Matrix
0 1 0
E1 ( 12 )   1 0 0   P12
 0 0 1 

Inverse Matrix
0 1 0
( P12 )1  E11   1 0 0   P12
 0 0 1 
1 0 0
 1 0 0


1
1
E2 ( 2 1   3 )   0 1 0   C13 ( 2) [C13 ( 2)]  E2   0 1 0 
 2 0 1
 C13 (2)  2 0 1 
 1 0 0
1
1


E3 (  3 )   0 1 0   M 3 ( )
2
2
 0 0 12 
1 1
[ M 3 ( )]  E31
2
2 - 47
1 0 0
  0 1 0   M 3 (2)
 0 0 2 

Theorem: A property of invertible matrices
A square matrix A is invertible if and only if it can be written as
the product of elementary matrices.
Pf: (1) Assume that A is the product of elementary matrices.
(a) Every elementary matrix is invertible.
(b) The product of invertible matrices is invertible.
Thus A is invertible.
(2) If A is invertible, Ax  0 has only the trivial solution.
  AM
0   I M
0
 Ek L E3 E2 E1 A  I
 A  E11 E21 E31 L Ek1
Thus A can be written as the product of elementary matrices.
2 - 48

Ex:
Find a sequence of elementary matrices whose product is
  1  2
A

3
8


Sol:
 1 2   1  1 2  3 1  2  1 2 
A 
 





3
8
3
8
0
2






1

 1 2  [  2  2  1 ]  1 0 
2 2


I
 0 1  



0 1
1
Therefore C21 ( 2) M 2 ( )C12 ( 3) M1 ( 1) A  I
2
2 - 49
1 1
Thus A  [ M1 (1)] [C12 ( 3)] [ M 2 ( )] [C21 ( 2)]1
2
1
1
 M1 ( 1)C12 (3) M 2 (2)C21 (2)
 1 0 1 0 1 0 1 2

 3 1 0 2 0 1
0
1






Note:
If A is invertible
Then Ek L E3 E2 E1 A  I
A1  Ek L E3 E2 E1
Ek L E3 E2 E1 [ AM
I ]  [ I MA 1 ]
2 - 50

Thm: Equivalent conditions
If A is an nn matrix, then the following statements are equivalent.
(1) A is invertible.
(2) Ax = b has a unique solution for every n1 column matrix b.
(3) Ax = 0 has only the trivial solution.
(4) A is row-equivalent to In .
(5) A can be written as the product of elementary matrices.
2 - 51

LU-factorization:
A nn matrix A can be written as the product of a lower
triangular matrix L and an upper triangular matrix U, such as
A  LU

L is a lower triangular matrix
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 (pivot), then it is easy to find an LU-factorization of A.
Ek L E2 E1 A  U
A  E11 E21 L Ek1U
A  LU
2 - 52

Ex: LU-factorization
(a) A  1 2
1 0
 1  3 0
(b) A  0
1 3
2  10 2
Sol: (a)
1 2  1 1  2
1 2 
A 

 
U


1 0 
 0 2 
 C12 (1) A  U
 A  [C12 ( 1)]1 U  C12 (1)U  LU
1 0 
 L  [C12 ( 1)]  C12 (1)  

1
1


1
2 - 53
(b)
 1 3 0 
 1 3 0 
 1 3 0 
 2 1   3
4 2  3
0 1 3   U
A   0
1 3  
  0
1 3  


 2 10 2 
 0 4 2 
 0 0 14 
 C23 (4)C13 ( 2) A  U
 A  [C13 ( 2)]1[C 23 (4)]1 U  LU
 L  [C13 ( 2)]1[C 23 (4)]1  C13 (2)C 23 ( 4)
 1 0 0  1 0 0  1 0 0 
  0 1 0   0 1 0    0 1 0 
 2 0 1   0 4 1   2 4 1 
2 - 54

Solving Ax=b with an LU-factorization of A
Ax  b
If A  LU
then LUx  b
Let y  Ux then Ly  b

Two steps:
(1) Write y = Ux and solve Ly = b for y
(2) Solve Ux = y for x
2 - 55

Ex: Solving a linear system using LU-factorization
x1  3 x2
 5
x2  3 x3   1
2 x1  10 x2  2 x3   20
Sol:
0 0  1  3 0
 1  3 0  1
A  0
1 3  0
1 0  0
1 3  LU

 


0 14
2  10 2 2  4 1 0
(1) Let y  Ux, and solve Ly  b
1 0
0 1
2  4
y1  5
0  y1    5 
0  y2     1   y2  1
1  y3   20
y3  20  2 y1  4 y2
 20  2(5)  4(1)  14
2 - 56
(2) Solve the following system Ux  y
 1  3 0  x1    5 
0 1 3  x2     1 
0 0 14  x3   14
So
x3  1
x2  1  3x3  1  (3)(1)  2
x1  5  3x2  5  3(2)  1
Thus, the solution is
1
x2
 
 1
2 - 57
Keywords in Section 2A.4:

row elementary matrix: 列基本矩陣

row equivalent: 列等價

lower triangular matrix: 下三角矩陣

upper triangular matrix: 上三角矩陣

LU-factorization: LU分解
2 - 58
Related documents