0% found this document useful (0 votes)
35 views41 pages

Ch2 Matrices

Uploaded by

echang0618
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)
35 views41 pages

Ch2 Matrices

Uploaded by

echang0618
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
You are on page 1/ 41

Feng Chia University AIEEC LAB

Taiwan FCU

CHAPTER 2
MATRICES
2.1 Operations with Matrices
2.2 Properties of Matrix Operations
2.3 The Inverse of a Matrix

Elementary Linear Algebra


R. Larson (8 Edition) 1
2.1 Operations with Matrices
 Matrix(矩陣):
 a11 a12 a13  a1n 
a a a  a 
 21 22 23 2n 

A  [aij ]mn   a31 a32 a33  a3n   M mn


 
    
am1 am 2 am 3  amn 
mn

(i, j)-th entry: aij

row: m
column: n
size: m×n
2

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.40
 i-th row vector(列向量):
ri  ai1 ai 2  ain  row matrix(列矩陣)

 j-th column vector (行向量):


 c1 j 
c 
cj   2j
 column matrix(行矩陣)
  
c 
 mj 
 Square matrix (方陣): m = n

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.40
 Diagonal matrix(對角矩陣):
d1 0  0
0 d2  0
A  diag(d1 , d 2 ,, d n )     M nn
   
0  d n 
 0

 Trace(跡數):

If A  [ aij ]nn

Then Tr ( A)  a11  a22    ann

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, Addition
 Ex:
1 2 3  r1 
A   
4 5 6  r2 
 r1  1 2 3 , r2   4 5 6

 1 2 3
A    c1 c2 c3 
 4 5 6
1  2 3
 c1    , c2    , c3   
4 5 6 
5

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, Addition
 Equal matrix(相等矩陣):
If A  [aij ]mn , B  [bij ]mn

Then A  B if and only if aij  bij  1  i  m, 1  j  n

 Ex 1: (Equal matrix)
1 2 a b 
A  B 
3 4   c d 

If A  B
Then a  1, b  2, c  3, d  4

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.40
 Matrix addition(矩陣相加):
If A  [aij ]mn , B  [bij ]mn
Then A  B  [aij ]mn  [bij ]mn  [aij  bij ]mn

 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  1  1  0 
  3   3    3  3   0 
       
 2  2  2  2 0
7

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.41
 Scalar multiplication (純量乘法(純量積)):
If A  [aij ]mn , c : scalar
Then cA  [caij ]mn

 Matrix subtraction(矩陣相減):
A  B  A  (1)B

 Ex 3: (Scalar multiplication and matrix subtraction)


 1 2 4  2 0 0
A   3 0  1 B   1  4 3
   
 2 1 2  1 3 2

Find (a) 3A, (b) –B, (c) 3A – B 8

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.41
Sol:
 1 2 4  31 32 34  3 6 12
(a)
3A  3 3 0  1  3 3 30 3 1   9 0  3
     
 2 1 2  32 31 32  6 3 6
(b)
 2 0 0   2 0 0
 B   1 1  4 3    1 4  3

 
 1 3 2  1  3  2
(c)
 3 6 12  2 0 0  1 6 12
3 A  B   9 0  3   1  4 3   10 4  6
     
 6 3 6  1 3 2  7 0 4
9

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.41
 Matrix multiplication (矩陣乘法):
If A  [aij ]mn , B  [bij ]n p
Then AB  [aij ]mn [bij ]n p  [cij ]m p

Size of AB
n
where cij   aikbkj  ai1b1 j  ai 2b2 j    ainbnj
k 1

 a11 a12  a1n  b  b


    11 1j  b1n   
      
b  b  b
 ai1 ai 2  ain    
21 2 j 2 n

       ci1 ci 2  cij  cin 


  
  bn1  bnj  bnn   

an1 an 2  ann   

 Notes: (1) A+B = B+A, (2) AB  BA 10

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.42 & p.44
 Ex 4: (Find AB)
 1 3
   3 2
A 4 2 B
   4 1
 5 0
Sol:
 (1)(3)  (3)(4) (1)(2)  (3)(1)   9 1 
AB  (4)(3)  (2)(4) (4)(2)  (2)(1)  4 6 
   
 (5)(3)  (0)(4) (5)(2)  (0)(1)   15 10

 Ex 5: Matrix Multiplication
11

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, p.43
 Matrix form of a system of linear equations:
 a11 x1  a12 x2    a1n xn  b1
 a x  a x  a x  b
 21 1 22 2 2n n 2
 m linear equations
 
am1 x1  am 2 x2    amn xn  bm


 a11 a12 a1n   x1   b1 
a a22 a2 n   x2   b2  Single matrix equation
 21 
     A xb
     m  n n 1 m 1

 am1 am 2 amn   xn  bm 


=

