MAT1041 · Week 10 · - Introduction to Linear Transformations
Introduction to linear transformations
You learn to test with two conditions whether a function is a linear transformation, matrix transformations, projection, reflection and rotation in the plane, abstract examples such as the derivative and trace, and how to compute a linear transformation from the images of a basis.
linear transformationmappingdomaincodomainimagepreimageadditivityhomogeneitymatrix transformationzero transformationidentity transformationprojectionreflectionrotationdifferential operator
So far we have studied vector spaces one at a time. This week we move to functions between spaces. Not every function is interesting: the functions linear algebra cares about are those that preserve addition and scalar multiplication. These are called linear transformations, and we will meet a surprising fact: every linear transformation from Rn to Rm is in fact multiplication by a matrix. All the remaining weeks (kernel, image, transformation matrix, eigenvalue) continue this idea.
Golden rules:
First test: is T(0)=0? If not, it is not linear, done.
If T(0)=0 it is not enough: prove the two conditions in general or find a counterexample.
If you can write it in the form T(x)=Ax, it is linear.
If the images of a basis are given, first write the vector in that basis, then use linearity.
Definition
Let V and W be vector spaces. A function T:V→W is a linear transformation if for all u,v∈V and all c∈R
T(u+v)=T(u)+T(v) (preserves addition),
T(cu)=cT(u) (preserves scalar multiplication).
V is the domain, W the codomain. T(v) is the image of v; all v with T(v)=w are the preimage of w.
The two conditions in one line: T(au+bv)=aT(u)+bT(v). A linear transformation sends linear combinations to linear combinations.
Immediate properties
T(0)=0 (take c=0).
T(−v)=−T(v), T(u−v)=T(u)−T(v).
T(c1v1+⋯+cnvn)=c1T(v1)+⋯+cnT(vn).
The first is the most useful elimination test: if T(0)=0, the transformation is not linear.
Example 2 (no). The translation T(x,y)=(x+2,y): T(0,0)=(2,0). Although shifting everything in the plane to the right looks geometrically “smooth”, it is not linear.
Transformation
Linear?
Reason
(x,y)↦(3x,x−y)
yes
combinations with constant coefficients
(x,y)↦(x+1,y)
no
T(0)=0
(x,y)↦(x2,y)
no
T(2e1)=(4,0)=2T(e1)
(x,y)↦(xy,x)
no
product; Q4
(x,y)↦(∣x∣,y)
no
T(−e1)=(1,0)=−T(e1)
p↦p′ (Pn→Pn−1)
yes
rules of differentiation
A↦AT
yes
(A+B)T=AT+BT
A↦trA
yes
the trace respects addition and scalars
A↦detA
no
det(2I)=4=2
PITFALL · “T(0) = 0, so it is linear”. This is only a necessary condition. (x,y)↦(xy,x) sends zero to zero but is not linear. Look for the counterexample in one of the two conditions.
Matrix transformations
If A is an m×n matrix, then
T(x)=Ax
is a linear transformation from Rn to Rm, because A(u+v)=Au+Av and A(cu)=cAu. Watch the sizes: the input space is determined by the number of columns of A.
Finding a preimage is solving a system: Ax=w. If there is no solution, the preimage of w is empty; if there are infinitely many, the preimage is a line or a plane.
Geometric transformations in the plane
Transformation
Matrix
Image of (3,5)
Projection onto the x-axis
[1000]
(3,0)
Reflection about the line y=x
[0110]
(5,3)
Reflection about the x-axis
[100−1]
(3,−5)
Rotation by θ
[cosθsinθ−sinθcosθ]
Dilation by a factor k
kI
(3k,5k)
A basis is enough
The most powerful property of a linear transformation: knowing the images of a basis is knowing everything. If {v1,…,vn} is a basis of V, every v is written uniquely as c1v1+⋯+cnvn and
T(v)=c1T(v1)+⋯+cnT(vn).
Example 4 (standard basis).T:R3→R2, T(e1)=(1,2), T(e2)=(0,−1), T(e3)=(4,1).
If you put these images side by side as columns you get the standard matrix of T: [120−141]. This is the topic of week 12.
If a nonstandard basis is given (Q8, Q12), first find the coefficients with a system. In Q12 we did this for a general (x,y) and obtained the formula for T.
Linear transformations in abstract spaces
DerivativeD:P3→P2, D(a+bx+cx2+dx3)=b+2cx+3dx2.
IntegralI:P2→R, I(p)=∫01p(x)dx.
TransposeT:Mm,n→Mn,m, T(A)=AT.
EvaluationT:P2→R, T(p)=p(3).
Zero transformationT(v)=0 and identity transformationT(v)=v.
The rule from calculus “the derivative of a sum is the sum of the derivatives” is really saying that the derivative is a linear transformation.
Common mistakes
Wrong
Right
Thinking T(0)=0 is sufficient
Necessary but not sufficient
“Proving” linearity with a single numerical example
Show it with general u,v,c
Writing the transformation of a 2×3 matrix as R2→R3
R3→R2 (input = number of columns)
Thinking translations and affine functions (x+1) are linear
A constant term breaks linearity
Using the images of a nonstandard basis as if they were the standard basis
First write the vector in that basis
Thinking det is linear
det(cA)=cndetA
Assuming the preimage is always a single point
It can be empty, a single point or infinite
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
Let T(x,y)=(x+2y,3x−y). Find T(2,−1).
Show answer
(0,7)
x=2, y=−1: (2+2(−1),3(2)−(−1))=(0,7).
Question 2easy
Is T:R2→R2, T(x,y)=(x+1,y) a linear transformation?
Show answer
No
A linear transformation must send zero to zero. T(0,0)=(1,0)=(0,0). This is a translation; adding a constant term breaks linearity.
Question 3medium
Is T:R3→R2, T(x,y,z)=(x−y,2z) a linear transformation?
Is T(x,y)=(xy,x) a linear transformation from R2 to R2?
Show answer
No
T(0,0)=(0,0), this test is passed but it is not enough.T(2(1,1))=T(2,2)=(4,2), but 2T(1,1)=2(1,1)=(2,2). Scalar multiplication is not preserved. If the variables are multiplied, it is not linear.
Question 5medium
Let T(v)=Av with A=[1−10321]. Find T(1,2,−1). What are the domain and codomain of T?
Show answer
(−1,4); T:R3→R2
A is 2×3: the input has 3 components, the output has 2. T:R3→R2.A(1,2,−1)T=(1+0−2,−1+6−1)=(−1,4).
Question 6medium
Let T(x,y)=(x+y,x−y). Find the preimage of w=(5,1).
Show answer
(3,2)
Preimage: all v with T(v)=w. x+y=5, x−y=1. Add: 2x=6, x=3, y=2. The preimage is a single point: {(3,2)}.
Question 7medium
T:R2→R2 is linear with T(1,0)=(2,3) and T(0,1)=(−1,4). Find T(3,−2).
T:R2→R3 is linear with T(1,1)=(1,0,2) and T(1,−1)=(3,2,0). Find T(5,1).
Show answer
(9,4,6)
First write (5,1) in the given basis: a(1,1)+b(1,−1)=(5,1), a+b=5, a−b=1, so a=3, b=2.T(5,1)=3T(1,1)+2T(1,−1)=(3,0,6)+(6,4,0)=(9,4,6).
Question 9medium
Let D:P2→P1 be differentiation, D(p)=p′. Find D(3−x+4x2). Is D linear?
Show answer
−1+8x; yes
(3−x+4x2)′=−1+8x. The rules of differentiation are exactly the linearity conditions: (p+q)′=p′+q′, (cp)′=cp′.
Question 10medium
Is T:M2,2→R, T(A)=detA a linear transformation?
Show answer
No
T(2I)=det(2I)=4, but 2T(I)=2. Also det(A+B)=detA+detB. In contrast, T(A)=trA and T(A)=AT are linear.
Question 11hard
Let T rotate vectors in R2 counterclockwise by 90∘. Find T(3,1).
Show answer
(−1,3)
The rotation matrix is [cosθsinθ−sinθcosθ], for θ=90∘: [01−10].T(x,y)=(−y,x), T(3,1)=(−1,3). Check: (3,1)⋅(−1,3)=0, perpendicular.
Question 12hard
T:R2→R2 is linear with T(1,2)=(3,−1) and T(2,5)=(1,1). Find a formula for T(x,y).
Show answer
T(x,y)=(13x−5y,−7x+3y)
(x,y)=a(1,2)+b(2,5): a+2b=x, 2a+5b=y. R2−2R1: b=y−2x, then a=x−2b=5x−2y.T(x,y)=(5x−2y)(3,−1)+(y−2x)(1,1)=(13x−5y,−7x+3y). Check: T(1,2)=(13−10,−7+6)=(3,−1).
Verification: The transformations that are linear were tested in node by checking the equalities T(u+v) = T(u)+T(v), T(cu) = cT(u) with 200 random integer vector pairs and scalars using BigInt fractions, and the nonlinear ones by computing a concrete counterexample; the images and preimages were found with exact matrix multiplication and exact solution (verify/MAT1041/10.mjs).
Review card
T: V → W is linear ⇔ (1) T(u+v) = T(u) + T(v) (2) T(cu) = cT(u)
in one line: T(au + bv) = aT(u) + bT(v)
Quick ELIMINATION: T(0) ≠ 0 → NOT linear. (T(0) = 0 alone is not enough!)
"No" signs: constant term (x+1), product (xy), square, |x|, sin, det.
"Yes" signs: every component is a sum of constant multiples of the variables → T(x) = Ax.
T(x) = Ax, A m×n → T: Rⁿ → Rᵐ (input = number of COLUMNS).
Image T(v); preimage: solve the system T(v) = w (none / one / infinitely many).
T is COMPLETELY determined by the images of a basis:
v = c1v1 + ... + cnvn → T(v) = c1T(v1) + ... + cnT(vn)
Plane: rotation by θ [cos -sin; sin cos], projection onto the x-axis [1 0; 0 0],
reflection about y=x [0 1; 1 0], reflection about the x-axis [1 0; 0 -1].
Abstract: derivative, integral, transpose, trace are LINEAR; det is NOT LINEAR.
T(-v) = -T(v), T(u - v) = T(u) - T(v).