Prerequisite · Linear Algebra

Matrix Representations and Change of Basis

17 min read
By the end of this reading you will be able to:
  • Construct the matrix of a linear map in given bases by applying the map to each basis vector and converting to output-basis coordinates
  • Compute the matrix of a composed map as the product of individual matrices in the correct order
  • Perform a change of basis using the transition matrix and verify the result by converting coordinates
  • Explain similarity (B = P-inv AP) as the same map viewed in a different basis and list the invariants it preserves

Representing a Linear Map as a Matrix

Every linear map h:VWh: V \to W between finite-dimensional spaces can be encoded as a matrix once bases are chosen for both spaces.

Construction: fix a basis B=β1,,βnB = \langle\vec{\beta}_1, \ldots, \vec{\beta}_n\rangle for VV and D=δ1,,δmD = \langle\vec{\delta}_1, \ldots, \vec{\delta}_m\rangle for WW. The matrix representation RepB,D(h)\mathrm{Rep}_{B,D}(h) is the m×nm \times n matrix whose jj-th column is the coordinate vector of h(βj)h(\vec{\beta}_j) with respect to DD:

RepB,D(h)=[RepD(h(β1))        RepD(h(βn))]\mathrm{Rep}_{B,D}(h) = \left[\, \mathrm{Rep}_D(h(\vec{\beta}_1)) \;\big|\; \cdots \;\big|\; \mathrm{Rep}_D(h(\vec{\beta}_n)) \,\right]

Applying the map becomes matrix-vector multiplication: if v\vec{v} has coordinates RepB(v)=c\mathrm{Rep}_B(\vec{v}) = \vec{c}, then

RepD(h(v))=RepB,D(h)c\mathrm{Rep}_D(h(\vec{v})) = \mathrm{Rep}_{B,D}(h) \cdot \vec{c}

The representation depends on the choice of bases. Same map, different bases, different matrix.

Matrix of a Composition

If g:VWg: V \to W and f:WXf: W \to X are linear maps with bases B,D,EB, D, E respectively, the matrix of the composition is the product of the matrices:

RepB,E(fg)=RepD,E(f)RepB,D(g)\mathrm{Rep}_{B,E}(f \circ g) = \mathrm{Rep}_{D,E}(f) \cdot \mathrm{Rep}_{B,D}(g)

This is why matrix multiplication is defined the way it is. The non-obvious definition of matrix multiplication (AB)ik=jAijBjk(AB)_{ik} = \sum_j A_{ij}B_{jk} is precisely what is required for the composition law to hold.

Change of Basis

Suppose you have two bases BB and B^\hat{B} for the same space VV. The change-of-basis matrix RepB,B^(idV)\mathrm{Rep}_{B,\hat{B}}(\text{id}_V) converts coordinates: if v\vec{v} has coordinates c\vec{c} in basis BB, its coordinates in B^\hat{B} are

c^=RepB,B^(idV)c\hat{\vec{c}} = \mathrm{Rep}_{B,\hat{B}}(\text{id}_V) \cdot \vec{c}

Constructing this matrix: column jj is the coordinate expression of βj\vec{\beta}_j (the jj-th BB-basis vector) in terms of B^\hat{B}.

In Rn\mathbb{R}^n: if BB is the standard basis and B^\hat{B} is any other basis (columns of matrix PP), then the change-of-basis matrix from B^\hat{B} to BB is PP itself (since the columns of PP are the B^\hat{B}-basis vectors expressed in standard coordinates). The inverse P1P^{-1} converts from BB to B^\hat{B}.

Similarity

Two matrices AA and A^\hat{A} are similar if there exists an invertible matrix PP such that:

A^=P1AP\hat{A} = P^{-1}AP

Similar matrices represent the same linear transformation with respect to different bases. The matrix PP is the change-of-basis matrix between the two coordinate systems.

Properties preserved under similarity (invariants of the transformation, independent of basis):

  • Determinant: det(A^)=det(A)\det(\hat{A}) = \det(A)
  • Trace: tr(A^)=tr(A)\text{tr}(\hat{A}) = \text{tr}(A)
  • Eigenvalues (same set of eigenvalues)
  • Rank and nullity
  • Characteristic polynomial

When we diagonalize a matrix — find P1AP=ΛP^{-1}AP = \Lambda where Λ\Lambda is diagonal — we are finding the basis in which the transformation acts most simply: pure scaling along independent axes.

Inverse of a Map

If h:VWh: V \to W is an isomorphism, its inverse h1:WVh^{-1}: W \to V is also a linear map (it can be checked directly from the axioms). Its matrix representation satisfies:

RepD,B(h1)=[RepB,D(h)]1\mathrm{Rep}_{D,B}(h^{-1}) = \left[\mathrm{Rep}_{B,D}(h)\right]^{-1}

The matrix inverse corresponds to the inverse map. Computing the inverse of a matrix AA by row-reducing [AI][A \mid I] to [IA1][I \mid A^{-1}] is equivalent to finding the change-of-basis from the identity to AA.

References
Hefferon 2020 — Linear Algebra, Ch. Three §III–V: Computing Linear Maps, Change of Basis