A x b
12
 Ex 6: Solving a System of Linear Equations
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.1, p.45
 Partitioned matrices(分割矩陣):
submatrix
 a11 a12 a13 a14 
 A11 A12 
A  a21 a22 a23 
a24  
   A21 A22 
 a31 a32 a33 a34 

 a11 a12 a13 a14   r1 


A  a21 a22 a23 a24   r2 
   
 a31 a32 a33 a34   r3 

 a11 a12 a13 a14 


A  a21 a22 a23 a24   c1 c2 c3 c4 
 
 a31 a32 a33 a34 
13

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.1, Addition
 Linear combination of column vectors:
Ax = b的線性方程式系統,可改寫為行矩陣與係數的線性組合

 a11 a12  a1n   x1 


a x 
a22  a2 n 
A   21   c1 c2  cn  x   2
      
a x 
 m1 am 2  amn   n
c1 c2 cn
 a11 x1  a12 x2    a1n xn   a11   a12   a1n 
 a x  a x  a x  a  a  a 
 Ax   21 1 22 2 2n n
  x1  21   x2  22     xn  2 n 
           
a x  a x    a x  a  a  a 14
 m1 1 m 2 2 mn n  m1  m1   m2   mn 
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.1, p.46
 Ex 7: (Solve a system of linear equations)
x1  2 x2  3 x3  0
4 x1  5 x2  6 x3  3 (infinitely many solutions)
7 x1  8 x2  9 x3  6

 1 2 3  x1  0   1  2  3
 A  4 5 6, x   x2 , b   3, c1  4, c2   5, c3  6
7 8 9  x3  6 7   8 9

 x1  2 x2  3x3   1 2  3 0


 Ax   4 x1  5 x2  6 x3   x1  4   x2  5  x3 6   3  b
 7 x1  8 x2  9 x3  7   8 9 6
Use Gaussian elimination can find the this system has infinitely many solutions,
one of which is x1=1, x2=1, x3=-1 . That is, b can be expressed as a linear combination of
the column of A.
 1 2  3 0  1
 14  1 5  (1) 6   3 (one solution : x   1, i.e. x1  1, x2  1, x3  1) 15
7  8 9 6  1
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.1, p.47
Key Learning in Section 2.1
 Determine whether two matrices are equal.
 Add and subtract matrices and multiply a matrix by a scalar.
 Multiply two matrices.
 Use matrices to solve a system of linear equations.
 Partition a matrix and write a linear combination of column
vectors.

16

Department of Electrical Engineering


2.2 Properties of Matrix
Operations
 Three basic matrix operators:
(1) matrix addition
(2) scalar multiplication
(3) matrix multiplication

 Zero matrix(零矩陣): 0 mn

 Identity matrix(單位矩陣) of order n: I n

17

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, 52-55
 Properties of Matrix Addition (矩陣加法特性):

If A, B, C  M mn , c, d : scalar
Then (1) A+B = B + A Commutative property of addition

(2) A + ( B + C ) = ( A + B ) + C Associative property of addition

(3) ( cd ) A = c ( dA ) Associative property of multiplication

(4) 1A = A Multiplicative identity (乘法單位元素)

(5) c( A+B ) = cA + cB Distributive property

(6) ( c+d ) A = cA + dA Distributive property

18

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.52
 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

 Ex 2: Solving a matrix equation 19

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.53
 Properties of Matrix Multiplication(矩陣乘法特性):
(1) A(BC) = (AB)C Associative property of multiplication

(2) A(B+C) = AB + AC Distributive property

(3) (A+B)C = AC + BC Distributive property


(4) c(AB) = (cA)B = A(cB)

 Ex 3: Matrix Multiplication is Associative

20

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.54 & p.56
 Real number:
ab = ba (Commutative law for multiplication)

 Matrix:
AB  BA
m n n p

Three situations:
(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)

21

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, Addition
 Ex 4: Noncommutativity of Matrix Multiplication
Sow that AB and BA are not equal for the matrices.
 1 3 2  1
A  and B 
 2  1  0 2 

 Note: AB  BA
22

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.55
 Real number:
ac  bc, c  0
 ab (Cancellation law)

 Matrix:
AC  BC C0
(1) If C is invertible, then A = B

(2) If C is not invertible, then A  B (Cancellation is not valid)

