Linear Algebra Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices • aij: the element of matrix A in.

Download Report

Transcript Linear Algebra Chapter 2 Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices • aij: the element of matrix A in.

Linear Algebra
Chapter 2
Matrices and Linear
Transformations
大葉大學 資訊工程系
黃鈴玲
2.1 Addition, Scalar Multiplication,
and Multiplication of Matrices
• aij: the element of matrix A in row i and column j.
Definition
Two matrices are equal if they are of the same size and if their
corresponding elements are equal.
Thus A = B if aij = bij  i, j.
( 代表 for every, for all)
Ch2_2
Addition of Matrices
Definition
Let A and B be matrices of the same size.
Their sum A + B is the matrix obtained by adding together the
corresponding elements of A and B.
The matrix A + B will be of the same size as A and B.
If A and B are not of the same size, they cannot be added, and we
say that the sum does not exist.
Thusif C  A  B, then cij  aij  bij i,j.
Ch2_3
Example
4 7, B   2 5  6, and C   5 4.
Let A   1
8
0  2 3
 3 1
 2 7
Determine A + B and A + C, if the sum exist.
Solution (自行練習)
4 7    2 5  6
(1) A  B   1
8
0  2 3  3 1
4  5 7  6
 1  2
0  3  2  1 3  8
  3 9 1.
 3  1 11
(2) A and C are not of the same size, A + C does not exist.
Ch2_4
Scalar Multiplication of matrices
Definition
Let A be a matrix and c be a scalar. The scalar multiple of A by c,
denoted cA, is the matrix obtained by multiplying every element
of A by c. The matrix cA will be the same size as A.
Thusif B  cA, then bij  caij i, j.
Example
Let A   1  2 4.
7  2 0
3 1 3  (2) 3  4  3  6 12

3A 

.
3  7 3  (3) 3  0 21  9 0
Observe that A and 3A are both 2  3 matrices.
Ch2_5
Negation and Subtraction
Definition
The matrix (1)C is written –C and is called the negative of C.
Example
0
7
 1 0  7
 1
C
, then C  



3
6
2
3

6

2




We now define subtraction in terms of addition and scalar
multiplication. Let
A – B = A + (–1)B
Example
Thusif C  A  B, then cij  aij  bij , i, j.
Suppose A  5 0  2 and B  2 8  1.
3 6  5
0 4 6
5  2 0  8  2  (1) 3  8  1
A B  

.
2  11
3  0 6  4
 5  6 3
Ch2_6
Matrix Multiplication
Examples

 2 

1 2   

 1 2  2 
5   (1 2)  (2  5)  12


 
3 4 5  


   3 4 2  (3  2)  (4  5) 26

5  
 


5

1 3  

 1 3 5 0 1 
3

2 0 3  2 6  


 2 0 5

3
 

0
1 3 
  2
0
2 0 
  2
1 
1 3   14  6 19

6    
1  10 0 2 
2 0  
6  
Ch2_7
Example 1
 3 1 2
7 2
Let A  
,B
.


4 1 5
6 3
Show that theproduct AB does not exist.
Sol.
 3 1 2 7 2
AB  
 6 3
4
1
5




7 


3
1
2

 6
 


7 
4 1 5 6
 

3
4
 2 
2   
 3 
 2 
1 5   
 3 
1
無法相乘
AB does not exist.
Note. In general, ABBA. 如此題之BA存在
Ch2_8
Definition
Let the number of columns in a matrix A be the same as the
number of rows in a matrix B. The product AB then exists.
Let A: mn matrix, B: nk matrix,
The product matrix C=AB has elements
cij  ai1
ai 2
 b1 j 
b 
2j

 ain 
 ai1b1 j  ai 2b2 j    ainbnj
  
 
 bnj 
C is a mk matrix.
If the number of columns in A does not equal the number of row B,
we say that the product does not exist.
Ch2_9
Example 2
0 1
 1 3
5
Let A  
,B
.


2 0
3  2 6
DetermineAB and BA, if theproductsexist.
Sol.
0 1 14  6 19
AB   1 3 5
2 0 3  2 6  10 0 2.
BA does not exist.
Note. In general, ABBA.
隨堂作業:5(f)
Example 3
Let C = AB, A   2 1 and B   7 3 2 Determine c23.
 3 4
 5 0 1
2
c23   3 4 1  (3  2)  (4 1)  2
 
隨堂作業:11(d)
Ch2_10
Size of a Product Matrix
If A is an m  r matrix and B is an r  n matrix, then AB will be an
m  n matrix.
A
B
= AB
mr
rn
mn
Example
If A is a 5  6 matrix and B is an 6  7 matrix.
Because A has six columns and B has six rows. Thus AB exits.
And AB will be a 5  7 matrix.
隨堂作業:8(f)
Ch2_11
Special Matrices
Definition
A zero matrix is a matrix in which all the elements are zeros.
A diagonal matrix is a square matrix in which all the elements
not on the main diagonal are zeros.
An identity matrix is a diagonal matrix in which every diagonal
element is 1.
0mn
0
 0

