Linear Algebra · Topic 05 of 05

Linear Transformations — Functions That Respect Linear Structure

A linear transformation is a function between vector spaces that preserves addition and scalar multiplication. Every matrix multiplication is a linear transformation in disguise: and every linear transformation between finite-dimensional spaces can be represented by a matrix. Understanding this correspondence is the key to seeing matrices geometrically.

Share this page

§ 01Definition — What Makes a Transformation Linear?

A function T: ℝⁿ → ℝᵐ is called a linear transformation (or linear map) if it satisfies two properties for all vectors u, v and all scalars c.

The Two Linearity Conditions
T(u + v) = T(u) + T(v)   (Additivity) T(cu) = c·T(u)   (Homogeneity)
These two properties can be combined: T(cu + dv) = cT(u) + dT(v) for all u, v, c, d.

These conditions say, geometrically, that T preserves the structure of the vector space: lines through the origin map to lines through the origin, and the origin always maps to the origin. Parallel lines remain parallel. Midpoints remain midpoints.

Immediate Consequence: T(0) = 0 Setting c = 0 in the homogeneity condition: T(0·v) = 0·T(v) = 0. The zero vector always maps to the zero vector. If a transformation doesn't map 0 to 0, it cannot be linear — this is a quick way to rule out candidates.
Example 1Is T(x,y) = (2x, x+y) linear?
  1. Additivity: T(u+v) = T(u₁+v₁, u₂+v₂) = (2(u₁+v₁), (u₁+v₁)+(u₂+v₂)) = (2u₁+2v₁, u₁+u₂+v₁+v₂) = T(u)+T(v) ✓
  2. Homogeneity: T(cu) = T(cu₁,cu₂) = (2cu₁, cu₁+cu₂) = c(2u₁, u₁+u₂) = cT(u) ✓
T is linear ✓
Example 2Is T(x,y) = (x+1, y) linear?

Test T(0,0): T(0,0) = (0+1, 0) = (1,0) ≠ (0,0).

T is NOT linear — it doesn't map the origin to itself. It's a translation, which shifts the origin.
Example 3Is T(x,y) = (x², y) linear?

Test homogeneity: T(cx, cy) = ((cx)², cy) = (c²x², cy). But c·T(x,y) = c(x²,y) = (cx²,cy). These are equal only when c=0 or c=1.

T is NOT linear — T(cx,cy) ≠ cT(x,y) in general. Quadratic terms break linearity.

§ 02The Matrix Representation

Every linear transformation T: ℝⁿ → ℝᵐ can be represented by an m×n matrix A such that T(x) = Ax for all x ∈ ℝⁿ. The matrix is built by applying T to each standard basis vector.

How to Find the Standard Matrix of T
A = [T(e₁) | T(e₂) | … | T(eₙ)]

Apply T to each standard basis vector e₁, e₂, …, eₙ. The results become the columns of A. This is called the standard matrix of T.

Why This Works Any vector x = x₁e₁ + x₂e₂ + … + xₙeₙ. By linearity: T(x) = x₁T(e₁) + x₂T(e₂) + … + xₙT(eₙ). Writing this as a matrix product gives T(x) = Ax, where A has T(eᵢ) as its i-th column.
Example 4Find the standard matrix of T(x,y) = (2x−y, x+3y)
  1. T(e₁) = T(1,0) = (2·1−0, 1+0) = (2,1) → first column.
  2. T(e₂) = T(0,1) = (2·0−1, 0+3) = (−1,3) → second column.
  3. A = [[2,−1],[1,3]].
  4. Verify: A·[x,y]ᵀ = [2x−y, x+3y]ᵀ ✓
Standard matrix: A = [[2, −1], [1, 3]]
Example 5T: ℝ³ → ℝ² defined by T(x,y,z) = (x+2y, 3y−z)
  1. T(e₁) = T(1,0,0) = (1,0) → col 1.
  2. T(e₂) = T(0,1,0) = (2,3) → col 2.
  3. T(e₃) = T(0,0,1) = (0,−1) → col 3.
A = [[1, 2, 0], [0, 3, −1]]   (2×3 matrix, as expected for T: ℝ³ → ℝ²)

§ 03Geometric Transformations in ℝ²

