Quiz 2

Linear Transformations: Definition & Properties

1861 words
9 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Linear Transformations: Definition & Properties ## 🎯 Learning Objectives After this topic you will be able to: - State the two defining properties of a linear transformation - Determine whether a given map is linear - Identify the standard matrix of a linear transformation from $\mathbb{R}^n$ to $\mathbb{R}^m$ -...

Linear Transformations: Definition & Properties

🎯 Learning Objectives

After this topic you will be able to:
  • State the two defining properties of a linear transformation
  • Determine whether a given map is linear
  • Identify the standard matrix of a linear transformation from Rn\mathbb{R}^n to Rm\mathbb{R}^m
  • Describe geometric transformations (rotation, reflection, scaling, shear) as linear maps
  • Prove basic properties of linear transformations

📋 Prerequisites

  • Vector Spaces (Week 3) — the domain and codomain are vector spaces
  • Matrix Multiplication (Week 1) — the computational representation of linear maps
  • Linear transformations are the functions of linear algebra — they move vectors between spaces while preserving structure

1. Intuition: Structure-Preserving Maps

1.1 What Makes a Map "Linear"?

Imagine a function f(x)=2xf(x) = 2x. It has two nice properties:
  • f(x+y)=2(x+y)=2x+2y=f(x)+f(y)f(x+y) = 2(x+y) = 2x + 2y = f(x) + f(y)
  • f(cx)=2(cx)=c(2x)=cf(x)f(cx) = 2(cx) = c(2x) = cf(x) These two properties — additivity and homogeneity — capture what it means to be linear. A linear transformation is a function between vector spaces that respects addition and scalar multiplication. It's the natural notion of "function" in the world of vector spaces. (Diagram)

1.2 Why This Matters

Linear transformations are simple yet powerful. Because they preserve the vector space structure, we can:
  • Understand them completely by examining a few vectors (basis vectors)
  • Represent them as matrices (once we choose bases)
  • Classify them by their kernel and image

2. Definition

Definition (Linear Transformation). A function T:VWT: V \to W between two vector spaces VV and WW (over R\mathbb{R}) is a linear transformation if:
  1. Additivity: T(u+v)=T(u)+T(v)T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v}) for all u,vV\mathbf{u}, \mathbf{v} \in V
  2. Homogeneity: T(cv)=cT(v)T(c\mathbf{v}) = cT(\mathbf{v}) for all cRc \in \mathbb{R}, vV\mathbf{v} \in V
Equivalently: T(cu+dv)=cT(u)+dT(v)T(c\mathbf{u} + d\mathbf{v}) = cT(\mathbf{u}) + dT(\mathbf{v}) for all scalars c,dc, d.

2.1 Terminology

TermMeaning
Linear mapSynonym for linear transformation
Linear operatorT:VVT: V \to V (domain = codomain)
HomomorphismAnother synonym (from Greek "same shape")
IsomorphismBijective linear transformation
EndomorphismLinear operator (same space)
AutomorphismInvertible linear operator

2.2 Immediate Consequences

From the definition, every linear transformation satisfies:
  • T(0V)=0WT(\mathbf{0}_V) = \mathbf{0}_W (prove: T(0v)=0T(v)=0T(0\cdot\mathbf{v}) = 0\cdot T(\mathbf{v}) = \mathbf{0})
  • T(v)=T(v)T(-\mathbf{v}) = -T(\mathbf{v})
  • T(i=1kcivi)=i=1kciT(vi)T(\sum_{i=1}^k c_i \mathbf{v}_i) = \sum_{i=1}^k c_i T(\mathbf{v}_i) (linearity extends to any finite combination)

3. Examples

3.1 The Zero Transformation

T:VWT: V \to W defined by T(v)=0T(\mathbf{v}) = \mathbf{0} for all v\mathbf{v}. This is linear (trivially).

3.2 The Identity Transformation

I:VVI: V \to V defined by I(v)=vI(\mathbf{v}) = \mathbf{v}. This is linear.

3.3 Scaling (Dilation)

T:VVT: V \to V, T(v)=cvT(\mathbf{v}) = c\mathbf{v} for a fixed scalar cc. Linear:
  • T(u+v)=c(u+v)=cu+cv=T(u)+T(v)T(\mathbf{u}+\mathbf{v}) = c(\mathbf{u}+\mathbf{v}) = c\mathbf{u} + c\mathbf{v} = T(\mathbf{u}) + T(\mathbf{v})
  • T(dv)=c(dv)=d(cv)=dT(v)T(d\mathbf{v}) = c(d\mathbf{v}) = d(c\mathbf{v}) = dT(\mathbf{v})