0
0
0

0




zero matrix
0
0

0
a11 0
0 a
22
A



0
0
0
 0 
  

 ann 

1
I n  0

0
0
1

0
0
0

1




identity matrix
diaginal matrix A
Ch2_12
Theorem 2.1
Let A be m  n matrix and Omn be the zero m  n matrix. Let B be
an n  n square matrix. On and In be the zero and identity n  n
matrices. Then
A + Omn = Omn + A = A
BOn = OnB = On
BIn = InB = B
Example 4
Let A  2 1  3 and B   2 1.
8
4 5
 3 4
2
A  O23  
4
1  3
0

8 0
0 0
2

0 4
1  3
5
0
5
 2 1 0 0 0 0
BO2  

 O2




 3 3 0 0 0 0
 2
BI2  
 3
1 1 0

4 0
 2

1  3
A
8
1
B
4
Ch2_13
Matrix multiplication in terms of columns
(a) A: mn, B: nr
Let the columns of B be the matrices B1, B2, …, Br.
Write B=[B1 B2 … Br].
Thus AB=A[B1 B2 … Br]=[AB1 AB2 … ABr].
Example
 2 0
4 1 3 
A
and B  


1 5 
0 2  1
8 2 6 
 AB  

4
11

2



 4
1 
3
B1   , B2   , B3   
0 
 2
 1
8 
2
6
and AB1   , AB2   , AB3   
 4
11
  2
Ch2_14
Matrix multiplication in terms of columns
(b)
 b1 
A: mn, B: n1, where A=[A1 A2 … An] and B     .
bn 
 b1 
We get AB  A1 A2  An     b1 A1  b2 A2  bn An .
 
bn 
Example
3
 2 3 1
  2
A
and
B


 

4
8
5


 5 

2
3
1
A1   , A2   , A3   
  4
8
5
 2  3 1  5 
 AB  3   2   5    
 4 8 5  3
Ch2_15
Partitioning of Matrices
A matrix can be subdivided into a number of submatrices.
Example
 0 1 2 
 P Q  where P  0, Q   1 2, R   2 and S  5  1


A 3
1 4
3
 1 4

 


R S

 2 5  1
Example
1 2  1 
 1 0
 P Q
M 




A   3 0  2  
and B   2 1   

R S
N
4  3 2  
 5 4  
 P Q M   PM  QN 
 AB  





R
S
N
RM

SN

  

Ch2_16
Example 5
1  1
1 2  1


Let A  3 0  and B  
.

1 3 1 
2 4 
Consider the following partition of A.
1  1
 P Q


A  3 0   

R
S

2 4  
Under this partition A is interpreted as a 22 matrix. For the product AB
to be exist, B must be partitioned into a matrix having two rows.
Let B  1 2  1   H .
1 3 1   J 

 1
 0  1  2 
 1
 P Q  H   PH  QJ     1 2  1   1 3 1  3 6  3
AB  

0

 3
 




R
S
J
RH

SJ

  
  21 2  1  41 3 1  6 16 2 
隨堂作業:21(a)
Ch2_17
Homework
Exercise 2.1:
5, 8, 11, 17, 21
Exercise 17
Let A be a matrix whose third row is all zeros. Let B be any
matrix such that the product AB exists.
Prove that the third row of AB is all zeros.
Solution
 b1i 
 b1i 
b 
b 
( AB) 3i  [a31 a32  a3n ]  2i   [0 0  0]  2i   0, i.


 
 
bni 
bni 
Ch2_18
2.2 Algebraic Properties of Matrix
Operations
Theorem 2.2 -1
Let A, B, and C be matrices and a, b, and c be scalars. Assume that the
size of the matrices are such that the operations can be performed.
Properties of Matrix Addition and scalar Multiplication
1. A + B = B + A
Commutative property of addition
2. A + (B + C) = (A + B) + C Associative property of addition
3. A + O = O + A = A
(where O is the appropriate zero matrix)
4. c(A + B) = cA + cB
Distributive property of addition
5. (a + b)C = aC + bC
Distributive property of addition
6. (ab)C = a(bC)
Ch2_19
Theorem 2.2 -2
Let A, B, and C be matrices and a, b, and c be scalars. Assume that the
size of the matrices are such that the operations can be performed.
Properties of Matrix Multiplication
1. A(BC) = (AB)C
Associative property of multiplication
2. A(B + C) = AB + AC
Distributive property of multiplication
3. (A + B)C = AC + BC
Distributive property of multiplication
4. AIn = InA = A
(where In is the appropriate zero matrix)
5. c(AB) = (cA)B = A(cB)
Note: AB BA in general.
Multiplication of matrices is not
commutative.
Ch2_20
Proof of Thm 2.2 (A+B=B+A)
Consider the (i,j)th elements of matrices A+B and B+A:
( A  B)ij  aij  bij  bij  aij  ( B  A)ij .
 A+B=B+A