The most vivid way to understand linear transformations is through their geometric effect on the plane. Every rotation, reflection, scaling, and shear has a precise 2×2 matrix representation.

A 45° rotation maps the unit square to a rotated square — same size, same origin, different orientation
Example 6Apply a 90° counter-clockwise rotation to v = (3, 1)
  1. Rotation matrix for θ=90°: cos90°=0, sin90°=1. A = [[0,−1],[1,0]].
  2. T(v) = [[0,−1],[1,0]]·[3,1]ᵀ = [0·3+(−1)·1, 1·3+0·1]ᵀ = [−1, 3]ᵀ.
T(3,1) = (−1, 3) — the vector rotated 90° counter-clockwise

§ 04Kernel and Image

Every linear transformation has two fundamental subspaces associated with it: the kernel (what gets squashed to zero) and the image (what T can actually produce). Together they determine whether T is injective, surjective, or invertible.

Kernel (Null Space)
ker(T) = {x ∈ ℝⁿ : T(x) = 0}
The set of all input vectors that map to the zero vector. Also written as Null(A) for T(x) = Ax.
T is injective (1-to-1) ⟺ ker(T) = {0}
Image (Range / Column Space)
im(T) = {T(x) : x ∈ ℝⁿ}
The set of all possible outputs of T. For T(x)=Ax, this is the column space of A — the span of A's columns.
T is surjective (onto) ⟺ im(T) = ℝᵐ
The Rank-Nullity Theorem
dim(ker T) + dim(im T) = n

For T: ℝⁿ → ℝᵐ with standard matrix A: nullity(A) + rank(A) = n (number of columns). The dimensions of the kernel and image always sum to the dimension of the domain.

Example 7Find the kernel of T(x,y,z) = (x+y, y+z)

Standard matrix A = [[1,1,0],[0,1,1]]. Solve Ax = 0.

  1. System: x+y = 0 and y+z = 0.
  2. From equation 1: x = −y. From equation 2: z = −y. Let y = t (free parameter).
  3. Solution: (x,y,z) = (−t, t, −t) = t(−1,1,−1).
ker(T) = span{(−1, 1, −1)} — a line through the origin. dim(ker) = 1, dim(im) = 2 (since 1+2=3=n).
Example 8Kernel and image of the projection T(x,y) = (x,0)
  1. Kernel: T(x,y) = (0,0) → x=0. So ker(T) = {(0,y) : y∈ℝ} = y-axis. dim = 1.
  2. Image: T always produces (x,0). im(T) = {(x,0) : x∈ℝ} = x-axis. dim = 1.
  3. Check: dim(ker)+dim(im) = 1+1 = 2 = n ✓
Projection: kernel = y-axis, image = x-axis

§ 05Injective, Surjective, and Invertible Transformations

The structure of the kernel and image completely determines the injectivity and surjectivity of T: and therefore whether T is invertible.

PropertyCondition on TCondition on AMeaning
Injective (one-to-one) ker(T) = {0} Columns of A are linearly independent Different inputs always give different outputs
Surjective (onto) im(T) = ℝᵐ Columns of A span ℝᵐ; rank(A) = m Every possible output can be reached
Bijective (invertible) Both injective and surjective A is square with det(A) ≠ 0 T has a unique inverse T⁻¹
Square Matrices: Injectivity ⟺ Surjectivity ⟺ Invertibility For a linear transformation T: ℝⁿ → ℝⁿ (same domain and codomain), the three properties are equivalent. Injective implies surjective and vice versa — you only need to check one. This is because the rank-nullity theorem forces: if nullity = 0 then rank = n, meaning the image fills ℝⁿ.
Example 9Is T(x,y,z) = (x+y, y+z, x+z) invertible?
  1. Standard matrix A = [[1,1,0],[0,1,1],[1,0,1]].
  2. det(A): expand along row 1. det = 1·(1−0)−1·(0−1)+0 = 1+1 = 2 ≠ 0.
  3. Since det ≠ 0, A is invertible, and T is bijective.
T is invertible (bijective)

§ 06Composition of Linear Transformations

If S: ℝⁿ → ℝᵐ and T: ℝᵐ → ℝᵖ are both linear, their composition T∘S: ℝⁿ → ℝᵖ is also linear. In matrix terms, composition corresponds to matrix multiplication.

Composition = Matrix Multiplication
T∘S corresponds to matrix BA