23

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.55
 Ex 5: (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 

24

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.55
 Properties of identity matrix (單位矩陣):
If A  M mn
Then (1) AI n  A
(2) I m A  A

 Notes: if A is a square matrix of order n,


then 𝐴𝐼𝑛 = 𝐼𝑛 𝐴 = 𝐴

 Ex 6: Multiplication by an Identity Matrix


 Ex 7: Repeated Multiplication of a Square Matrix

25

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.54 & p.56
 Transpose of a matrix (轉置矩陣):
 a11 a12  a1n 
a a22  a2 n 
If A   21   M mn
     
a am 2  amn 
 m1

 a11 a21  am1 


a a22  am 2 
Then AT   12   M nm
     
a a2 n  amn 
 1n

26

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.57
 Ex 8: (Find the transpose of the following matrix)
 1 2 3 0 1
 2
(a) A    (b) A   4 5 6 
(c) A  2 4

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
A  2 4  AT  
  1 4  1 27
 1  1 Department of Electrical Engineering
Elementary Linear Algebra: Section 2.2, p.57
 Properties of transposes(轉置的特性):
(1) ( AT )T  A
(2) ( A  B)T  AT  BT (A  B  C )T  ?

(3) (cA)T  c( AT )

(4) ( AB )T  BT AT ( ABC)T  ?

 Ex 9: Finding the transpose of a product

28

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, p.57
 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 4 5 AT  2 4 c 
A A
     a  2, b  3, c  5
b c 6 3 5 6 29

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, Addition
 Ex:
 0 1 2
If A   a 0 3  is a skew-symmetric(反對稱), find a, b, c?
 
 b c 0 
Sol:
 0 1 2  0 a b 
A   a 0 3   AT   1 0 c 
 
 b c 0   2 3 0 

A   AT  a  1, b  2, c  3

 Note: AA T is symmetric Pf: ( AAT )T  ( AT )T AT  AAT


 AAT is symmetric

 Ex 10: The product of a Matrix and Its Transpose 30

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.2, Addition
Key Learning in Section 2.2
 Use the properties of matrix addition, scalar multiplication,
and zero matrices.
 Use the properties of matrix multiplication and the identity
matrix.
 Find the transpose of a matrix.

31

Department of Electrical Engineering


2.3 The Inverse of a Matrix
 Real number equation ax = b, To solve the equation for x :
ax  b
 (a 1a) x  a 1b
 x  a 1b , where a-1 is the multiplicative inverse(乘法反元素)

 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奇異).

 Ex 1: (Show that B is the inverse of A) 32

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.3, p.62
 Thm 2.7: (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
33

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.3, pp.62-63
 Find the inverse of a matrix by Gauss-Jordan Elimination:

A | I  Gauss
   I | A1 
- Jordan Eliminatio n

 Check: AA 1  A1 A  I
 Ex 2: (Find the inverse of the matrix)
 1 4
A 
 1  3
 Ex 3: (Find the inverse of the following matrix)

 1  1 0
A   1 0  1
 6 2 3
 Ex 4: (Show that the matrix has no inverse
 1 2 0
A   3 1 2 
34
 2 3 2 
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.3, pp.63-64
 Power of a square matrix(矩陣幕次):
(1) A0  I

(2) Ak  
AA

A (k  0)
k factors

(3) Ar  As  Ar  s r , s : integers
( Ar ) s  Ars
d1 0  0 d1k 0  0
0 d  0  
0 d 2k  0
(4) D   2
  Dk  
      
0 0  k
  d n  0 0  dn 

35

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.3, Addition
 Thm 2.8: (Properties of inverse matrices)

If A is an invertible matrix, k is a positive integer, and c is a scalar


not equal to zero, then

(1) A1 is invertible and ( A1 ) 1  A

(2) Ak is invertible and ( Ak )1  A1 A1 A1  ( A1 )k  A k


k factors
1
(3) cA is invertible and (cA) 1  A1 , c  0
c
(4) AT is invertible and ( AT ) 1  ( A1 )T

 Ex 5: (Finding inverse of 2 x 2 Matrices)


36
 Ex 6: (The inverse of the Square of a Matrix)
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.3, p.67
 Thm 2.9: (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 1 B  I
If AB is invertible, then its inverse is unique.
So ( AB) 1  B 1 A1

 Note:  A1 A2 A3  An 1  An1  A31 A21 A11

 Find the (AB)-1, A-1B-1, B-1A-1 1 2   2 1


A  B 
 1 1
37
1 3
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.3, p.68
 Thm 2.10: (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:
38
If C is not invertible, then cancellation is not valid.
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.3, p.69
 Thm 2.11: (Systems of 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 (Left cancellation property)
39
This solution is unique.
Department of Electrical Engineering
Elementary Linear Algebra: Section 2.3, p.70
 Note:
For square systems (those having the same number of equations
as variables which means the same coefficient matrix A),
Theorem 2.11 can be used to determine whether the system has a
unique solution.

 Ex 8: (Solving Systems of Equations Using an Inverse Matrix)

40

Department of Electrical Engineering


Elementary Linear Algebra: Section 2.3, p.70
Key Learning in Section 2.3
▪ Find the inverse of a matrix (if it exists).
▪ Use properties of inverse matrices.
▪ Use an inverse matrix to solve a system of linear equations.

41

Department of Electrical Engineering

You might also like