Example 1
 1 3
 3  7
0 2
Let A  
,
B

,
and
C

.





1
 4 5
2
3  1
 1 3  3  7 0 2
 3
 5
2 A  3B  5C  2


1 3  1
 4 5 2
 2  9  0 6  21 10  11  25


.


18
 8  6  15 10  3  5  17
Ch2_21
Example 2
 4
1
2
0
1
3




Let A 
,B
, and C   1. Compute ABC.
3  1
 1 0  2
 0
Sol.
A
22
B
23
C =
31
D
21
ABC = (AB)C = A(BC)
3   2 1  1.
AB  1 2  0 1
3  1  1 0  2  1 3 11
4

( AB )C   2 1  1  1   9.
 1 3 11 0  1
 
Ch2_22
Caution
In algebra we know that the following cancellation laws apply.
If ab = ac and a  0 then b = c.
If pq = 0 then p = 0 or q = 0.
However the corresponding results are not true for matrices.
AB = AC does not imply that B = C.
PQ = O does not imply that P = O or Q = O.
Example
 1 2
  1 2
 3 8 
(1) Consider the matricesA  
, B   2 1 , and C   3  2.
2
4






3 4
Observe that AB  AC  
, but B  C.

6 8 
 1  2
2  6
(2) Consider the matricesP  
, and Q  
.


4
 2
1  3
Observe that PQ  O, but P  O and Q  O.
Ch2_23
Powers of Matrices
Definition
If A is a square matrix, then
A 
AA

A



k
k times
Theorem 2.3
If A is an n  n square matrix and r and s are nonnegative
integers, then
1. ArAs = Ar+s.
2. (Ar)s = Ars.
3. A0 = In (by definition)
Ch2_24
Example 3
 1  2
4
If A  
,
compute
A
.

0
 1
Solution
 1  2  1  2  3  2
A 






1
0

1
0

1
2


 

2
 3  2  3  2  11  10
A 

.




2  1
2  5
6
 1
4
Example 4
Simplify the following matrix expression.
A( A  2 B)  3B(2 A  B)  A2  7 B 2  5 AB
Solution
A( A  2 B)  3B(2 A  B)  A2  7 B 2  5 AB
 A2  2 AB  6 BA  3B 2  A2  7 B 2  5 AB
 3 AB  6 BA  4 B 2
注意這兩項不能合併!
Ch2_25
Systems of Linear Equations
A system of m linear equations in n variables as follows
a11 x1    a1n xn  b1




am1 x1    amn xn  bm
Let
 a11  a1n 
 x1 
 b1 
A      , X    , and B    
am1  amn 
 xn 
bm 
 
 


We can write the system of equations in the matrix form
AX = B
隨堂作業:32(c)
Ch2_26
Solutions to Systems of Linear Equations
Consider a homogeneous system of linear equations AX=0.
Let X1 and X2 be solutions. Then
AX1=0 and AX2=0
 A(X1 + X2) = AX1 + AX2 = 0
If c is a scalar,
 A(cX1) = cAX1 = 0
 X1 + X2 is also a solution
 cX1 is also a solution
Note.
The set of solutions to a homogeneous system of linear equations
is closed under addition and under scalar multiplication. It is a
subspace.
Ch2_27
Example 5
Consider the following homogeneous system of linear equations.
x1  2 x2  8 x3  0
x2  3x3  0
x1  x2  5 x3  0
It can be shown that there are many solutions,
x1=2r, x2=3r, x3 = r.
The solutions are vectors in R3 of the
form (2r, 3r, r) or r(2, 3, 1). The solutions
form a subspace of R3 of dimension 1.
Note. x1=0, …, xn = 0, is a solution to
every homogeneous system.
 The set of solutions to every
homogeneous system passes through
the origin.
Figure 2.4
隨堂作業:36(a)
Ch2_28
Solutions to Nonhomogeneous systems
Exercise 41
Show that a set of solutions to a system of nonhomogeneous linear
equations is not closed under addition or under scalar
multiplication, and that it is thus not a subspace of Rn.
Proof
Let AX=Y be a nonhomogeneous system of linear equations, so Y0.
Let X1 and X2 be two solutions. Then
AX1=Y and AX2=Y
 A(X1 + X2) = AX1 + AX2 = 2Y
(可省略) If c is a scalar,
 A(cX1) = cAX1 = cY
 X1 + X2 is not a solution.
 cX1 is not a solution.