3.4 Rotation in R2\mathbb{R}^2

T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2 rotates every vector by angle θ\theta counterclockwise:
T(xy)=(xcosθysinθxsinθ+ycosθ)T\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix} x\cos\theta - y\sin\theta \\ x\sin\theta + y\cos\theta \end{pmatrix}
This is linear because it can be represented as matrix multiplication:
[cosθsinθsinθcosθ][xy]\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}
Example 1: Rotation by 9090^\circ
θ=90=π/2\theta = 90^\circ = \pi/2: cosθ=0\cos\theta = 0, sinθ=1\sin\theta = 1.
>T(x,y)=(y,x)>> T(x,y) = (-y, x) >
Check linearity: T((x1,y1)+(x2,y2))=((y1+y2),x1+x2)=(y1,x1)+(y2,x2)=T(x1,y1)+T(x2,y2)T((x_1,y_1)+(x_2,y_2)) = (-(y_1+y_2), x_1+x_2) = (-y_1, x_1) + (-y_2, x_2) = T(x_1,y_1) + T(x_2,y_2)

3.5 Reflection Across xx-axis

T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(x,y)T(x,y) = (x, -y). Matrix:
[1001]\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}
.

3.6 Projection onto xx-axis

T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(x,0)T(x,y) = (x, 0). Matrix:
[1000]\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}
.

3.7 Differentiation

T:P2P1T: P_2 \to P_1, T(p)=pT(p) = p' (derivative). Linear because (p+q)=p+q(p+q)' = p' + q' and (cp)=cp(cp)' = cp'.
Example 2: Differentiation as a linear transformation
T(2+3xx2)=32xT(2 + 3x - x^2) = 3 - 2x. T(1+x2)=2xT(1 + x^2) = 2x. T((2+3xx2)+(1+x2))=T(3+3x)=3=(32x)+2x=T(2+3xx2)+T(1+x2)T((2+3x-x^2) + (1+x^2)) = T(3 + 3x) = 3 = (3-2x) + 2x = T(2+3x-x^2) + T(1+x^2)

3.8 Integration

T:C[0,1]RT: C[0,1] \to \mathbb{R}, T(f)=01f(x)dxT(f) = \int_0^1 f(x) dx. Linear because the integral is linear.

4. Non-Examples

4.1 T(x)=x2T(x) = x^2 (from R\mathbb{R} to R\mathbb{R})

T(x+y)=(x+y)2=x2+2xy+y2x2+y2=T(x)+T(y)T(x+y) = (x+y)^2 = x^2 + 2xy + y^2 \neq x^2 + y^2 = T(x) + T(y) in general. Not linear.

4.2 T(x)=x+1T(x) = x + 1 (affine, not linear)

T(0)=10T(0) = 1 \neq 0. Failed the zero test.

4.3 T(x,y)=(x,y)T(x,y) = (|x|, y)

T(1,0)=(1,0)(1,0)=T(1,0)T(-1,0) = (1,0) \neq -(1,0) = -T(1,0). Fails homogeneity.

5. Matrix Representation

5.1 Standard Matrix

If T:RnRmT: \mathbb{R}^n \to \mathbb{R}^m is linear, there exists a unique m×nm \times n matrix AA such that:
T(x)=AxT(\mathbf{x}) = A\mathbf{x}
The columns of AA are:
A=[T(e1)  T(e2)    T(en)]A = [T(\mathbf{e}_1) \; T(\mathbf{e}_2) \; \dots \; T(\mathbf{e}_n)]
where ei\mathbf{e}_i are the standard basis vectors.
Example 3: Finding the standard matrix
T:R3R2T: \mathbb{R}^3 \to \mathbb{R}^2, T(x,y,z)=(2xy,x+3y+z)T(x,y,z) = (2x - y, x + 3y + z).
T(e1)=T(1,0,0)=(2,1)T(\mathbf{e}_1) = T(1,0,0) = (2, 1) T(e2)=T(0,1,0)=(1,3)T(\mathbf{e}_2) = T(0,1,0) = (-1, 3) T(e3)=T(0,0,1)=(0,1)T(\mathbf{e}_3) = T(0,0,1) = (0, 1)
>A=[210131]>> A = \begin{bmatrix} 2 & -1 & 0 \\ 1 & 3 & 1 \end{bmatrix} >
Check:
>A[xyz]=[2xyx+3y+z]>> A\begin{bmatrix}x\\y\\z\end{bmatrix} = \begin{bmatrix}2x - y \\ x + 3y + z\end{bmatrix} >

5.2 Composition as Matrix Multiplication

