linear algebra - national chiao tung universityyi/courses...linear algebra linear transformations...
TRANSCRIPT
Linear Algebra
Linear Algebra
Chih-Wei Yi
Dept. of Computer ScienceNational Chiao Tung University
November 11, 2009
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Section 1 De�nition and Examples
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
De�nition
V and W are vector spaces. A function L : V!W is called alinear transformation if L (au+ bv) = aL (u) + bL (v) for anyscalars a, b and vectors u, v 2 V.
Examples
Let L��
xy
��= [x ]. We have
L�a�u1u2
�+ b
�v1v2
��= L
��au1 + bv1au2 + bv2
��= [au1 + bv1]
and
aL��
u1u2
��+ bL
��v1v2
��= a [u1] + b [v1] = [au1 + bv1] .
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Example
Let L ([x ]) =�x2x
�. We have
L (a [u] + b [v ]) = L ([au + bv ]) =�au + bv2au + 2bv
�and
aL ([u]) + bL ([v ]) = a�u2u
�+ b
�v2v
�=
�au + bv2au + 2bv
�.
Problem
Is L([x ]) = [x + 1] a linear transformation?
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Problem
Is L��
xy
��=
�cos θ � sin θsin θ cos θ
� �xy
�=
�x cos θ � y sin θx sin θ + y cos θ
�a linear transformation?
Problem
Prove that the di¤erential operation is a linear transformation inthe vector space C1 [a, b].
Problem
Prove that if L : V!W is a linear transformation, thenL (0) = 0. (Note: the �rst 0 is the zero vector in V and thesecond 0 is the zero vector in W. If necessary, we use 0V to denotethe zero vector in V.)
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Kernel and Range
De�nition (Kernel and Range)
If L : V!W is a linear transformation, then
kernel (L) = fv 2 V : L (v) = 0wg is called the kernel of L.range (L) = fw 2W : w = L (v) for some v 2 Vg is calledthe range of L.
Note: For any S � V,L (S) = fw 2W : w = L (v) for some v 2 Sg is called the imageof S.
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Theorem
If L : V!W is a linear transformation, then
kernel (L) is a subspace of V.range (L) is a subspace of W.
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Example
Let A is a 2� 3 matrix and v 2 R3.
1 Prove that L (v) = Av is a linear transformation form R3 toR2.
2 Find the kernel and range of L for A =�1 2 3�2 5 4
�.
Solution (1)
We have
L (au+ bv) = A (au+ bv) = A (au) +A (bv)= a (Au) + b (Av)= aL (u) + bL (v) .
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Solution (How to �nd the kernel of A)
Solve the homogeneous linear system
�1 2 3�2 5 4
� 24 x1x2x3
35 = � 00
�.
By Gauss-Jordan elimination, we have�1 2 3�2 5 4
�!�1 2 30 9 10
�!�1 2 30 1 10
9
�!�1 0 7
90 1 10
9
�.
Let x3 = s. Then, x1 = � 79 s and x1 = �
109 s. Therefore,24 x1
x2x3
35 =24 � 7
9 s� 10
9 ss
35 = s24 � 7
9� 10
91
35 .
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Solution (How to �nd the range of A)
The range of A is span��
1�2
�,
�25
�,
�34
��. Applying
elementary column operations,�1 2 3�2 5 4
�!
�1 0 0�2 9 10
�!�1 0 0�2 1 10
�!
�1 0 00 1 0
�.
So,
span��
1�2
�,
�25
�,
�34
��= span
��10
�,
�01
��= R2.
Linear Algebra
Linear Transformations
Section 1 De�nition and Examples
Exercise
Problem
Prove that if A is an m� n matrix, then1 L (v) = Av is a linear transformation form Rn to Rm .
2 dim (kernel (A)) + dim (range (A)) = n.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Section 2 Matrix Representations of LinearTransformations
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Matrix Representations of Linear Transformations
Theorem
Assume V and W are respectively n and m dimension vectorspaces, and B1 = fv1, v2, � � � , vng and B2 = fw1,w2, � � � ,wmgare respectively bases of V and W. If L : V!W is a lineartransformation, then [L (v)]B2 = A [v]B1 with aj = [L (vj )]B2 forj = 1, 2, � � � , n, and A is called a matrix representation of L w.r.t.ordered bases B1 and B2.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Proof.
Assuem [v]B1 =
26664c1c2...cn
37775. In other words,v = c1v1 + c2v2 + � � �+ cnvn.
[L (v)]B2 = [L (c1v1 + c2v2 + � � �+ cnvn)]B2= [c1L (v1) + c2L (v2) + � � �+ cnL (vn)]B2= c1 [L (v1)]B2+ c2 [L (v2)]B2 + � � �+ cn [L (vn)]B2= c1a1 + c2a2 + � � �+ cnan= A [v]B1 .
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Example
Consider the linear transformation L��
xy
��=
�2x + 3y4x � 5y
�.
We have
L (e1) = L��
10
��=
�24
�= 2e1 + 4e2,
L (e2) = L��
01
��=
�3�5
�= 3e1 � 5e2.
Hence,
L��
xy
��=
�2 34 �5
� �xy
�.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Example
Let D : a2x2 + a1x + a0 ! 2a2x + a1 denote the di¤erentialoperation from P2 to P1, and B1 =
�x2, x , 1
and B2 = fx , 1g.
Then,
D
0B@24 100
35B1
1CA = D�x2�= 2x =
�20
�B2
;
D
0B@24 010
35B1
1CA = D (x) = 1 =�01
�B2
;
D
0B@24 001
35B1
1CA = D (1) = 0 =�00
�B2
.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Example (Cont.)
So,
A =�2 0 00 1 0
�= DB1 :B2 .
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Example
Consider the linear transformation L��
xy
��=
24 2x � 2y3x + 4y�7x
35.We have
L (e1) = L��
10
��=
24 23�7
35 = 2e1 + 3e2 + (�7) e3,L (e2) = L
��01
��=
24 �240
35 = (�2) e1 + 4e2 + 0e3.Hence,
L��
xy
��=
24 2 �23 4�7 0
35 � xy
�.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Matrix Representation on Non-Standard Bases
Let L��
xy
��=
24 2x � 2y3x + 4y�7x
35, B1 = fe1, e2g, andB2 =
8<:24 1�10
35 ,24 010
35 ,24 1
0�1
359=;. Then,
L (e1) = L��
10
��=
24 23�7
35= �5
24 1�10
35� 224 010
35+ 724 1
0�1
35 =24 �5�2
7
35B2
,
and
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Matrix Representation on Non-Standard Bases
(Cont.)
L (e2) = L��
01
��=
24 �240
35= �2
24 1�10
35+ 224 010
35+ 024 1
0�1
35 =24 �22
0
35B2
.
Hence, �L��
xy
���B2
=
24 �5 �2�2 27 0
35B1 :B2
�xy
�B1
.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Matrix Representation on Non-Standard Bases
Let L��
xy
��=
24 2x � 2y3x + 4y�7x
35, B3 = �� 11�,
��11
��, and
B4 = fe1, e2, e3g. Then,
L��
11
��=
24 07�7
35 = 0e1 + 7e2 � 7e3;L��
�11
��=
24 �417
35 = �4e1 + e2 + 7e3.Hence, �
L��
xy
���B4
=
24 0 �47 1�7 7
35B3 :B4
�xy
�B3
.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Matrix Representation on Non-Standard Bases
Let L��
xy
��=
24 2x � 2y3x + 4y�7x
35, B3 = �� 11�,
��11
��, and
B2 =
8<:24 1�10
35 ,24 010
35 ,24 1
0�1
359=;. Then,
L��
11
��=
24 07�7
35 = �724 1�10
35+ 024 010
35+ 724 1
0�1
35 ;L��
�11
��=
24 �417
35 = 324 1�10
35+ 424 010
35� 724 1
0�1
35 .
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Matrix Representation on Non-Standard Bases
(Cont.)Hence,
�L��
xy
���B2
=
24 �7 30 47 �7
35B3 :B2
�xy
�B3
.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Matrix Representation on Non-Standard Bases
Verify the following equality for the linear transformation L.24 �7 30 47 �7
35B3 :B2
=
0B@24 1 0 1�1 1 00 0 �1
35B2!B4
1CA�1 24 2 �2
3 4�7 0
35B1 :B4
�1 �11 1
�B3!B1
.
Here
0B@24 1 0 1�1 1 00 0 �1
35B2!B4
1CA�1
is the transition matrix
B4 ! B2.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Flow Chart
TB3!B1TB1!B3 = I; TB1!B3TB3!B1 = I; TB2!B4TB4!B2 = I;TB4!B2TB2!B4 = I.LB1 :B2 = TB4!B2LB3 :B4TB1!B3 ;LB3 :B4 = TB2!B4LB1 :B2TB3!B1 .LB1 :B4 = LB3 :B4TB1!B3 ; LB3 :B2 = LB1 :B2TB3!B1 .
LB1:B2
LB3:B4
TB3→B1TB1→B3
[v]B3
[v]B1 [L(v)]B2
[L(v)]B4
TB4→B2TB2→B4
LB3:B2
LB1:B4
V WLB1:B2
LB3:B4
TB3→B1TB1→B3
[v]B3
[v]B1 [L(v)]B2
[L(v)]B4
TB4→B2TB2→B4
LB3:B2
LB1:B4
V W
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Composition of Linear Transformations
Theorem
U, V, and W are vector spaces. B1, B2, and B3 are bases of U, V,and W, respectively. L1 : U! V and L2 : V!W are lineartransformations. Let A be the matrix representation of L1 w.r.t.B1 and B2, and B be the matrix representation of L2 w.r.t B2 andB3. Then,
L2 � L1 is a linear transformation.The matrix representation of L2 � L1 w.r.t. B1 and B3 is BA.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
2D Image Processing
Many image processing techniques can be implemented bylinear transformations, e.g.
Dilations and contractionsRe�ectionsRotationsTranslations 1
1O¢ cially, translations are not linear transformations.
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Dilations and Contractions
The transitionmatrices of dilationsand contractions:
T =�c1 00 c2
�
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Re�ections
The transitionmatrices ofre�ections:
T =��1 00 �1
�
Linear Algebra
Linear Transformations
Section 2 Matrix Representations of Linear Transformations
Rotations and Translations
The transition matrices ofrotations and translations:
TT =
�c1 00 c2
�+
�x0y0
�TR =
�cos θ � sin θsin θ cos θ
�.
Linear Algebra
Linear Transformations
Section 3 Similarity
Section 3 Similarity
Linear Algebra
Linear Transformations
Section 3 Similarity
De�nition (Similarity)
A and B are n� n matrices. We say B is similar to A if thereexists a nonsingular matrix S such that B = S�1AS.
Example
Let A =�2 01 1
�, B =
�2 �10 1
�, and U =
�1 �11 1
�. We
have U�1 =� 1
212
� 12
12
�and
B = U�1AU.
Linear Algebra
Linear Transformations
Section 3 Similarity
Linear Transformations and Transition Matrices
Theorem
V is a n dimension vector space, and L : V! V is a lineartransformation. B1 and B2 are bases of V, and S is a transitionmatrix from B1 to B2. Let A be the matrix representation of Lw.r.t. B2, and B be the matrix representation of L w.r.t. B1.Then, we have B = S�1AS.
Linear Algebra
Linear Transformations
Section 3 Similarity
Example
Let D be the di¤erential operation on P3. Let A and Brespectively denote the matrices representation of D w.r.t. basesB1 =
�x3, x2, x , 1
and B2 =
�(2x � 1)3, (2x � 1)2, 2x � 1, 1
.
Find A, B, and transition matrices for B1 ! B2 and B2 ! B1, andverify the similarity of A and B.
Solution
We have
D
0BBB@26641000
3775B1
1CCCA = D�x3�= 3x2 =
26640300
3775B1
,
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont.)
D
0BBB@26640100
3775B1
1CCCA = D�x2�= 2x =
26640020
3775B1
,
D
0BBB@26640010
3775B1
1CCCA = D (x) = 1 =
26640001
3775B1
,
D
0BBB@26640001
3775B1
1CCCA = D (1) = 0 =
26640000
3775B1
.
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont.)
So,
DB1 :B1 =
26640 0 0 03 0 0 00 2 0 00 0 1 0
3775 .
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont.)
D
0BBB@26641000
3775B2
1CCCA = D�(2x � 1)3
�= 6(2x � 1)2 =
26640600
3775B2
,
D
0BBB@26640100
3775B2
1CCCA = D�(2x � 1)2
�= 4(2x � 1) =
26640040
3775B2
,
D
0BBB@26640010
3775B2
1CCCA = D (2x � 1) = 2 =
26640002
3775B2
.
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont.)
D
0BBB@26640001
3775B2
1CCCA = D (1) = 0 =
26640000
3775B2
.
So,
DB2 :B2 =
26640 0 0 06 0 0 00 4 0 00 0 2 0
3775 .
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont. (transition matrix TB2!B1))
26641000
3775B2
= (2x � 1)3 = 8x3 � 12x2 + 6x � 1 =
26648�126�1
3775B1
;
26640100
3775B2
= (2x � 1)2 = 4x2 � 4x + 1 =
266404�41
3775B1
;
26640010
3775B2
= 2x � 1 =
2664002�1
3775B1
;
26640001
3775B2
= 1 =
26640001
3775B1
.
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont. (transition matrix TB2!B1))
TB2!B1 =
26648 0 0 0�12 4 0 06 �4 2 0�1 1 �1 1
3775 .
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont. (transition matrix TB1!B2))
26641000
3775B1
= x3 =18(2x � 1)3 + 3
8(2x � 1)2 + 3
8(2x � 1) + 1
8
=
266418383818
3775B2
;
26640100
3775B1
= x2 =14(2x � 1)2 + 1
2(2x � 1)� 1
4=
266401412� 14
3775B2
;
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont. (transition matrix TB1!B2))
26640010
3775B1
= x =12(2x � 1) + 1
2=
2664001212
3775B2
;
26640001
3775B1
= 1 =
26640001
3775B2
.
Linear Algebra
Linear Transformations
Section 3 Similarity
Solution (Cont. (transition matrix TB1!B2))
So,
TB1!B2 =
266418 0 0 038
14 0 0
38
12
12 0
18 � 1
412 1
3775 . (Note: TB2!B1TB1!B2 = I;TB1!B2TB2!B1 = I.
Linear Algebra
Linear Transformations
Section 3 Similarity
Flow Chart
TB2!B1TB1!B2 = I; TB1!B2TB2!B1 = I.LB1 :B1 = TB2!B1LB2 :B2TB1!B2 ;LB2 :B2 = TB1!B2LB1 :B1TB2!B1 .
LB2 :B1 = LB1 :B1TB2!B1 ; LB1 :B2 = LB2 :B2TB1!B2 .
LB1:B1
LB2:B2
TB2→B1TB1→B2
[v]B2
[v]B1 [L(v)]B1
[L(v)]B2
TB2→B1TB1→B2
LB2:B1
LB1:B2
LB1:B1
LB2:B2
TB2→B1TB1→B2
[v]B2
[v]B1 [L(v)]B1
[L(v)]B2
TB2→B1TB1→B2
LB2:B1
LB1:B2