The set of solutions is not a subspace of Rn.
Ch2_29
Example
Consider the following nonhomogeneous system of linear equations.
x1  2 x2  8 x3  8
x2  3x3  2
x1  x2  5 x3  6
The general solution of this system is (2r+4, 3r+2, r).
(2r+4, 3r+2, r) = r(2, 3, 1)+(4, 2, 0)
Note that r(2, 3, 1) is the
general solution of the
corresponding homogeneous
system. The vector (4, 2, 0)
is the specific solution to the
nonhomogeneous system
corresponding to r=0.
隨堂作業:40
Figure 2.5
Ch2_30
Idempotent and Nilpotent Matrices
(Exercise 24~30)
Definition
(1) A square matrix A is said to be idempotent (等冪) if A2=A.
(2) A square matrix A is said to nilpotent (冪零) if there is a
p
positive integer p such that A =0. The least integer p such that
Ap=0 is called the degree of nilpotency of the matrix.
Example
3  6 2 3  6
(1) A  
,A 
 A.


1  2
1  2
3  9 2 0 0
(2) B  
,B 
. T hedegree of nilpotency: 2


1  3
0 0
隨堂作業:28, 29(b)
Ch2_31
Homework
Exercise 2.2:
6, 13, 21, 25, 27, 28, 29, 32, 36, 40, 41
Exercise 21
A, B: diagonal matrix of the same size, c: scalar
Prove that A+B and cA are diagonal matrices.
Ch2_32
Homework
Exercise 25
 1 b
Determine b, c, and d such that 
is idempotent.

c d 
Exercise 27
Prove that if A and B are idempotent and AB=BA, then AB is
idempotent.
Ch2_33
2.3 Symmetric Matrices
Definition
The transpose (轉置) of a matrix A, denoted At, is the matrix
whose columns are the rows of the given matrix A.
i.e., A : m  n  At : n  m, ( At )ij  Aji i, j.
Example 1
A   2 7, B   1 2  7, and C   1 3 4.
6
 8 0
4 5
 1
1
4


t
t
C   3.
At  2  8
B

2
5


0
7
 4
 7 6
Ch2_34
Theorem 2.4 Properties of Transpose
Let A and B be matrices and c be a scalar. Assume that the sizes
of the matrices are such that the operations can be performed.
1. (A + B)t = At + Bt
Transpose of a sum
2. (cA)t = cAt
Transpose of a scalar multiple
3. (AB)t = BtAt
Transpose of a product
4. (At)t = A
Ch2_35
Theorem 2.4 Properties of
Transpose
Proof for 3. (AB)t = BtAt

( AB)t ij  ( AB) ji  a j1 a j 2  a jn

 b1i 
b 
 2i 

 
bni 
 a j1b1i  a j 2b2i    a jnbni
( B t At )ij  [row i of B t ] [column j of At ]  [column i of B]t [row j of A]t
 b1i b2i
 a j1 
a 
j2 

 bni 
 a j1b1i  a j 2b2i    a jnbni
  
 
 a jn 
Ch2_36
Symmetric Matrix
Definition
A symmetric matrix is a matrix that is equal to its transpose.
A  At , i.e., aij  a ji i, j
Example
5
2
 5  4
match
1
 0 1  4  0
8
 1 7
2
 4 8  3  4

0 2
4
7
3
9
3
2  3
9 3
6
match
隨堂作業:2(c)
Ch2_37
Example 3
Let A and B be symmetric matrices of the same size. Let C be a
linear combination of A and B. Prove that the product C is symmetric.
Proof
Let C = aA+bB, where a and b are scalars.
Ct = (aA+bB)t
= (aA)t + (bB)t
by Thm 2.4 (1)
= aAt + bBt
by Thm 2.4 (2)
= aA + bB
since A and B are symmetric
=C
Thus C is symmetric.
Ch2_38
If and only if
Let p and q be statements.
Suppose that p implies q (if p then q), written p  q,
and that also q  p, we say that
“p if and only if q”
(若且唯若)
(通常簡寫為 iff )
(也說成: p is necessary and sufficient for q )
Ch2_39
Example 4
Let A and B be symmetric matrices of the same size. Prove that
the product AB is symmetric if and only if AB = BA.
Proof
*We have to show (a) AB is symmetric  AB = BA,
and the converse, (b) AB is symmetric  AB = BA.
() Let AB be symmetric, then
AB= (AB)t
by definition of symmetric matrix
= BtAt
by Thm 2.4 (3)
= BA
since A and B are symmetric
() Let AB = BA, then
(AB)t = (BA)t
= AtBt
by Thm 2.4 (3)
= AB
since A and B are symmetric
Ch2_40
Example 3 相關題目
Let A be a symmetric matrix. Prove that A2 is symmetric.
Proof
( A )  ( AA) ( A A )  AA  A
2 t
t
t
t
2
Ch2_41
Trace of a matrix
Definition
Let A be a square matrix. The trace of A, denoted tr(A) is the sum
of the diagonal elements of A. Thus if A is an n  n matrix.
tr(A) = a11 + a22 + … + ann
Example 5
1  2
4
6.
Determine the trace of the matrix A  2  5
3
0
7
Solution
We get
tr ( A)  4  (5)  0  1.
隨堂作業:15(b)
Ch2_42
Theorem 2.5 Properties of Trace
Let A and B be matrices and c be a scalar. Assume that the sizes
of the matrices are such that the operations can be performed.
1. tr(A + B) = tr(A) + tr(B)
2. tr(AB) = tr(BA)
3. tr(cA) = c tr (A)
4. tr(At) = tr(A)
Proof of (1)
Since the diagonal element of A + B are (a11+b11), (a22+b22), …,
(ann+bnn), we get
tr(A + B) = (a11 + b11) + (a22 + b22) + …+ (ann + bnn)
= (a11 + a22 + … + ann) + (b11 + b22 + … + bnn)
= tr(A) + tr(B).
Ch2_43
Example of (2) tr(AB)=tr(BA)
3
1
 3 2  1