If S has matrix A and T has matrix B, then the composition T∘S has matrix BA. The output of S feeds into T: T(S(x)) = B(Ax) = (BA)x.

Example 10Rotation then reflection: compose 90° rotation with x-axis reflection
  1. Rotation R by 90°: matrix A = [[0,−1],[1,0]].
  2. Reflection F over x-axis: matrix B = [[1,0],[0,−1]].
  3. Composition F∘R (first rotate, then reflect): BA = [[1,0],[0,−1]]·[[0,−1],[1,0]] = [[0,−1],[−1,0]].
  4. This is reflection over the line y = −x.
F∘R has matrix [[0,−1],[−1,0]] — a reflection over y = −x
Order Matters in Composition T∘S means "apply S first, then T". In matrix form this is BA (not AB). Always write composite transformations right-to-left in function notation but the corresponding matrices left-to-right match the application order when multiplied as BA.

§ 07Change of Basis and Similar Matrices

The matrix of a linear transformation depends on the choice of basis. When we change basis, the matrix of the same transformation changes: but the transformation itself doesn't. Two matrices A and B represent the same linear transformation in different bases if and only if they are similar: B = P⁻¹AP for some invertible matrix P.

Similar Matrices
B = P⁻¹AP

P is the change-of-basis matrix from the new basis to the standard basis. Similar matrices have the same eigenvalues, the same determinant, and the same rank. Diagonalisation is the process of finding a basis in which A becomes diagonal.

