A linear map can be studied abstractly as a function between vector spaces. It can also be studied concretely as a matrix. The connection between these two descriptions is one of the main bridges in linear algebra.
If V and W are finite-dimensional vector spaces over the same field F, and
T:V→W
is linear, then T can be represented by a matrix after bases are chosen for V and W. The matrix stores the coordinates of the images of the basis vectors of V. In the standard coordinate spaces, a linear transformation T:Rn→Rm has an m×n matrix A such that T(x)=Ax. The columns of A are the images of the standard basis vectors.
34.1 The Basic Idea
A linear map is determined by what it does to a basis.
Let
B=(v1,v2,…,vn)
be a basis of V. Every vector v∈V can be written uniquely as
v=c1v1+c2v2+⋯+cnvn.
If T:V→W is linear, then
T(v)=c1T(v1)+c2T(v2)+⋯+cnT(vn).
Thus, to know T(v) for every v, it is enough to know
T(v1),T(v2),…,T(vn).
A matrix representation is a compact way to store these output vectors.
34.2 Standard Matrix Representation
Consider a linear transformation
T:Rn→Rm.
Let
e1,e2,…,en
be the standard basis of Rn. The standard matrix of T is the m×n matrix
A=∣T(e1)∣∣T(e2)∣⋯∣T(en)∣.
That is, the first column of A is T(e1), the second column is T(e2), and so on.
Then, for every
x=x1x2⋮xn,
we have
x=x1e1+x2e2+⋯+xnen.
By linearity,
T(x)=x1T(e1)+x2T(e2)+⋯+xnT(en).
But this is exactly matrix multiplication:
T(x)=Ax.
So a linear transformation on coordinate space is the same data as a matrix.
34.3 Example in R2
Define
T:R2→R2
by
T[xy]=[2x+y3x−y].
The standard basis vectors are
e1=[10],e2=[01].
Compute their images:
T(e1)=T[10]=[23],
and
T(e2)=T[01]=[1−1].
Therefore the standard matrix of T is
A=[231−1].
Indeed,
A[xy]=[231−1][xy]=[2x+y3x−y].
This agrees with the original definition of T.
34.4 Matrix Size
The size of the representing matrix is determined by the dimensions of the domain and codomain.
If
T:Rn→Rm,
then the matrix of T has m rows and n columns.
The number of columns equals the number of input coordinates. The number of rows equals the number of output coordinates.
Thus:
Linear map
Matrix size
T:R2→R2
2×2
T:R3→R2
2×3
T:R2→R4
4×2
T:Rn→Rm
m×n
This convention matches matrix-vector multiplication:
(m×n)(n×1)=(m×1).
The input vector has n entries, and the output vector has m entries.
34.5 From Matrix to Linear Map
Every m×n matrix defines a linear map.
Let
A∈Fm×n.
Define
TA:Fn→Fm
by
TA(x)=Ax.
Then TA is linear. For vectors u,v∈Fn and scalar c∈F,
TA(u+v)=A(u+v)=Au+Av=TA(u)+TA(v),
and
TA(cu)=A(cu)=cAu=cTA(u).
Thus matrices and linear maps between coordinate spaces are equivalent descriptions.
The matrix is the data. The linear map is the action.
34.6 From Linear Map to Matrix
Every linear map between finite-dimensional coordinate spaces gives a matrix.
Let
T:Fn→Fm
be linear. Let e1,…,en be the standard basis of Fn. Define
A=∣T(e1)∣∣T(e2)∣⋯∣T(en)∣.
Then
T(x)=Ax
for every x∈Fn.
This construction is unique. If another matrix B satisfies
T(x)=Bx
for every x, then in particular
T(ej)=Bej
for each j. But Bej is the j-th column of B. Hence every column of B equals the corresponding column of A. Therefore
B=A.
So a linear transformation between coordinate spaces has one and only one standard matrix.
34.7 Coordinates Relative to a Basis
The previous sections used the standard basis. For abstract vector spaces, or for nonstandard coordinate systems, we must use coordinates relative to chosen bases.
Let
B=(v1,v2,…,vn)
be an ordered basis of V. If
v=c1v1+c2v2+⋯+cnvn,
then the coordinate vector of v relative to B is
[v]B=c1c2⋮cn.
The order of the basis matters. Changing the order changes the coordinate vector.
For example, in R2, let
B=([11],[1−1]).
If
v=[31],
then we solve
[31]=c1[11]+c2[1−1].
This gives
c1+c2=3,c1−c2=1.
Solving,
c1=2,c2=1.
Therefore
[v]B=[21].
34.8 Matrix of a Linear Map Relative to Bases
Let
T:V→W
be linear. Let
B=(v1,…,vn)
be an ordered basis of V, and let
C=(w1,…,wm)
be an ordered basis of W.
The matrix of T relative to B and C is the m×n matrix whose j-th column is the coordinate vector of T(vj) in the basis C:
The notation C←B means that inputs are written in basis B, and outputs are written in basis C.
The defining relation is
[T(v)]C=[T]C←B[v]B.
This equation is the coordinate form of the linear map.
34.9 Example with Nonstandard Bases
Let
T:R2→R2
be defined by
T[xy]=[x+yx−y].
Let the domain basis be
B=([11],[1−1]),
and let the codomain basis be the standard basis
E=(e1,e2).
Compute the images of the basis vectors:
T[11]=[20],
and
T[1−1]=[02].
Since E is the standard basis, these are already their coordinate vectors in E. Therefore
[T]E←B=[2002].
With respect to this input basis, the transformation looks like simple scaling by 2.
This illustrates an important point: the same linear map can have different matrices under different choices of bases.
34.10 The Same Map, Different Matrices
The matrix is not the transformation itself. It is the coordinate description of the transformation.
A linear map T:V→W exists independently of coordinates. To write it as a matrix, we choose a basis for V and a basis for W. Different choices may produce different matrices.
For example, a rotation or reflection in the plane has a familiar standard matrix. But if we describe the plane using a different basis, the entries of the matrix change.
The transformation remains the same. Only its coordinate representation changes.
This distinction prevents a common error: two different matrices may represent the same linear map in different bases, and the same matrix may represent different maps when different bases are being used.
34.11 Change-of-Coordinates Matrices
Let
B=(v1,…,vn)
be a basis of Fn. The change-of-coordinates matrix from B-coordinates to standard coordinates is
PB=∣v1∣∣v2∣⋯∣vn∣.
If x is a vector in Fn, then
x=PB[x]B.
Thus PB converts coordinates in basis B into standard coordinates.
Since B is a basis, PB is invertible. Therefore
[x]B=PB−1x.
The inverse matrix converts standard coordinates into B-coordinates.
34.12 Matrix Relative to Domain and Codomain Bases
Suppose T:Fn→Fm has standard matrix A. Let B be a basis of Fn, and let C be a basis of Fm.
Let PB be the matrix with columns equal to the basis vectors in B, and let PC be the matrix with columns equal to the basis vectors in C.
We want a matrix M such that
[T(x)]C=M[x]B.
Since
x=PB[x]B,
we have
T(x)=Ax=APB[x]B.
Now convert the output to C-coordinates:
[T(x)]C=PC−1T(x)=PC−1APB[x]B.
Therefore
M=PC−1APB.
So
[T]C←B=PC−1APB.
This formula is the main computational rule for changing matrix representations.
34.13 Operators and Similarity
A linear operator is a linear map from a vector space to itself:
T:V→V.
When the same basis B is used for both the domain and codomain, the matrix is written
[T]B.
If A is the standard matrix of a linear operator on Fn, and B is a basis with change-of-coordinates matrix PB, then
[T]B=PB−1APB.
Matrices related by
B=P−1AP
are called similar matrices.
Similar matrices represent the same linear operator in different bases. They have many shared properties, including determinant, trace, rank, characteristic polynomial, and eigenvalues.
This is why choosing a good basis matters. A complicated matrix may become simpler after a change of basis.
34.14 Diagonal Representation
A particularly useful case occurs when a linear operator has a basis of eigenvectors.
Let
T:V→V
have basis
B=(v1,…,vn)
such that
T(vj)=λjvj
for each j. Then the matrix of T in basis B is diagonal:
[T]B=λ10⋮00λ2⋮0⋯⋯⋱⋯00⋮λn.
The reason is simple. The j-th column of [T]B is the coordinate vector of T(vj) in basis B. Since
T(vj)=λjvj,
that coordinate vector has λj in position j and zeros elsewhere.
Diagonalization is the process of finding such a basis when it exists.
34.15 Composition of Linear Maps
Matrix representation converts composition of linear maps into multiplication of matrices.
Let
T:U→V
and
S:V→W
be linear maps. Choose bases A for U, B for V, and C for W.
Then
[T]B←A
represents T, and
[S]C←B
represents S.
The composition
S∘T:U→W
has matrix
[S∘T]C←A=[S]C←B[T]B←A.
The order of multiplication follows the order of application: first T, then S. With column vectors, the first transformation appears on the right. Matrix multiplication represents composition of linear transformations.
34.16 Inverses
If T:V→W is an isomorphism, then T−1:W→V exists and is linear.
Choose bases B for V and C for W. If
M=[T]C←B,
then the matrix of the inverse map is
[T−1]B←C=M−1.
Indeed,
[T−1(T(v))]B=[v]B.
In coordinates,
[T−1]B←C[T]C←B[v]B=[v]B.
Therefore
[T−1]B←CM=I.
So
[T−1]B←C=M−1.
A linear map is invertible exactly when its representing matrix is invertible.
34.17 Kernel and Image in Matrix Form
Let
M=[T]C←B.
Then the kernel of T corresponds to the null space of M in coordinates:
v∈ker(T)⟺M[v]B=0.
Thus
[ker(T)]B=ker(M).
Similarly, the image of T corresponds to the column space of M in codomain coordinates:
[im(T)]C=col(M).
This means that row reduction and matrix methods can be used to compute bases for kernels and images of abstract linear maps, once bases have been chosen.
34.18 Example: A Polynomial Map
Let P2 be the vector space of polynomials of degree at most 2, and let P1 be the vector space of polynomials of degree at most 1.
Define
D:P2→P1
by differentiation:
D(p)=p′.
Choose the ordered basis
B=(1,x,x2)
for P2, and
C=(1,x)
for P1.
Compute the images of the basis vectors:
D(1)=0,D(x)=1,D(x2)=2x.
Now write each image in the basis C:
[D(1)]C=[00],[D(x)]C=[10],[D(x2)]C=[02].
Therefore
[D]C←B=[001002].
If
p=a+bx+cx2,
then
[p]B=abc.
Multiplying,
[D]C←B[p]B=[001002]abc=[b2c].
This is the coordinate vector of
p′=b+2cx
in the basis C=(1,x).
34.19 Example: Integration as a Linear Map
Let P1 be the vector space of polynomials of degree at most 1, and let P2 be the vector space of polynomials of degree at most 2.
Define
I:P1→P2
by
I(p)(x)=∫0xp(t)dt.
Use bases
B=(1,x)
for P1, and
C=(1,x,x2)
for P2.
Compute:
I(1)=x,
and
I(x)=2x2.
Therefore
[I(1)]C=010,[I(x)]C=0021.
So
[I]C←B=0100021.
If
p=a+bx,
then
[p]B=[ab].
Multiplying gives
[I]C←B[p]B=0ab/2,
which represents
ax+2bx2.
34.20 Reading a Matrix as a Linear Map
A matrix can be read column by column.
If
A=[1043−25],
then A represents a map
TA:F3→F2.
The columns are
a1=[10],a2=[43],a3=[−25].
For
x=x1x2x3,
we have
Ax=x1a1+x2a2+x3a3.
Thus a matrix does not merely multiply numbers. It forms a linear combination of its columns using the input coordinates as coefficients.
This column view explains why the image of A is the span of its columns.
34.21 Row View
The row view is also useful.
If A is an m×n matrix, then each row defines a linear functional on Fn. The output vector Ax contains the dot products of the rows of A with x.
For
A=r1r2⋮rm,
where each ri is a row vector,
Ax=r1xr2x⋮rmx.
The row view is useful for systems of equations. The equation
Ax=b
means that each row imposes one linear equation on x.
The column view emphasizes the image. The row view emphasizes constraints.
34.22 Standard Geometric Matrices
Many geometric transformations in the plane are represented by simple matrices.
A scaling transformation is
[a00b].
A reflection across the x-axis is
[100−1].
A projection onto the x-axis is
[1000].
A shear parallel to the x-axis is
[10k1].
A rotation through angle θ is
[cosθsinθ−sinθcosθ].
These matrices act on column vectors in R2. They are linear because they keep the origin fixed and preserve linear combinations.
34.23 Common Mistakes
The first common mistake is reversing the matrix size. A map
T:Fn→Fm
has an m×n matrix, not an n×m matrix.
The second common mistake is putting images of basis vectors in rows instead of columns. With column vectors, the image of the j-th basis vector goes in the j-th column.
The third common mistake is forgetting the codomain basis. To form [T]C←B, compute T(vj), then express it in the basis C.
The fourth common mistake is treating a matrix as basis-independent. A matrix represents a linear map only after the relevant bases are known.
The fifth common mistake is using changed columns from a row-reduced matrix as a basis for the original image. Row reduction helps identify pivot columns, but the corresponding basis vectors for the image must be taken from the original matrix.
34.24 Summary
A matrix representation gives coordinates for a linear map.
For a linear map
T:V→W,
with ordered basis B=(v1,…,vn) of V and ordered basis C=(w1,…,wm) of W, the matrix of T is
In standard coordinate spaces, the matrix of T:Rn→Rm has columns T(e1),…,T(en), and
T(x)=Ax.
Composition of linear maps becomes matrix multiplication. Inverses of linear maps become inverse matrices. A change of basis changes the matrix representation by multiplication with change-of-coordinates matrices.
The linear map is the coordinate-free object. The matrix is its coordinate description.
← → section · ↑ ↓ slide · Space next · F fullscreen · Esc exit