A 2
0 , B  


1
0
1


 1  2
2
2
0
 8 11 


AB   6
4  2, BA  


2

5


 1  2  1
tr ( AB)  3  tr ( BA)
Ch2_44
Matrices with Complex Elements
The element of a matrix may be complex numbers. A complex
number is of the form
z = a + bi
Where a and b are real numbers and i   1.
a is called the real part and b the imaginary part (虛部) of z.
The conjugate (共軛複數) of a complex number z = a + bi is
defined and written z = a  bi.
Ch2_45
Example 7
2i .
Let A  2  i 3  2i  and B   3
5i 
 4
1  i 2  3i 
Compute A + B, 2A, and AB.
Solution
2i  2  i  3 3  2i  2i  5  i
3
2  i 3  2i  3
A B  







4
5
i
1

i
2

3
i
4

1

i
5
i

2

3
i
5

i
2

8
i

 
 
 

2  i 3  2i  4  2i 6  4i 
2 A  2



4
5
i
8
10
i

 

2i 
2  i 3  2i   3
AB  
 1  i 2  3i 
4
5
i



10  9i 
(2  i)3  (3  2i)(1  i) (2  i)(2i)  (3  2i)(2  3i) 11 4i



(
4
)(
3
)

(
5
i
)(
1

i
)
4
(
2
i
)

(
5
i
)(
2

3
i
)
7

5
i

15

18
i


 
Ch2_46
Definition
(i) The conjugate of a matrix A is denoted A and is obtained by
taking the conjugate of each element of the matrix.
(ii) The conjugate transpose of A is written and defined by A*=A t.
(iii) A square matrix C is said to be hermitian if C=C*.
Example (i), (ii)
2  3i 1  4i 
t
2  3i 1  4i  *
2  3i 6 
A
A
A A 



7i 
6

7
i
1

4
i

7
i
 6




Example (iii)
3  4i 
 2
*
C

C

3

4
i
6


隨堂作業:23
Ch2_47
Homework
Exercise 2.3:
2, 5, 11, 15, 23
Exercise 11
A matrix A is said to be antisymmetric if A = At.
(a) give an example of an antisymmetric matrix.
(b) Prove that an antisymmetric matrix is a square matrix having
diagonal elements zero.
(c) Prove that the sum of two antisymmetric matrices of the same
size is an antisymmetric matrix.
Ch2_48
2.4 The Inverse of a Matrix
Definition
Let A be an n  n matrix. If a matrix B can be found such that AB
= BA = In, then A is said to be invertible (可逆) and B is called the
inverse (反矩陣) of A. If such a matrix B does not exist, then A has
no inverse. (denote B = A1, and Ak=(A1)k )
Example 1
 2 1 
Prove that the matrix A   1 2 has inverse B   3  1 .
3 4
 2
2 
Proof
1
 2
AB  1 2  3  1    1 0  I 2
3 4  2
0 1
2
1 1 2  1 0
 2
BA   3  1 

 I2
3
4
0
1




 

2
 2
Thus AB = BA = I2, proving that the matrix A has inverse B.
Ch2_49
Theorem 2.7
If a matrix has an inverse, that inverse is unique.
Proof
Let B and C be inverses of A.
Thus AB = BA = In, and AC = CA = In.
Multiply both sides of the equation AB = In by C.
C(AB) = CIn
Thm2.2 乘法結合律
(CA)B = C
InB = C
B=C
Thus an invertible matrix has only one inverse.
Ch2_50
Let A be an invertible nn matrix
How to find A-1?
Let A1  X1
X 2  X n , I n  C1 C2  Cn .
We shall find A1 by finding X1, X2, …, Xn.
Since AA1 =In, then AX1
X 2  X n   C1 C2  Cn .
i.e., AX1  C1, AX2  C2 ,, AXn  Cn .
Solve these systems by using Gauss-Jordan elimination:
augmented matrix: A : C1 C2  Cn 
   I n : X1

X 2  X n .

