Home / Articles / Linear Algebra
Linear Algebra · 4 min read

Linear Transformations Explained

Understand linear transformations: the two linearity rules, how to find the standard matrix, and worked examples on rotations, reflections and kernels.

A linear transformation is a function between vector spaces that respects addition and scalar multiplication. It is the idea that connects matrices to geometry: every rotation, reflection, stretch and projection you meet in linear algebra is a linear transformation. Once you see matrices as transformations, topics like eigenvalues and rank become far more intuitive.

The Definition

A function \( T : V \to W \) between vector spaces is linear if, for all vectors \( \mathbf{u}, \mathbf{v} \) in \( V \) and every scalar \( c \):

  1. Additivity: \( T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v}) \)
  2. Homogeneity: \( T(c\mathbf{u}) = c\,T(\mathbf{u}) \)

These two rules can be combined into one test:

$$ T(a\mathbf{u} + b\mathbf{v}) = a\,T(\mathbf{u}) + b\,T(\mathbf{v}) $$

A quick consequence: setting \( c = 0 \) gives \( T(\mathbf{0}) = \mathbf{0} \). So if a function does not send the zero vector to the zero vector, it is not linear. This is often the fastest way to rule a function out.

Every Linear Map on \( \mathbb{R}^n \) Is a Matrix

If \( T : \mathbb{R}^n \to \mathbb{R}^m \) is linear, there is a unique \( m \times n \) matrix \( A \) such that

$$ T(\mathbf{x}) = A\mathbf{x} $$

This \( A \) is called the standard matrix of \( T \). Its columns are simply the images of the standard basis vectors:

$$ A = \big[\, T(\mathbf{e}_1) \;\; T(\mathbf{e}_2) \;\; \cdots \;\; T(\mathbf{e}_n) \,\big] $$

The reason is linearity itself: any \( \mathbf{x} = x_1\mathbf{e}_1 + \cdots + x_n\mathbf{e}_n \), so \( T(\mathbf{x}) = x_1T(\mathbf{e}_1) + \cdots + x_nT(\mathbf{e}_n) \), which is exactly the matrix–vector product \( A\mathbf{x} \).

Worked Example 1: Testing Linearity and Finding the Matrix

Question: Is \( T(x, y) = (2x + y,\; x - 3y) \) linear? If so, find its standard matrix and compute \( T(4, -1) \).

Step 1: Check the zero vector. \( T(0, 0) = (0, 0) \). This passes, but it is not enough by itself.

Step 2: Check the combined rule. Let \( \mathbf{u} = (x_1, y_1) \), \( \mathbf{v} = (x_2, y_2) \). Then

$$ T(a\mathbf{u} + b\mathbf{v}) = \big(2(ax_1 + bx_2) + (ay_1 + by_2),\; (ax_1 + bx_2) - 3(ay_1 + by_2)\big) $$

Grouping the \( a \) and \( b \) terms:

$$ = a(2x_1 + y_1,\; x_1 - 3y_1) + b(2x_2 + y_2,\; x_2 - 3y_2) = a\,T(\mathbf{u}) + b\,T(\mathbf{v}) $$

So \( T \) is linear.

Step 3: Find the images of the basis vectors.

  • \( T(\mathbf{e}_1) = T(1, 0) = (2, 1) \)
  • \( T(\mathbf{e}_2) = T(0, 1) = (1, -3) \)

Step 4: Build the matrix.

$$ A = \begin{bmatrix} 2 & 1 \\ 1 & -3 \end{bmatrix} $$

Step 5: Compute \( T(4, -1) \).

$$ A\begin{bmatrix} 4 \\ -1 \end{bmatrix} = \begin{bmatrix} 2(4) + 1(-1) \\ 1(4) - 3(-1) \end{bmatrix} = \begin{bmatrix} 7 \\ 7 \end{bmatrix} $$

Checking directly: \( 2(4) + (-1) = 7 \) and \( 4 - 3(-1) = 7 \). Correct.

A non-example: \( S(x, y) = (x + 1,\; y) \) gives \( S(0, 0) = (1, 0) \neq (0, 0) \), so \( S \) is not linear. Likewise \( (x^2, y) \) fails homogeneity, because \( (2x)^2 = 4x^2 \neq 2x^2 \).

Geometric Transformations in \( \mathbb{R}^2 \)

