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:Vโ†’WT: 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,vโˆˆV\mathbf{u}, \mathbf{v} \in V
  2. Homogeneity: T(cv)=cT(v)T(c\mathbf{v}) = cT(\mathbf{v}) for all cโˆˆRc \in \mathbb{R}, vโˆˆV\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:Vโ†’VT: 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(0โ‹…v)=0โ‹…T(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:Vโ†’WT: 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:Vโ†’VI: V \to V defined by I(v)=vI(\mathbf{v}) = \mathbf{v}. This is linear.

3.3 Scaling (Dilation)

T:Vโ†’VT: 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:R2โ†’R2T: \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 90โˆ˜90^\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:R2โ†’R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(x,โˆ’y)T(x,y) = (x, -y). Matrix:
[100โˆ’1]\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}
.

3.6 Projection onto xx-axis

T:R2โ†’R2T: \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:P2โ†’P1T: P_2 \to P_1, T(p)=pโ€ฒT(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+3xโˆ’x2)=3โˆ’2xT(2 + 3x - x^2) = 3 - 2x. T(1+x2)=2xT(1 + x^2) = 2x. T((2+3xโˆ’x2)+(1+x2))=T(3+3x)=3=(3โˆ’2x)+2x=T(2+3xโˆ’x2)+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+y2โ‰ x2+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)=1โ‰ 0T(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:Rnโ†’RmT: \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:R3โ†’R2T: \mathbb{R}^3 \to \mathbb{R}^2, T(x,y,z)=(2xโˆ’y,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=[2โˆ’10131]>> A = \begin{bmatrix} 2 & -1 & 0 \\ 1 & 3 & 1 \end{bmatrix} >
Check:
>A[xyz]=[2xโˆ’yx+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:Rnโ†’RmT: \mathbb{R}^n \to \mathbb{R}^m has matrix AA and S:Rmโ†’RpS: \mathbb{R}^m \to \mathbb{R}^p has matrix BB, then:
(Sโˆ˜T)(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 wโˆˆW\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)=sinโกxf(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(Sโˆ˜T)(x)=BAx(S \circ T)(\mathbf{x}) = BA\mathbf{x}

10. ๐Ÿ“ Practice Questions

Q1: Is it linear?
Is T:R2โ†’R2T: \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:R3โ†’RT: \mathbb{R}^3 \to \mathbb{R}, T(x,y,z)=2xโˆ’3y+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) =(2x1โˆ’3y1+z1)+(2x2โˆ’3y2+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)=2cxโˆ’3cy+cz=c(2xโˆ’3y+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:R2โ†’R2T: \mathbb{R}^2 \to \mathbb{R}^2, T(x,y)=(2xโˆ’3y,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=[2โˆ’314]>> A = \begin{bmatrix} 2 & -3 \\ 1 & 4 \end{bmatrix} >
. Q4: Rotation matrix
Find the matrix for rotation by 60โˆ˜60^\circ (ฯ€/3\pi/3).
Solution: cosโก60โˆ˜=12\cos 60^\circ = \frac{1}{2}, sinโก60โˆ˜=32\sin 60^\circ = \frac{\sqrt{3}}{2}.
>A=[12โˆ’323212]>> 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 60โˆ˜60^\circ โœ“ Q5: Composition
T:R2โ†’R2T: \mathbb{R}^2 \to \mathbb{R}^2 rotates by 90โˆ˜90^\circ, S:R2โ†’R2S: \mathbb{R}^2 \to \mathbb{R}^2 reflects across xx-axis. Find the matrix of Sโˆ˜TS \circ T.
Solution: TT matrix:
>A=[0โˆ’110]>> A = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} >
SS matrix:
>B=[100โˆ’1]>> B = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} >
Sโˆ˜TS \circ T matrix:
>BA=[100โˆ’1][0โˆ’110]=[0โˆ’1โˆ’10]>> 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: (Sโˆ˜T)(1,0)=S(0,1)=(0,โˆ’1)(S \circ T)(1,0) = S(0,1) = (0,-1).
>BA(1,0)T=[0โˆ’1โˆ’10][10]=[0โˆ’1]>> 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:P1โ†’P2T: P_1 \to P_2, T(p)(x)=โˆซ0xp(t)dtT(p)(x) = \int_0^x p(t) dt is linear.
Solution: Let p,qโˆˆP1p, q \in P_1, cโˆˆRc \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=cโˆซ0xp(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:R2โ†’R2T: \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)โˆฃyโˆˆR}โ‰ {0}\ker(T) = \{(0,y) \mid y \in \mathbb{R}\} \neq \{\mathbf{0}\}. Q8: Determining surjectivity
Is T:R2โ†’R2T: \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:R2โ†’RT: \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))=4โ‰ 2T(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)=4โ‰ 1+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:R2โ†’R2T: \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

No note selected

Open a chapter to see its outline, backlinks, and sources here.