A : I n     I n : A1 .
Note. 若是最後沒有變成 [In:B] 的形式,則 A1不存在。
Ch2_51
Gauss-Jordan Elimination for finding
the Inverse of a Matrix
Let A be an n  n matrix.
1. Adjoin the identity n  n matrix In to A to form the matrix
[A : In].
2. Compute the reduced echelon form of [A : In].
If the reduced echelon form is of the type [In : B], then B is
the inverse of A.
If the reduced echelon form is not of the type [In : B], in that
the first n  n submatrix is not In, then A has no inverse.
An n  n matrix A is invertible if and only if its reduced echelon
form is In.
Ch2_52
Example 2
 1  1  2
Determine the inverse of the matrix A   2  3  5
3
5
 1
Solution

1 0 0
 1 1  2
 1  1  2 1 0 0
[ A : I 3 ]   2  3  5 0 1 0 R2  (2) R10  1  1  2 1 0
3
1 0 1
3
5 0 0 1 R3  R1 0 2
 1
  1  1  2 1 0 0

3  1 0
 1 0 1
(1)R2 0
1
1 2  1 0 R1  R2 0 1 1
2  1 0
3 1 0 1 R3  (2)R2 0 0
0 2
1  3 2 1

0
1 01
1 0 0
R1  R3 0 1 0
5  3  1
R2  (1)R3 0 0 1  3
2
1
1 1
 0
1
Thus, A   5  3  1.
隨堂作業:4(a), 14
2
1
 3
Ch2_53
Example 3
Determine the inverse of the following matrix, if it exist.
 1 1 5
A   1 2 7
2  1 4
Solution

1
5
1 0 0
1
 1 1 5 1 0 0
1
2  1 1 0
[ A : I 3 ]   1 2 7 0 1 0 R2  (1)R1 0
2  1 4 0 0 1 R3  (2)R1 0  3  6  2 0 1

2  1 0
1 0 3
R1  (1)R2 0 1 2  1 1 0
R3  3R2 0 0 0  5 3 1
There is no need to proceed further.
The reduced echelon form cannot have a one in the (3, 3) location.
The reduced echelon form cannot be of the form [In : B].
Thus A–1 does not exist.
隨堂作業:4(c)
Ch2_54
Properties of Matrix Inverse
Let A and B be invertible matrices and c a nonzero scalar, Then
1. ( A1 ) 1  A
1 1
1
2. (cA)  A
c 1 1
1
3. ( AB )  B A
4. ( An ) 1  ( A1 ) n
5. ( At ) 1  ( A1 )t
Proof
1. By definition, AA1=A1A=I.
2. (cA)(1c A1 )  I  ( 1c A1 )(cA)
3. ( AB)(B1 A1 )  A( BB1 ) A1  AA1  I  ( B1 A1 )( AB)
1
1
1 n n
4. An ( A1 ) n  
A

A 
A

A

I

(
A
) A


n times
n times
5. AA1  I , ( AA1 )t  ( A1 )t At  I ,
A1 A  I , ( A1 A)t  At ( A1 )t  I ,
Ch2_55
Example 4
If A  4 1, then it can be shown that A1   1  1. Use this
 3 1
 3 4
informatio n to compute ( At ) 1.
Solution
t
1 1
1 3


(A )  (A )  

.
3 4 1 4
t 1
1 t
隨堂作業:15,19
Ch2_56
Theorem 2.8
Let AX = Y be a system of n linear equations in n variables.
If A–1 exists, the solution is unique and is given by X = A–1Y.
Proof
(X = A–1Y is a solution.)
Substitute X = A–1Y into the matrix equation.
AX = A(A–1Y) = (AA–1)Y = InY = Y.
(The solution is unique.)
Let X1 be any solution, thus AX1 = Y. Multiplying both sides of
this equation by A–1 gives
A–1AX1= A–1Y
InX1 = A–1Y
X1 = A–1Y.
Ch2_57
Example 5
x1  x2  2 x3  1
Solve the system of equations 2 x1  3x2  5 x3  3
 x1  3x2  5 x3  2
Solution
This system can be written in the following matrix form:
 1  1  2  x1   1
 2  3  5  x2    3
3
5  x3   2
 1
If the matrix of coefficients is invertible, the unique solution is
1
 x1   1  1  2  1
 x2    2  3  5  3
 x   1
3
5  2
 3
This inverse has already been found in Example 2. We get
 x1   0
1 1  1  1
 x2    5  3  1  3   2
 x   3
2
1  2  1
 3
The unique solution is x1  1, x2  2, x3  1.
Ch2_58
Elementary Matrices
Definition
An elementary matrix is one that can be obtained from the
identity matrix In through a single elementary row operation.
Example
1 0 0 
I 3  0 1 0
0 0 1
R2  R3
5R2
R2+ 2R1
1 0 0 
E1  0 0 1
0 1 0
1 0 0 
E2  0 5 0
0 0 1 
1 0 0 
E3  2 1 0
0 0 1 
Ch2_59
Elementary Matrices
一個矩陣做 elementary row operation,
相當於在左邊乘一個對應的 elementary matrix。
a
g
R2  R3

