En 1-4 Linear Transformations - Last Update 02-10-2024
En 1-4 Linear Transformations - Last Update 02-10-2024
Chapter 1
VECTORS AND MATRICES
LINEAR ALGEBRA WITH PROGRAMMING
Idea
Seeing matrices as “functions”…
𝒙 𝑨𝒙
ℝ𝑛 - Domain ℝ𝑚 - Codomain
Linear transformation
4
Example −1 2
Consider the linear transformation 𝑇: ℝ2 ⟶ ℝ3 with transformation matrix 𝐴 𝑇 = 1 2 .
0 5
• The kernel of 𝑇, denoted by Ker(𝑇), is the set of vectors in ℝ𝑛 which are mapped
onto 0𝑚×1 through 𝑇,
Ker 𝑇 = 𝒙 ∈ ℝ𝑛 : 𝑇 𝒙 = 0𝑚×1 ⊆ ℝ𝑛 ;
6
Example
How can we find the transformation matrix of the linear transformation 𝑇: ℝ3 ⟶ ℝ2 defined by
𝑥 𝑥1
𝑥 − 3𝑥2 1 −3 0 𝑥1
𝑇 𝑥1 , 𝑥2 , 𝑥3 = 𝑥1 − 3𝑥2 , 2𝑥2 − 4𝑥3 = 1 = 2 = 𝐴 𝑇 𝑥2
2𝑥2 − 4𝑥3 0 2 −4 𝑥 𝑥3
3
1 −3 0
∴ 𝐴𝑇 =
0 2 −4
Notice that:
1 1 0 −3 0 0
𝑇 0 = , 𝑇 1 = , 𝑇 0 =
0 0 0 2 −4
1
7
Proposition
8
Remark
If 𝑇: ℝ𝑛 ⟶ ℝ𝑚 is a linear transformation, notice that:
𝑥1 1 0 0 1 0 0
𝑥2 0 +𝑥 1 + ⋯+ 𝑥 0 0 +𝑥 𝐴 1 + ⋯+ 𝑥 𝐴 0
𝑇 𝒙 = 𝐴𝑇 ⋮ = 𝐴 𝑇 𝑥1 2 𝑛 = 𝑥1 𝐴 𝑇 2 𝑇 𝑛 𝑇
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑥𝑛 0 0 1 0 0 1
9
Proposition
10
Example
Consider 𝑇: ℝ3 → ℝ3 , such that 𝑇 𝑥, 𝑦, 𝑧 = 2𝑦, 𝑥, −𝑧 , ∀(𝑥, 𝑦, 𝑧) ∈ ℝ3 .
We have
𝑇 1,0,0 = 0,1,0 ; 𝑇 0,1,0 = 2,0,0 ; 𝑇(0,0,1) = (0,0, −1).
Then
0 2 0
𝐴𝑇 = 1 0 0 .
0 0 −1
Notice that, for example,
0 2 0 2 8 4 0 2 0 1
𝑇 2,4, −6 = 1 0 0 4 = 2 =2 1 =2 1 0 0 2 = 2𝑇 1,2, −3
0 0 −1 −6 6 3 0 0 −1 −3
or, for example,
0 2 0 2 8 0 8 0 2 0 2 0 2 0 0
𝑇 2,4, −6 = 1 0 0 4 = 2 = 2 + 0 = 1 0 0 0 + 1 0 0 4
0 0 −1 −6 6 0 6 0 0 −1 0 0 0 −1 −6
= 𝑇 2,0,0 + 𝑇 0,4, −6
11
Proposition
12
Example
Let 𝑇: ℝ3 → ℝ3 defined by 𝑇(𝑥, 𝑦, 𝑧) = (𝑦 + 𝑧, 2𝑥, 4𝑧) for all (𝑥, 𝑦, 𝑧) ∈ ℝ3 .
1
0 0
−1 2
0 1 1 0 1 1 1
𝐴𝑇 = 2 0 0 ⟹ 𝐴 𝑇 −1 = 2 0 0 = 1 0 − .
0 0 4 0 0 4 4
1
0 0
4
13
Proposition
𝐴 𝑇2 ∘ 𝑇1 = 𝐴 𝑇2 𝐴 𝑇1 .
14
CHALLENGE
Define on Python the linear transformation 𝑇 of the
previous example and check the image through 𝑇 of
the vector (23,477,100).
Exercises
1.4.1 Find the transformation matrices of the linear transformations defined below.
a) 𝑇: ℝ3 → ℝ2 , 𝑇 𝑥1 , 𝑥2 , 𝑥3 = 𝑥1 − 5𝑥2 + 4𝑥3 , 𝑥2 − 6𝑥3
b) 𝑇: ℝ2 → ℝ4 , 𝑇 𝑥1 , 𝑥2 = 2𝑥2 − 3𝑥1 , 𝑥1 − 4𝑥2 , 0, 𝑥2
c) 𝑇: ℝ4 → ℝ4 , 𝑇 𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 = 0, 𝑥1 + 𝑥2 , 𝑥2 + 𝑥3 , 𝑥3 + 𝑥4
16
Exercises
1.4.3 Consider two linear transformations 𝑇: ℝ3 → ℝ3 and 𝐺: ℝ3 → ℝ3 . It is known that
𝑇 1,1,0 = 1,0,1 , 𝑇 1,0,0 = 1,0,2 , 𝑇 0,1,1 = 0,1,0 and 𝐺 𝑥, 𝑦, 𝑧 = 𝑥, 2𝑥 + 𝑦 − 𝑧, 𝑦 .
a) Find 𝑇 0,1,0 .
b) Find 𝐴 𝑇 .
c) Is the 𝐺 the inverse of 𝑇?
17
Exercises
1.4.5 Let 𝑇: ℝ3 → ℝ3 and 𝑆: ℝ2 → ℝ3 be linear transformations, 𝑆 ∘ 𝑇 their composition,
−2 −1 3
𝑇 𝑥1 , 𝑥2 , 𝑥3 = 𝑥1 , 𝑥2 − 𝑥3 , 𝑥3 − 𝑥1 and 𝐴𝑆∘𝑇 = 1 −1 1 .
1 0 −1
a) Find the transformation matrix of 𝑇.
b) Find the transformation matrix of 𝑆.
18
Exercises
1.4.7 For 𝑘 ∈ ℝ, consider 𝑇: ℝ3 → ℝ3 , defined by 𝑇 𝑥, 𝑦, 𝑧 = −2𝑥 + 𝑦, 2𝑥 + 𝑦 + 𝑧𝑘, 𝑦 + 𝑘𝑧 .
a) Find the transformation matrix of 𝑇 as a function on 𝑘.
b) For which values of 𝑘 is 𝑇 invertible?
19
1.4.9 Carefully explain the output of the following programs. Exercises
i. A
ii. B
iii. C
20