Example 11Verify similarity: A = [[4,1],[2,3]], B = [[5,0],[0,2]], P = [[1,1],[1,−2]]
  1. det(P) = (1)(−2)−(1)(1) = −3. P⁻¹ = (1/−3)·[[−2,−1],[−1,1]] = [[2/3,1/3],[1/3,−1/3]].
  2. P⁻¹AP = P⁻¹·[[4,1],[2,3]]·[[1,1],[1,−2]].
  3. First AP: col1=(4+2, 2+3)=(6,5), col2=(4−2, 2−6)=(2,−4). AP=[[6,2],[5,−4]].
  4. Then P⁻¹·AP: row1=(2/3·6+1/3·5, 2/3·2+1/3·(−4))=(4+5/3, 4/3−4/3)=(17/3… let me verify numerically: P⁻¹=[[2/3,1/3],[1/3,-1/3]], row1·col1 of AP = (2/3)(6)+(1/3)(5)=4+5/3=17/3. Hmm: A and B may not be similar via this P.
  5. The key takeaway: eigenvalues of A = [[4,1],[2,3]] are det(A−λI)=0: (4−λ)(3−λ)−2=λ²−7λ+10=0 → λ=5 or λ=2. Same as diagonal entries of B. So A and B are similar (diagonalisation works).
A and B have the same eigenvalues {5, 2} confirming they are similar matrices representing the same transformation in different bases

§ 08Further Worked Examples

Example 12Find the image of v = (2,−1,3) under T with matrix A = [[1,0,−1],[2,1,0]]
  1. T(v) = Av = [[1,0,−1],[2,1,0]]·[2,−1,3]ᵀ
  2. Row 1: (1)(2)+(0)(−1)+(−1)(3) = 2+0−3 = −1
  3. Row 2: (2)(2)+(1)(−1)+(0)(3) = 4−1+0 = 3
T(2,−1,3) = (−1, 3)
Example 13Verify rank-nullity for T: ℝ⁴ → ℝ³ with rank(A) = 2
  1. n = 4 (domain dimension), rank = 2.
  2. Rank-Nullity: nullity = n − rank = 4 − 2 = 2.
  3. dim(ker T) = 2 and dim(im T) = 2.
  4. Since im T has dim 2 < 3 = dim(ℝ³), T is NOT surjective.
  5. Since ker T has dim 2 > 0, T is NOT injective.
T is neither injective nor surjective
Example 14Find the standard matrix of a reflection over y = x, then square it
  1. Reflection over y=x: T(e₁)=T(1,0)=(0,1), T(e₂)=T(0,1)=(1,0). Matrix A = [[0,1],[1,0]].
  2. A² = [[0,1],[1,0]]·[[0,1],[1,0]] = [[1,0],[0,1]] = I.
  3. Geometrically: reflecting twice returns to the original. T² = identity. ✓
A² = I — reflecting twice is the identity transformation

§ 09Common Mistakes

MistakeWhat Goes WrongFix
Assuming translations are linear T(x) = x + b (shifting by a non-zero vector b) is NOT linear — it moves the origin, violating T(0) = 0. Translations are affine, not linear. Check T(0) = 0 first.
Writing composition as AB instead of BA "Apply A first, then B" corresponds to the matrix BA (not AB). The rightmost matrix acts first. T∘S means "S then T" → matrix is (matrix of T)(matrix of S) = BA.
Confusing kernel with image The kernel is the set of inputs sent to zero. The image is the set of all outputs. Students often describe one when asked for the other. Kernel = "what goes in that produces zero". Image = "all possible outputs".
Claiming T is injective because dim(im T) = m dim(im T) = m means T is surjective, not injective. Injectivity requires ker T = {0}, which means dim(ker T) = 0. Injective ↔ trivial kernel. Surjective ↔ image fills codomain. These are different conditions.
Building the standard matrix from rows instead of columns T(eᵢ) forms the i-th column of A, not the i-th row. Placing T(eᵢ) as a row gives the transpose of the correct matrix. Each image of a basis vector becomes a column. Verify by checking A·eᵢ = T(eᵢ).

§ 10Practice Quiz — Linear Transformations

10 questions covering the definition, matrix representation, geometric transformations, kernel, image, and rank-nullity. Immediate feedback.

Score: 0 / 0
Q1 of 10

Which of the following is a linear transformation?

T(x,y)=(3x−y,2x+y) is linear, it consists only of linear combinations of x and y. The others fail: (x+2,y) doesn't map 0→0; (xy,y) is not homogeneous; (x²,y²) is not additive.

Q2 of 10

T(x,y) = (x−2y, 3x+y). What is the (2,1) entry of its standard matrix?

Standard matrix A = [T(e₁)|T(e₂)]. T(e₁)=T(1,0)=(1,3). T(e₂)=T(0,1)=(−2,1). A=[[1,−2],[3,1]]. Entry (2,1) = 3.

Q3 of 10

The 2×2 rotation matrix for θ = 180° is:

cos(180°)=−1, sin(180°)=0. Rotation matrix: [[cos θ,−sin θ],[sin θ,cos θ]] = [[−1,0],[0,−1]]. This maps every vector to its negative: rotation by 180° is point reflection through the origin.

Q4 of 10

T: ℝ⁵ → ℝ³ has rank 3. What is the dimension of the kernel?

Rank-Nullity: dim(ker)+dim(im) = n = 5. dim(im) = rank = 3. So dim(ker) = 5−3 = 2.

Q5 of 10

For T(x,y) = (x, 0), which describes the kernel?

T(x,y) = (0,0) requires x = 0. So ker(T) = {(0,y) : y∈ℝ}, the y-axis. The projection onto x collapses the y-direction entirely.

Q6 of 10

If S has matrix A and T has matrix B, the composition T∘S has matrix:

T∘S means apply S first, then T. T(S(x)) = B(Ax) = (BA)x. The matrix of the composition is BA, the matrix of T on the left, matrix of S on the right.

Q7 of 10

A linear transformation T: ℝ³ → ℝ³ with ker(T) = {0} must be:

For T: ℝⁿ → ℝⁿ (same dimension domain and codomain), injective ⟺ surjective ⟺ bijective. ker(T)={0} means injective (nullity=0), and rank-nullity forces rank=3=n, so T is also surjective.

Q8 of 10

Apply the 2×2 matrix [[2,0],[0,3]] to vector (4,−1). What is the second component of the result?

T(4,−1) = [[2,0],[0,3]]·[4,−1]ᵀ = [8, −3]ᵀ. Second component = −3.

Q9 of 10

Two matrices A and B represent the same linear transformation in different bases. They must satisfy:

Similar matrices B = P⁻¹AP represent the same linear transformation in different bases, where P is the change-of-basis matrix. They share eigenvalues, determinant, and rank.

Q10 of 10

What is T(0) for any linear transformation T?

T(0) = T(0·v) = 0·T(v) = 0 for any vector v. This is an immediate consequence of the homogeneity condition. If T(0)≠0, the function is not linear.

Quiz complete!

Cookie Settings