d
a
A   d
 g
b
e
h
c
f 
i 
5R2
a
5d

 g
c  1 0 0
i   0 0 1  A  E1 A
f  0 1 0
b
h
e
c  1 0 0
5e 5 f   0 5 0  A  E2 A
h
i  0 0 1
b
b
 a
d  2a e  2b
R2+ 2R1 
 g
h
 1 0 0 
f  2c   2 1 0  A  E3 A
i  0 0 1
c
Ch2_60
Notes for elementary matrices
Each elementary matrix is square and invertible.
Example
I  E1  E1  I , i.e., E2 E1  I
R1 2 R 2
1 0 0 
I  0 1 0
0 0 1
R1 2 R 2
1 2 0 
E1  0 1 0
0 0 1 
1  2 0 
E2  0 1 0
0 0 1 
If A and B are row equivalent matrices and A is
invertible, then B is invertible.
Proof
If A  …  B, then
B=En … E2 E1 A for some elementary matrices En, … , E2 and E1.
So B1 = (En … E2 E1A)1 =A1E11 E21 … En1.
Ch2_61
Homework
Exercise 2.4:
4, 7, 14, 15, 19, 21, 28
(後面的 section 2.5~2.7 都跳過)
Exercise 7
 d  b
1
1
a b 
.
If A  
, show that A 



(ad  bc)  c a 
c d 
(求22之反矩陣,此公式較快)
Ch2_62
Homework
Exercise 21
Prove that (AtBt)1 = (A1B1)t.
Exercise 28
True or False:
(a) If A is invertible A1 is invertible.
(b) If A is invertible A2 is invertible.
(c) If A has a zero on the main diagonal it is not invertible.
(d) If A is not invertible then AB is not invertible.
(e) A1 is row equivalent to In.
Ch2_63
2.5 Matrix Transformations,
Rotations, and Dilations
A function, or transformation, is a rule that assigns to each
element of a set a unique element of another set.
We will be especially interested in linear transformations, which
are transformations that preserve the mathematical structure of a
vector space.
Consider the function f(x) =3x2+4.
domain (定義域) of the function: the set of all possible x
f(2)=16, we say that the image of 2 is 16.
Extend these ideas to functions between vector spaces
We usually use the term transformation rather than function in
linear algebra.
Ch2_64
Consider the transformation T maps R3 into R2 defined by
T(x, y, z) = (2x, yz)
The domain of T is R3 and we say the codomain (對應域) is R2.
T(1, 4, 2) = (2, 6)  The image of (1, 4, 2) is (2, 6).
Convenient representations:
  x 
T   y     2 x  , and the image of
  z    y  z 
 
1 2
 4  is 6.
 2  
Ch2_65
Definition
A transformation T of Rn into Rm is a rule that assigns to each
vector u in Rn a unique vector v in Rm. Rn is called the domain of
T and Rm is the codomain. We write T(u) = v; v is the image of u
under T. The term mapping is also used for a transformation.
Ch2_66
Dilation(擴張) and Contraction(收縮)
Consider the transformation T   x    r  x  , where r > 0.
  y  
 y 
This equation can be written as the following useful matrix form.
T   x     r 0  x 
  y   0 r   y 
Figure 2.11
Ch2_67
Reflection(反射)
Consider the transformation T   x     x  . T is called a reflection.
  y  
 y 
This equation can be written as the following useful matrix form.
T   x    1 0   x 
  y   0  1  y 
Figure 2.12
Ch2_68
Matrix transformations
Every matrix defines a transformation. Let A be a matrix and x be
a column vector such that Ax exists. Then A defines the matrix
transformation T(x) = Ax.
  x 
For example, A  5 3  2 defines T   y    50
0 4  1
  z  
 
 1 
  3 
6




 1   14 , written as
 T  3  8
T
and
 4   
 2   2 
 
 
1
 
, written as 3  6
4 8
隨堂作業:1
 x
3  2  y 
4  1   
z
 3
14
1   2 
2  
Figure 2.14 Matrix transformations.
Ch2_69
Definition
Let A be an mn matrix. Let x be an element of Rn written in a
column matrix form. A defines a matrix transformation T(x)=Ax
of Rn into Rm. The vector Ax is the image of x. The domain of the
transformation is Rn and codomain is Rm.
We write T: Rn  Rm if T maps Rn into Rm.
Geometrical Properties:
Matrix transformations maps line segments (線段) into line
segments (or points). If the matrix is invertible (可逆) the
transformation also maps parallel lines into parallel lines.
Ch2_70
Example 1
Consider the transformation T: R2  R2 defined by the matrix
4 2
. Determine the image of the unit square under this
A