Many familiar movements of the plane are linear. Here are their standard matrices:

  • Rotation by angle \( \theta \) anticlockwise: \( \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} \)
  • Reflection in the x-axis: \( \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \)
  • Reflection in the line \( y = x \): \( \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \)
  • Scaling by \( k \): \( \begin{bmatrix} k & 0 \\ 0 & k \end{bmatrix} \)
  • Horizontal shear by \( k \): \( \begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix} \)

Note that a translation such as "move every point 3 units right" is not linear, because it moves the origin.

Worked Example 2: Composing a Rotation and a Reflection

Question: Rotate the point \( (3, 1) \) by \( 90^\circ \) anticlockwise, then reflect the result in the x-axis. Find the single matrix that does both and the final point.

Step 1: Rotation matrix for \( 90^\circ \). Since \( \cos 90^\circ = 0 \) and \( \sin 90^\circ = 1 \):

$$ R = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} $$

Step 2: Reflection matrix.

$$ F = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} $$

Step 3: Compose. The rotation acts first, so the combined matrix is \( FR \) (the right-most matrix acts first):

$$ FR = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix} $$

Entry by entry: row 1 gives \( (1\cdot0 + 0\cdot1,\; 1\cdot(-1) + 0\cdot0) = (0, -1) \); row 2 gives \( (0\cdot0 + (-1)\cdot1,\; 0\cdot(-1) + (-1)\cdot0) = (-1, 0) \).

Step 4: Apply to \( (3, 1) \).

$$ \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}\begin{bmatrix} 3 \\ 1 \end{bmatrix} = \begin{bmatrix} -1 \\ -3 \end{bmatrix} $$

Check step by step: rotating \( (3, 1) \) by \( 90^\circ \) gives \( (-1, 3) \); reflecting in the x-axis gives \( (-1, -3) \). The answers match. Interestingly, \( FR \) is reflection in the line \( y = -x \).

Kernel and Range

Two subspaces describe what a linear transformation does:

  • The kernel (null space) is the set of vectors sent to zero: \( \ker T = \{ \mathbf{x} : T(\mathbf{x}) = \mathbf{0} \} \).
  • The range (image) is the set of all outputs \( T(\mathbf{x}) \); for \( T(\mathbf{x}) = A\mathbf{x} \) it is the column space of \( A \).

For the map in Example 1, \( \det A = 2(-3) - 1(1) = -7 \neq 0 \), so the only solution of \( A\mathbf{x} = \mathbf{0} \) is \( \mathbf{x} = \mathbf{0} \). The kernel is \( \{\mathbf{0}\} \), the map is one-to-one, and its range is all of \( \mathbb{R}^2 \).

By contrast, the projection \( P(x, y) = (x, 0) \) has kernel equal to the whole y-axis, since every point \( (0, y) \) is sent to the origin.

Common Mistakes

  • Checking only \( T(\mathbf{0}) = \mathbf{0} \). It is necessary but not sufficient; \( (x^2, y) \) passes it and still is not linear.
  • Wrong order of composition. "First \( R \), then \( F \)" is the product \( FR \), not \( RF \).
  • Putting images in rows instead of columns. The images \( T(\mathbf{e}_i) \) form the columns of the standard matrix.
  • Calling translations linear. Any map that moves the origin is affine, not linear.

Key Takeaways

  • A transformation is linear if \( T(a\mathbf{u} + b\mathbf{v}) = aT(\mathbf{u}) + bT(\mathbf{v}) \); it must send \( \mathbf{0} \) to \( \mathbf{0} \).
  • Every linear map \( \mathbb{R}^n \to \mathbb{R}^m \) is multiplication by a matrix whose columns are \( T(\mathbf{e}_1), \dots, T(\mathbf{e}_n) \).
  • Rotations, reflections, scalings and shears are linear; translations are not.
  • Composition of transformations corresponds to matrix multiplication, read from right to left.
  • The kernel and range reveal whether a map is one-to-one and onto.

If linear transformations are giving you trouble in your coursework, send your question on WhatsApp or through the "Ask a Question" form, and Amathify's experts and PhD scholars will prepare a step-by-step solution for you.

Stuck on a problem or assignment?

Our experts and PhD scholars solve maths, physics and chemistry — step by step.

WhatsApp usAsk a question

Related articles