The matrix of a linear transformation T has, as its j-th column, the coordinates of T applied to the j-th basis vector. For the standard basis, that means the columns are T(e₁), T(e₂), …, T(eₙ); for any other basis, you write each image in coordinates of the target basis first. Everything below, from reflections to polynomial maps to change of basis, is that one rule used carefully.
The one rule, and why it works
Any vector v in Rⁿ is v = x₁e₁ + … + xₙeₙ. Because T is linear,
T(v) = x₁T(e₁) + … + xₙT(eₙ)
A matrix times a vector is exactly a combination of its columns with the entries of the vector as weights. So if the columns of A are T(e₁), …, T(eₙ), then Av = T(v) for every v. A map from Rⁿ to Rᵐ gives an m×n matrix: one column per input dimension, one row per output dimension.
For a general basis B = {b₁, …, bₙ} of V and C of W, the matrix [T] from B to C has j-th column equal to the C-coordinates of T(bⱼ). It then turns B-coordinates of v into C-coordinates of T(v).
Our linear algebra help online page explains how sessions with Ajay Vatsyayan work if you want to practise these set-ups on your own course questions.
Which recipe to use
| What the question gives you | What to do |
|---|---|
| A formula such as T(x, y) = (…) | Read off the coefficients row by row, or compute T(e₁), T(e₂), … |
| T of the standard basis vectors | Those images are the columns |
| T of some other vectors v₁, …, vₙ | A = [T(v₁) … T(vₙ)] × [v₁ … vₙ]⁻¹, or express each eᵢ in terms of the vᵢ |
| A geometric description (rotate, reflect, project) | Work out where e₁ and e₂ go, or use a basis adapted to the geometry |
| A map on polynomials, matrices or functions | Fix a basis, find T of each basis element, write it in coordinates |
| A request for the matrix in a new basis B | [T]_B = P⁻¹AP, with the B vectors as the columns of P |
| A composition, S after T | Multiply as [S][T], in that order |
Example 1: straight from a formula
T : R³ → R², T(x, y, z) = (x + 2y − z, 3x − z).
T(e₁) = (1, 3), T(e₂) = (2, 0), T(e₃) = (−1, −1). These are the columns:
A = [[1, 2, −1], [3, 0, −1]]
Check with any vector: T(2, −1, 4) = (2 − 2 − 4, 6 − 4) = (−4, 2), and A(2, −1, 4) = (−4, 2). Notice the shape: three inputs, two outputs, so 2×3.
Example 2: when you only know T of other vectors
A linear map T : R² → R² satisfies T(1, 1) = (3, 1) and T(1, −1) = (1, 5). Find its standard matrix.
Express the standard basis in terms of the given vectors: e₁ = ½[(1, 1) + (1, −1)] and e₂ = ½[(1, 1) − (1, −1)]. By linearity,
T(e₁) = ½[(3, 1) + (1, 5)] = (2, 3)
T(e₂) = ½[(3, 1) − (1, 5)] = (1, −2)
So A = [[2, 1], [3, −2]]. Check: A(1, 1) = (3, 1) and A(1, −1) = (1, 5). The same answer comes from A = [[3, 1], [1, 5]] × [[1, 1], [1, −1]]⁻¹.
Example 3: a reflection, found two ways
Find the standard matrix of reflection in the line y = 2x.
Way 1: track e₁ and e₂. With unit direction u = (1, 2)/√5, the reflection of v is 2(v·u)u − v.
T(e₁) = (2/5)(1, 2) − (1, 0) = (−3/5, 4/5)
T(e₂) = (4/5)(1, 2) − (0, 1) = (4/5, 3/5)
A = (1/5)[[−3, 4], [4, 3]]
Way 2: choose a basis that suits the geometry. The reflection keeps (1, 2) fixed and flips the perpendicular direction (−2, 1). In the basis {(1, 2), (−2, 1)} its matrix is simply diag(1, −1), and converting back with P = [[1, −2], [2, 1]] gives PDP⁻¹, the same A.
Checks: A(1, 2) = (1, 2), A(−2, 1) = (2, −1), and A² = I, as any reflection must satisfy.
Example 4: a map on polynomials
Let T : P₂ → P₂, T(p) = (x + 1)p′(x), with basis {1, x, x²}.
T(1) = 0, coordinates (0, 0, 0)
T(x) = x + 1, coordinates (1, 1, 0)
T(x²) = (x + 1)(2x) = 2x + 2x², coordinates (0, 2, 2)
Those are the columns:
[T] = [[0, 1, 0], [0, 1, 2], [0, 0, 2]]
Use it on p = 3 − x + 4x², coordinates (3, −1, 4). The product is (−1, 7, 8), so T(p) = −1 + 7x + 8x². Directly: p′ = −1 + 8x and (x + 1)(−1 + 8x) = 8x² + 7x − 1. The same.
The matrix is upper triangular with diagonal 0, 1, 2, so T has eigenvalues 0, 1, 2: constants, (x + 1) and (x + 1)² are its eigenvectors.
Example 5: the same map in a different basis
Let T(x, y) = (4x − 2y, x + y), so A = [[4, −2], [1, 1]]. Find the matrix of T in the basis B = {(1, 0), (1, 1)}.
Column by column. T(1, 0) = (4, 1) = 3(1, 0) + 1(1, 1), so the first column is (3, 1). T(1, 1) = (2, 2) = 0(1, 0) + 2(1, 1), so the second column is (0, 2).
[T]_B = [[3, 0], [1, 2]]
By formula. With P = [[1, 1], [0, 1]] (the B vectors as columns), P⁻¹AP gives the same matrix.
Now try B′ = {(1, 1), (2, 1)}. T(1, 1) = (2, 2) = 2(1, 1) and T(2, 1) = (6, 3) = 3(2, 1), so [T]_B′ = diag(2, 3). A basis of eigenvectors makes the matrix diagonal. That is precisely what diagonalising a matrix means, seen from the linear map side.
Example 6: differentiation on a function space
Let V be the span of f₁ = eˣ cos x and f₂ = eˣ sin x, and let D be differentiation.
D(f₁) = eˣ cos x − eˣ sin x = f₁ − f₂, coordinates (1, −1)
D(f₂) = eˣ sin x + eˣ cos x = f₁ + f₂, coordinates (1, 1)
[D] = [[1, 1], [−1, 1]]
Here is the payoff. Its inverse is ½[[1, −1], [1, 1]], and applying it to the coordinates of f₁, which are (1, 0), gives (½, ½). So an antiderivative of eˣ cos x is
½eˣ(cos x + sin x)
with no integration by parts at all. Differentiating confirms it.
Where students lose marks
- Images written as rows. The images of the basis vectors are the columns. Writing them as rows gives the transpose.
- Wrong shape. T : R³ → R² needs a 2×3 matrix. If yours is 3×2, rows and columns have been swapped.
- Forgetting to convert to coordinates. In a non-standard target basis, T(bⱼ) must be rewritten as a combination of the target basis before it becomes a column.
- Composition in the wrong order. "Rotate 90° anticlockwise, then project onto the x-axis" is [[1, 0], [0, 0]] × [[0, −1], [1, 0]] = [[0, −1], [0, 0]]. The other order gives [[0, 0], [1, 0]], a different map.
- P⁻¹AP versus PAP⁻¹. If the columns of P are the new basis vectors written in standard coordinates, the new matrix is P⁻¹AP.
- Not checking linearity. A map such as T(x, y) = (x + 1, y) is not linear (it moves the origin), so it has no matrix. Check T(0) = 0 at least.
Practice questions
- Find the standard matrix of T(x, y) = (2x − y, x + 3y, −y).
- Find the standard matrix of orthogonal projection onto the line spanned by (3, 4).
- A linear map satisfies T(1, 2) = (5, 0) and T(0, 1) = (1, 1). Find its standard matrix.
- Find the matrix of T : P₂ → R², T(p) = (p(0), p(1)), using the basis {1, x, x²} and the standard basis of R².
- Find the matrix of T(x, y) = (x + 2y, 2x + y) in the basis {(1, 1), (1, −1)}.
- Using the matrix [D] from Example 6, find an antiderivative of eˣ sin x.
Answers.
- [[2, −1], [1, 3], [0, −1]], a 3×2 matrix.
- (1/25)[[9, 12], [12, 16]].
- T(e₂) = (1, 1) and T(e₁) = T(1, 2) − 2T(0, 1) = (3, −2), so A = [[3, 1], [−2, 1]].
- [[1, 0, 0], [1, 1, 1]].
- diag(3, −1), since (1, 1) and (1, −1) are eigenvectors.
- [D]⁻¹ applied to (0, 1) gives (−½, ½), so ½eˣ(sin x − cos x).
Where this leads next
Once you can write a linear map as a matrix in any basis, the rest of the course becomes easier to organise. The kernel and image of T are the null space and column space of its matrix, so the rank–nullity theorem applies straight away. Choosing a basis of eigenvectors, as in Example 5, needs fluent eigenvalue and eigenvector working. Later courses use the same idea for orthogonal projections, for the singular value decomposition and, in differential equations, for linear operators acting on function spaces.
If you first met transformation matrices at school, our guide to matrix transformations in IB Maths AI HL is a quick refresher on rotations, reflections and stretches. And if the move from concrete matrices to abstract spaces is the part that hurts, read why linear algebra feels hard after vector spaces appear.
How Maths Bodhi helps
Most marks on this topic are lost to set-up errors: rows instead of columns, the wrong basis, the wrong order. In online sessions we work through your own course questions, have you state the basis and shape before calculating, and review your attempts line by line. We explain and practise; we don't complete graded work. Engineering students can see our engineering mathematics support too.
Home tuition is available in Gurgaon (Gurugram). Students elsewhere in India and abroad learn with us online. You can book a free demo class.
Written and checked by the Maths Bodhi team (November 2026).
Frequently asked questions
- How do you find the matrix of a linear transformation?
- Apply T to each basis vector of the domain, write each image in coordinates of the target basis, and use those as the columns.
- What is the standard matrix of a linear transformation?
- It is the matrix whose columns are T(e₁), …, T(eₙ), so that T(v) = Av for every v.
- What size is the matrix of a linear map from R3 to R2?
- It is 2×3: one column for each input dimension and one row for each output dimension.
- How do you find the matrix of a linear transformation with respect to a basis?
- Compute T of each basis vector and write it in that basis, or use P⁻¹AP with the basis vectors as the columns of P.
- Is every linear transformation a matrix?
- Every linear map between finite-dimensional spaces is represented by a matrix once you choose bases for both spaces.
- Why are the images of the basis vectors the columns?
- Because A times a vector is a combination of A's columns, which matches T(v) = x₁T(e₁) + … + xₙT(eₙ).
