What a linear map is
A map T from a vector space to another is linear if T(u + v) = T(u) + T(v) and T(λu) = λT(u) for all vectors
u, v and numbers λ. It follows that T(0) = 0 and that T of a combination is the combination of the images.
For T from ℝⁿ to ℝᵐ with the standard basis e₁, …, eₙ, write x = x₁e₁ + … + xₙeₙ. Then
- T(x) = x₁T(e₁) + x₂T(e₂) + … + xₙT(eₙ) = A x
where A is the m×n matrix whose columns are T(e₁), …, T(eₙ). The card above is this for n = 3 and m = 2: it
forms the combination of the three columns, one coordinate at a time. A 2×3 matrix takes a vector of ℝ³ to a
vector of ℝ².
Holds for linear maps and for the standard bases. For a map of a space to itself, the matrix in a new basis
is P⁻¹AP; see change of basis.
Worked example
T(x, y, z) = (x + 2y, 3x − y + 4z). The images of the basis vectors are
- T(e₁) = T(1, 0, 0) = (1, 3)
- T(e₂) = T(0, 1, 0) = (2, −1)
- T(e₃) = T(0, 0, 1) = (0, 4)
so A has the rows (1, 2, 0) and (3, −1, 4). For x = (2, 1, −1):
- T(x) = 2·(1, 3) + 1·(2, −1) − 1·(0, 4) = (2 + 2 − 0, 6 − 1 − 4) = (4, 1)
Directly from the formula for T: (2 + 2·1, 3·2 − 1 + 4·(−1)) = (4, 1).
A second example: rotation in the plane
Rotating the plane 90° counterclockwise sends e₁ = (1, 0) to (0, 1) and e₂ = (0, 1) to (−1, 0). The matrix has
the columns (0, 1) and (−1, 0), so the rows (0, −1) and (1, 0). The point (3, 2) goes to
3·(0, 1) + 2·(−1, 0) = (−2, 3). On the card, put the third coordinate and the third column to 0 for a map from
the plane to the plane.
| Map of the plane |
Images of e₁ and e₂ |
Matrix rows |
| Reflection in the x-axis |
(1, 0), (0, −1) |
(1, 0) and (0, −1) |
| Rotation 90° counterclockwise |
(0, 1), (−1, 0) |
(0, −1) and (1, 0) |
| Stretch by 2 along x |
(2, 0), (0, 1) |
(2, 0) and (0, 1) |
What a matrix does next
- A map followed by another has the product of the matrices, in the order of the maps from right to left; see
matrix multiplication.
- A square matrix is invertible exactly when its determinant is not 0, and the map then can be undone.
- The dimensions of the image and the kernel add up to n; see
rank.
Common mistakes
- The wrong shape. A map from ℝⁿ to ℝᵐ has m rows and n columns. The T above has 2 rows and 3 columns, not
the other way round.
- Images as rows. T(e₁), T(e₂), … are the columns. With rows the matrix is the transpose and gives another
map.
- Calling a map linear when it is not. T(x, y) = (x + 1, y) is not, since T(0, 0) = (1, 0). Neither is
T(x, y) = (xy, x), since doubling the vector multiplies the first coordinate by 4.
- Mixing up the basis. The columns are the images in the coordinates of the target space, and the matrix
here is for the standard bases.
Frequently asked questions
How do I find the matrix if only T(u) and T(v) are given for a basis (u, v)?
Write e₁ and e₂ as combinations of u and v, using the coordinates from
basis and dimension, and apply T to the
combinations. As matrices, A = [T(u) T(v)]·[u v]⁻¹, where [u v] has u and v as its columns.
Is every matrix the matrix of a linear map?
Yes. x ↦ Ax is linear for any m×n matrix A, and its columns are the images of the standard basis vectors.
What is the kernel of a map?
The vectors x with T(x) = 0, the null space of A. The image is the set of all T(x), the span of the columns.