If T:RnRmT: \mathbb{R}^n \to \mathbb{R}^m has matrix AA and S:RmRpS: \mathbb{R}^m \to \mathbb{R}^p has matrix BB, then:
(ST)(x)=S(T(x))=B(Ax)=(BA)x(S \circ T)(\mathbf{x}) = S(T(\mathbf{x})) = B(A\mathbf{x}) = (BA)\mathbf{x}
So composition of linear transformations corresponds to matrix multiplication.

6. Types of Linear Transformations

TypeDefinitionMatrix Condition
Injective (one-to-one)T(u)=T(v)u=vT(\mathbf{u}) = T(\mathbf{v}) \Rightarrow \mathbf{u} = \mathbf{v}ker(T)={0}\ker(T) = \{\mathbf{0}\}
Surjective (onto)For every wW\mathbf{w} \in W , v\exists \mathbf{v} with T(v)=wT(\mathbf{v}) = \mathbf{w}im(T)=W\text{im}(T) = W
Bijective (isomorphism)Both injective and surjectiveInvertible matrix

7. Edge Cases & Gotchas

SituationWhat Happens
** T(0)0T(\mathbf{0}) \neq \mathbf{0} **TT cannot be linear
**Domain = {0}\{\mathbf{0}\} **Only one possible linear transformation (to zero)
**Codomain = {0}\{\mathbf{0}\} **Only the zero transformation
** TT defined on basis only**Linearity determines TT on all vectors uniquely

8. Common Pitfalls

❌ Pitfall 1: Checking only additivity

Both additivity and homogeneity are required. Some maps satisfy one but not the other.

❌ Pitfall 2: Thinking all functions are linear

Most functions are not linear. f(x)=x2f(x) = x^2, f(x)=sinxf(x) = \sin x, f(x)=exf(x) = e^x are all non-linear.

❌ Pitfall 3: Forgetting to check domain/codomain are vector spaces

If VV or WW isn't a vector space, the definition doesn't apply.

9. Formula Summary Table

ConceptRule
AdditivityT(u+v)=T(u)+T(v)T(\mathbf{u}+\mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v})
HomogeneityT(cv)=cT(v)T(c\mathbf{v}) = cT(\mathbf{v})
CombinedT(cu+dv)=cT(u)+dT(v)T(c\mathbf{u} + d\mathbf{v}) = cT(\mathbf{u}) + dT(\mathbf{v})
ZeroT(0)=0T(\mathbf{0}) = \mathbf{0}
Standard matrixA=[T(e1)    T(en)]A = [T(\mathbf{e}_1) \; \dots \; T(\mathbf{e}_n)]
Composition(ST)(x)=BAx(S \circ T)(\mathbf{x}) = BA\mathbf{x}

10. 📝 Practice Questions