2 3
transformation.
Sol.
The unit square is the square whose vertices are the points
1 1 0 0
P   , Q  , R  , O  
0 1 1 0
Since
4 2 1 4
2 3 0  2,

   
4 2 1 6
2 3 1  5,

   
4 2 0 2
2 3 1  3

   
Ch2_71
The images are:
P
P'
1 4
0  2,
   
Q
Q'
R
R'
O
O
1 6 0 2 0 0
1  5, 1  3, 0  0
          
Figure 2.15
The square PQRO is mapped into the parallelogram P’Q’R’O.
Ch2_72
Composition(合成) of Transformations
Consider the matrix transformations T1(x)=A1x and T2(x)=A2x.
The composite transformation T=T2  T1 is given by
T(x) = T2(T1(x)) = T2 (A1x) =A2A1x
Thus T is defined by the matrix product A2A1.
T(x) = A2A1x
Figure 2.16
隨堂作業:10(a)
Ch2_73
Homework
Exercise 2.5:
1, 10
Ch2_74
2.6 Linear Transformations
A vector space has two operations: addition and scalar multiplication.
Consider the matrix transformation T(u)=Au.
T(u+v) = A(u+v) = Au+Av = T(u)+T(v)
u+v
v
T(v)
T
u
T(u+v) = T(u)+T(v)
T(u)
T(cu) = A(cu) = cAu = cT(u)
u
cu
T
T(cu) = cT(u)
T(u)
Definition
Let u and v be vectors in Rn and let c be a scalar. A transformation
T: Rn → Rm is said to be a linear transformation if
T(u + v) = T(u) + T(v) and T(cu) = cT(u).
Ch2_75
Example 1
Prove that the following transformation T: R2 → R2 is linear.
T(x, y) = (x  y, 3x)
Solution
“+”: Let (x1, y1) and (x2, y2)  R2. Then
T((x1, y1) + (x2, y2)) = T(x1 + x2, y1 + y2)
= (x1 + x2  y1  y2, 3x1 + 3x2)
= (x1  y1, 3x1) + (x2  y2, 3x2)
= T(x1, y1) + T(x2, y2)
“”: Let c be a scalar.
T(c(x1, y1)) = T(cx1, cy1) = (cx1  cy1, 3cx1)
= c(x1  y1, 3x1)
= cT(x1, y1)
Thus T is linear.
隨堂作業:1
Note A linear transformation T: U → U is called a linear operator.
Ch2_76
Example 2
Show that the following transformation T: R3 → R2 is not linear.
T(x, y, z) = (xy, z)
Solution
“+”: Let (x1, y1, z1) and (x2, y2, z2)  R3. Then
T((x1, y1, z1) + (x2, y2, z2))
= T(x1 + x2 , y1 + y2 , z1 + z2)
= ((x1 + x2)(y1  y2), z1 + z2)
and T(x1, y1, z1) + T(x2, y2, z2) = (x1y1, z1) + (x2y2, z2)
Thus, in general
T((x1, y1, z1) + (x2, y2, z2))  T(x1, y1, z1) + T(x2, y2, z2).
T is not linear.
隨堂作業:4(b)
Ch2_77
Example 3
Determine a matrix A that describes the linear transformation
2x  y
x



T( )  
 y   3 y 
Solution
It can be shown that T is linear. The domain of T is R2.
We find the effect of T on the standard basis of R2.
T ( 1)  2
0 0

and
T ( 0)  1
1 3
A  2 1
0 3
Why? See the next page.
T can be written as
T (  x )  2 1  x 
 y  0 3  y 
Ch2_78
Matrix Representation
Let T: Rn → Rm be a linear transformation. {e1, e2, …, en} be the
standard basis of Rn, and u be an arbitrary vector in Rn.
1 
0 
 a1 
e1     ,  , e n     u    
0
1
an 
Express u in terms of the basis, u = a1e1+a2e2+ … + anen.
Since T is a linear transformation,
T(u) = T(a1e1+ a2e2 + … + anen) = T(a1e1) + T(a2e2) + …+ T(anen)
= a1T(e1) + a2T(e2) + …+ anT(en)
 a1 
 [T (e1 ) T (e 2 )  T (e n )]  
an 
Ch2_79
Thus the linear transformation T is defined by the matrix
A = [ T(e1) … T(en) ].
A is called the standard matrix of T.
Ch2_80
Example 4
The transformation T (  x )  2 x  y  defines a reflection in the
 y   3 y 
line y = x.
It can be shown that T is linear. Determine the standard matrix of
this transformation. Find the image of  4 .
1 
Solution
We find the effect of T on the standard basis.
T ( 1)   0 
0  1
and T ( 0)   1
1
 0 
 1
 1 0 
 A 0
T can be written as
T (  x )   0  1  x 
 y   1 0   y 
T ( 4)   0  1 4    1
1  1 0  1  4
Ch2_81
Figure 2.22
隨堂作業:12
Ch2_82
Homework
Exercise 2.6:
1, 4, 12
(2.7~2.9節跳過)
Ch2_83