Q1: Is it linear?
Is T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(x+1,y+2)T(x,y) = (x+1, y+2) linear?
Solution: T(0,0)=(1,2)(0,0)T(0,0) = (1,2) \neq (0,0). Not linear. Q2: Is it linear?
Is T:R3RT: \mathbb{R}^3 \to \mathbb{R}, T(x,y,z)=2x3y+zT(x,y,z) = 2x - 3y + z linear?
Solution: Check additivity: T((x1,y1,z1)+(x2,y2,z2))=2(x1+x2)3(y1+y2)+(z1+z2)T((x_1,y_1,z_1)+(x_2,y_2,z_2)) = 2(x_1+x_2) - 3(y_1+y_2) + (z_1+z_2) =(2x13y1+z1)+(2x23y2+z2)=T(x1,y1,z1)+T(x2,y2,z2)= (2x_1-3y_1+z_1) + (2x_2-3y_2+z_2) = T(x_1,y_1,z_1) + T(x_2,y_2,z_2)
Check homogeneity: T(cx,cy,cz)=2cx3cy+cz=c(2x3y+z)=cT(x,y,z)T(cx,cy,cz) = 2cx - 3cy + cz = c(2x-3y+z) = cT(x,y,z)
Yes, it is linear. Q3: Find the standard matrix
Find the matrix of T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(2x3y,x+4y)T(x,y) = (2x-3y, x+4y).
Solution: T(e1)=T(1,0)=(2,1)T(\mathbf{e}_1) = T(1,0) = (2, 1) T(e2)=T(0,1)=(3,4)T(\mathbf{e}_2) = T(0,1) = (-3, 4)
>A=[2314]>> A = \begin{bmatrix} 2 & -3 \\ 1 & 4 \end{bmatrix} >
. Q4: Rotation matrix
Find the matrix for rotation by 6060^\circ (π/3\pi/3).
Solution: cos60=12\cos 60^\circ = \frac{1}{2}, sin60=32\sin 60^\circ = \frac{\sqrt{3}}{2}.
>A=[12323212]>> A = \begin{bmatrix} \frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & \frac{1}{2} \end{bmatrix} >
.
Check: rotates (1,0)(1,0) to (12,32)(\frac{1}{2}, \frac{\sqrt{3}}{2}), which is (1,0)(1,0) rotated 6060^\circQ5: Composition
T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2 rotates by 9090^\circ, S:R2R2S: \mathbb{R}^2 \to \mathbb{R}^2 reflects across xx-axis. Find the matrix of STS \circ T.
Solution: TT matrix:
>A=[0110]>> A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} >
SS matrix:
>B=[1001]>> B = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} >
STS \circ T matrix:
>BA=[1001][0110]=[0110]>> BA = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix} >
.
Check: (ST)(1,0)=S(0,1)=(0,1)(S \circ T)(1,0) = S(0,1) = (0,-1).
>BA(1,0)T=[0110][10]=[01]>> BA(1,0)^T = \begin{bmatrix} 0&-1\\-1&0 \end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix} = \begin{bmatrix}0\\-1\end{bmatrix} >
Q6: Proving linearity
Show that T:P1P2T: P_1 \to P_2, T(p)(x)=0xp(t)dtT(p)(x) = \int_0^x p(t) dt is linear.
Solution: Let p,qP1p, q \in P_1, cRc \in \mathbb{R}. T(p+q)(x)=0x(p+q)(t)dt=0x(p(t)+q(t))dt=0xp(t)dt+0xq(t)dt=T(p)(x)+T(q)(x)T(p+q)(x) = \int_0^x (p+q)(t) dt = \int_0^x (p(t)+q(t)) dt = \int_0^x p(t) dt + \int_0^x q(t) dt = T(p)(x) + T(q)(x)T(cp)(x)=0xcp(t)dt=c0xp(t)dt=cT(p)(x)T(cp)(x) = \int_0^x cp(t) dt = c\int_0^x p(t) dt = c T(p)(x)
So TT is linear. Q7: Determining injectivity
Is T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(x,0)T(x,y) = (x, 0) injective?
Solution: T(1,2)=(1,0)T(1,2) = (1,0) and T(1,3)=(1,0)T(1,3) = (1,0). Different inputs give same output, so not injective. ker(T)={(0,y)yR}{0}\ker(T) = \{(0,y) \mid y \in \mathbb{R}\} \neq \{\mathbf{0}\}. Q8: Determining surjectivity
Is T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(x,0)T(x,y) = (x, 0) surjective?
Solution: C(A)=span{(1,0)}R2C(A) = \text{span}\{(1,0)\} \neq \mathbb{R}^2. For example, (0,1)(0,1) has no preimage. Not surjective. Q9: Non-linear transformation
Show T:R2RT: \mathbb{R}^2 \to \mathbb{R}, T(x,y)=x2+y2T(x,y) = x^2 + y^2 is not linear.
Solution: T(1,0)=1T(1,0) = 1, T(2,0)=4T(2,0) = 4, but T(2,0)=T(2(1,0))=42T(1,0)=2T(2,0) = T(2(1,0)) = 4 \neq 2T(1,0) = 2. Fails homogeneity.
Alternatively: T((1,0)+(1,0))=T(2,0)=41+1=T(1,0)+T(1,0)T((1,0)+(1,0)) = T(2,0) = 4 \neq 1+1 = T(1,0) + T(1,0). Fails additivity. Q10: Finding T from basis images
If T:R2R2T: \mathbb{R}^2 \to \mathbb{R}^2 is linear, T(1,0)=(2,1)T(1,0) = (2,1), T(0,1)=(3,4)T(0,1) = (3,4), find T(1,5)T(-1,5).
Solution: (1,5)=1(1,0)+5(0,1)(-1,5) = -1(1,0) + 5(0,1). T(1,5)=1T(1,0)+5T(0,1)=1(2,1)+5(3,4)=(2,1)+(15,20)=(13,19)T(-1,5) = -1T(1,0) + 5T(0,1) = -1(2,1) + 5(3,4) = (-2,-1) + (15,20) = (13,19).

🔗 Cross-References

  • Next topic: Kernel & Image
  • Week 6 (Matrix Representation): How to represent TT as a matrix relative to any basis
  • Week 7 (Similarity): Two matrices represent the same TT in different bases
  • BSMA1001 (Maths 1): Functions, composition
  • BSCS3004 (Deep Learning): Layers of a neural network are compositions of linear transformations + non-linear activations Join Discord Previous5.1 Null Space & Column SpaceNext6.1 Kernel & Image
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.