Type a command or search the notes. Tab cycles completions. Up and down recall history when blank. Escape dismisses, then leaves the prompt.
MATH
[1251]

Matrix representations

Writing a linear map in coordinates relative to ordered bases.

This page writes a linear map T:V→WT:V\to W between finite-dimensional spaces as a matrix. A basis gives each vector unique coordinates and a linear map is fixed by its values on a basis, so the matrix records the coordinate vectors of the images of the domain basis. The page then reads injectivity, surjectivity and invertibility of TT from its matrix.

The coordinate matrix

[DEFINITION]

Linear map

Let VV and WW be vector spaces over the same field FF. A function T:V→WT:V\to W is a linear map if

T(u+v)=T(u)+T(v)for all u,v∈V,T(u+v)=T(u)+T(v)\qquad\text{for all }u,v\in V, T(ωu)=ωT(u)for all ω∈F, u∈V.T(\omega u)=\omega T(u)\qquad\text{for all }\omega\in F,\ u\in V.
[DEFINITION]

Coordinate vector

Let B=(u1,…,un)B=(u_1,\ldots,u_n) be an ordered basis for a vector space VV. If

u=x1u1+⋯+xnun,u=x_1u_1+\cdots+x_nu_n,

then the coordinate vector of uu with respect to BB is the column

[u]B=(x1⋮xn).[u]_B= \begin{pmatrix} x_1\\ \vdots\\ x_n \end{pmatrix}.
[DEFINITION]

Basis

A set BB in a vector space VV is a basis for VV if it is linearly independent and spans VV.

The matrix depends on the chosen bases, but the linear map TT does not. Changing a basis changes the coordinate columns used to write TT, not which vectors TT sends to which outputs.

Using the matrix takes three steps: write the input as a coordinate column in BVB_V, multiply by AA and read the result as a coordinate column in BWB_W.

[THEOREM]

Matrix representation of a linear map

Let T:V→WT:V\to W be a linear map, where dim⁡(V)=n\dim(V)=n and dim⁡(W)=m\dim(W)=m. For ordered bases

BV=(v1,…,vn),BW=(w1,…,wm),B_V=(v_1,\ldots,v_n),\qquad B_W=(w_1,\ldots,w_m),

form the coordinate columns

aj=[T(vj)]BW(j=1,…,n).a_j=[T(v_j)]_{B_W}\qquad (j=1,\ldots,n).

Then

A=(a1⋯an)A=\begin{pmatrix}a_1&\cdots&a_n\end{pmatrix}

is the unique m×nm\times n matrix satisfying

[T(v)]BW=A[v]BVfor every v∈V.[T(v)]_{B_W}=A[v]_{B_V}\qquad\text{for every }v\in V.

We call AA the matrix representation of TT relative to BVB_V and BWB_W and may write it as [T]BVBW[T]_{B_V}^{B_W}.

With this notation, the subscript names the domain basis and the superscript names the codomain basis, matching the direction [v]BV↦[T(v)]BW[v]_{B_V}\mapsto[T(v)]_{B_W} in the displayed coordinate identity.

The jjth column is the coordinate vector of T(vj)T(v_j) in the codomain basis. Thus the number of columns is the dimension of the domain and the number of entries in each column is the dimension of the codomain.

[PROOF]

Write

v=c1v1+⋯+cnvn.v=c_1v_1+\cdots+c_nv_n.

Then

[v]BV=(c1⋮cn).[v]_{B_V}= \begin{pmatrix} c_1\\ \vdots\\ c_n \end{pmatrix}.

Preservation of finite linear combinations gives

[T(v)]BW=c1[T(v1)]BW+⋯+cn[T(vn)]BW=c1a1+⋯+cnan=A[v]BV.\begin{aligned} [T(v)]_{B_W} &=c_1[T(v_1)]_{B_W}+\cdots+c_n[T(v_n)]_{B_W}\\ &=c_1a_1+\cdots+c_na_n\\ &=A[v]_{B_V}. \end{aligned}

This proves the coordinate identity. If another matrix has the same identity, apply it to each vjv_j. Since [vj]BV[v_j]_{B_V} is the jjth standard coordinate vector, its jjth column must be [T(vj)]BW=aj[T(v_j)]_{B_W}=a_j. Every column is therefore forced, so AA is unique.

The theorem turns the basis-data principle into a construction. The order of both bases matters: it fixes the order of the entries in each coordinate column and the order of the columns themselves.

Building and using the matrix

[METHOD]

Construct a matrix representation

For a linear map T:V→WT:V\to W:

  1. choose an ordered basis BV=(v1,…,vn)B_V=(v_1,\ldots,v_n) for VV and an ordered basis BW=(w1,…,wm)B_W=(w_1,\ldots,w_m) for WW;
  2. evaluate T(vj)T(v_j) for each domain basis vector;
  3. compute the codomain coordinate vector [T(vj)]BW[T(v_j)]_{B_W} for each image;
  4. place these coordinate vectors, in the same order, as the columns of the m×nm\times n matrix.
[EXAMPLE]

Differentiation on polynomial spaces

For n≥1n\ge 1, differentiation is the real-linear map

D:Pn(R)→Pn−1(R),D(p)=p′.D:P_n(\mathbb R)\to P_{n-1}(\mathbb R),\qquad D(p)=p'.

Take n=4n=4 and let

T:P4(R)→P3(R),T(p)=dp(x)dx,T:P_4(\mathbb R)\to P_3(\mathbb R),\qquad T(p)=\frac{dp(x)}{dx},

and use the ordered standard polynomial bases

BV=(1,x,x2,x3,x4),BW=(1,x,x2,x3).B_V=(1,x,x^2,x^3,x^4),\qquad B_W=(1,x,x^2,x^3).

Evaluate TT on each domain basis vector and find the coordinates of the result in BWB_W:

domain vectorimagecodomain coordinate vector1T(1)=0(0000)xT(x)=1(1000)x2T(x2)=2x(0200)x3T(x3)=3x2(0030)x4T(x4)=4x3(0004)\begin{array}{c|c|c} \text{domain vector} & \text{image} & \text{codomain coordinate vector}\\ \hline 1 & T(1)=0 & \begin{pmatrix}0\\0\\0\\0\end{pmatrix}\\[6pt] x & T(x)=1 & \begin{pmatrix}1\\0\\0\\0\end{pmatrix}\\[6pt] x^2 & T(x^2)=2x & \begin{pmatrix}0\\2\\0\\0\end{pmatrix}\\[6pt] x^3 & T(x^3)=3x^2 & \begin{pmatrix}0\\0\\3\\0\end{pmatrix}\\[6pt] x^4 & T(x^4)=4x^3 & \begin{pmatrix}0\\0\\0\\4\end{pmatrix} \end{array}

These coordinate vectors, in order, are the columns of the matrix representation:

A=[T]BVBW=(01000002000003000004).A=[T]_{B_V}^{B_W} = \begin{pmatrix} 0&1&0&0&0\\ 0&0&2&0&0\\ 0&0&0&3&0\\ 0&0&0&0&4 \end{pmatrix}.

For

p=a0+a1x+a2x2+a3x3+a4x4,p=a_0+a_1x+a_2x^2+a_3x^3+a_4x^4,[p]BV=(a0a1a2a3a4),A[p]BV=(a12a23a34a4)=[T(p)]BW.[p]_{B_V}= \begin{pmatrix} a_0\\a_1\\a_2\\a_3\\a_4 \end{pmatrix}, \qquad A[p]_{B_V}= \begin{pmatrix} a_1\\2a_2\\3a_3\\4a_4 \end{pmatrix} =[T(p)]_{B_W}.

This agrees with

T(p)=a1+2a2x+3a3x2+4a4x3.T(p)=a_1+2a_2x+3a_3x^2+4a_4x^3.

The zero first column records T(1)=0T(1)=0, so differentiation is not injective. The four pivot columns give rank 4=dim⁡(P3(R))4=\dim(P_3(\mathbb R)), so it is surjective. In words, differentiation loses the constant direction but still reaches every polynomial of degree at most 33.

With standard bases, a vector in Rn\mathbb R^n equals its own coordinate column and the matrix representation is the matrix map from the geometric examples. For these maps, operations on maps match operations on matrices.

[PROPOSITION]

Operations on matrix representations

Let TA:Rn→RmT_A:\mathbb R^n\to\mathbb R^m and TB:Rn→RmT_B:\mathbb R^n\to\mathbb R^m be the standard-coordinate matrix maps

TA(x)=Ax,TB(x)=Bx.T_A(x)=Ax,\qquad T_B(x)=Bx.

Then

(TA+TB)(x)=(A+B)x,(ωTA)(x)=(ωA)x.(T_A+T_B)(x)=(A+B)x,\qquad (\omega T_A)(x)=(\omega A)x.

If TA:Rp→RmT_A:\mathbb R^p\to\mathbb R^m and TB:Rn→RpT_B:\mathbb R^n\to\mathbb R^p, then

(TA∘TB)(y)=A(By)=(AB)y.(T_A\circ T_B)(y)=A(By)=(AB)y.

Thus the matrix of a sum, scalar multiple, or composition is respectively the sum, scalar multiple, or product of the matrices, with the product ordered to match the composition.

For non-standard bases, the same rules hold when the matrices use the same domain and codomain bases for a sum and a matching intermediate basis for a composition. Otherwise the coordinate columns refer to different bases and cannot be combined directly.

Reading map properties in coordinates

The coordinate identity transfers questions about the kernel and image of TT to its matrix, where rank-nullity applies to coordinate columns. This section defines injective, surjective and inverse maps and reads each property from the matrix.

[DEFINITION]

Injective map

A map T:V→WT:V\to W is injective, or one-to-one, when

T(v1)=T(v2)⟹v1=v2.T(v_1)=T(v_2)\quad\Longrightarrow\quad v_1=v_2.
[COROLLARY]

Injectivity and the kernel

A linear map T:V→WT:V\to W is injective if and only if

ker⁡(T)={0}.\ker(T)=\{0\}.

If VV is finite-dimensional, this is equivalent to nullity⁡(T)=0\operatorname{nullity}(T)=0.

If T(v1)=T(v2)T(v_1)=T(v_2), then T(v1−v2)=0T(v_1-v_2)=0. A trivial kernel therefore gives v1=v2v_1=v_2. Conversely, injectivity forces any vector with T(v)=T(0)T(v)=T(0) to be v=0v=0.

[DEFINITION]

Surjective map

A map T:V→WT:V\to W is surjective, or onto, when every w∈Ww\in W equals T(v)T(v) for some v∈Vv\in V. Equivalently, im⁡(T)=W\operatorname{im}(T)=W.

[DEFINITION]

Bijective map

A map is bijective when it is both injective and surjective.

[DEFINITION]

Identity map

The identity map on VV is

id⁡V:V→V,id⁡V(v)=v.\operatorname{id}_V:V\to V,\qquad \operatorname{id}_V(v)=v.
[DEFINITION]

Inverse map

For a map T:V→WT:V\to W, a map S:W→VS:W\to V is an inverse of TT when

S∘T=id⁡V,T∘S=id⁡W.S\circ T=\operatorname{id}_V, \qquad T\circ S=\operatorname{id}_W.

The first composition is the left-inverse condition and the second is the right-inverse condition. An inverse satisfies both.

Do not confuse the transpose with the inverse: ATA^{\mathsf T} transposes rows and columns, while A−1A^{-1} reverses the map when a two-sided inverse exists. Taking reciprocals of individual entries does not generally produce A−1A^{-1}. For an orthogonal matrix QQ, the special identity Q−1=QTQ^{-1}=Q^{\mathsf T} follows from its orthonormal columns; see the symmetric-matrix diagonalisation.

[COROLLARY]

Properties read from a matrix representation

Let A=[T]BVBWA=[T]_{B_V}^{B_W} be the matrix representation of T:V→WT:V\to W over a scalar field F\mathbb F, with dim⁡(V)=n\dim(V)=n and dim⁡(W)=m\dim(W)=m. Then

ker⁡(A)={[v]BV:v∈ker⁡(T)}\ker(A)=\{[v]_{B_V}:v\in\ker(T)\}

and

im⁡(A)={[w]BW:w∈im⁡(T)}.\operatorname{im}(A)=\{[w]_{B_W}:w\in\operatorname{im}(T)\}.

Since a linear map is injective exactly when its kernel is trivial and surjective exactly when its image is the codomain, these identities give the coordinate tests ker⁡(A)={0}\ker(A)=\{0\} and im⁡(A)=Fm\operatorname{im}(A)=\mathbb F^m. Here ker⁡(A)\ker(A) and im⁡(A)\operatorname{im}(A) are sets of coordinate columns; the displayed equalities identify them with the corresponding abstract subspaces through the coordinate maps.

Consequently,

nullity⁡(A)=nullity⁡(T),rank⁡(A)=rank⁡(T).\operatorname{nullity}(A)=\operatorname{nullity}(T), \qquad \operatorname{rank}(A)=\operatorname{rank}(T).

Hence TT is injective if and only if nullity⁡(A)=0\operatorname{nullity}(A)=0 and TT is surjective if and only if rank⁡(A)=m\operatorname{rank}(A)=m. If m=nm=n, then TT is bijective if and only if AA is invertible.

[EXAMPLE]

Integration gives an injective map

Define

I:Pn(R)→Pn+1(R),I(p)(x)=∫0xp(t) dt.I:P_n(\mathbb R)\to P_{n+1}(\mathbb R), \qquad I(p)(x)=\int_0^x p(t)\,dt.

The integral is linear in pp, so II is a linear map. If I(p)I(p) is the zero polynomial, differentiating the identity I(p)(x)=0I(p)(x)=0 gives p(x)=0p(x)=0 for every xx, so ker⁡(I)={0}\ker(I)=\{0\}. Thus II is injective. Its rank is dim⁡(Pn(R))=n+1\dim(P_n(\mathbb R))=n+1, which is smaller than dim⁡(Pn+1(R))=n+2\dim(P_{n+1}(\mathbb R))=n+2, so it is not surjective. Concretely, every polynomial I(p)I(p) vanishes at x=0x=0, so the constant polynomial 11 is not in the image.

Invertibility in equal dimensions

When the domain and codomain have the same finite dimension, rank-nullity makes injectivity and surjectivity equivalent. A bijective linear map has an inverse and in coordinates that inverse is given by the inverse matrix.

[PROPOSITION]

Bijectivity in equal dimensions

For a linear map T:V→WT:V\to W between finite-dimensional vector spaces:

  1. if TT is bijective, then dim⁡(V)=dim⁡(W)\dim(V)=\dim(W);
  2. if dim⁡(V)=dim⁡(W)\dim(V)=\dim(W) and TT is injective, then TT is surjective;
  3. if dim⁡(V)=dim⁡(W)\dim(V)=\dim(W) and TT is surjective, then TT is injective.

Indeed, if TT is bijective, then its kernel is trivial and its image is all of WW. Rank-nullity therefore gives dim⁡(V)=rank⁡(T)=dim⁡(W)\dim(V)=\operatorname{rank}(T)=\dim(W). If the dimensions are equal and TT is injective, then nullity is 00, so rank equals dim⁡(V)=dim⁡(W)\dim(V)=\dim(W) and TT is surjective. The surjective case is dual: rank equals dim⁡(W)=dim⁡(V)\dim(W)=\dim(V), so nullity is 00 and TT is injective.

[THEOREM]

Equivalent invertibility conditions

For a linear map T:V→WT:V\to W between finite-dimensional spaces, the following conditions are equivalent when dim⁡(V)=dim⁡(W)\dim(V)=\dim(W):

  1. TT is invertible;
  2. TT is bijective;
  3. TT has a left inverse;
  4. TT has a right inverse.

A left inverse makes TT injective and a right inverse makes TT surjective. In equal dimensions either property makes TT bijective, so the one-sided inverse is then the two-sided inverse of TT.

[THEOREM]

Inverse maps in coordinates

Let VV and WW be finite-dimensional vector spaces, let T:V→WT:V\to W be bijective and fix ordered bases BVB_V of VV and BWB_W of WW. Then T−1:W→VT^{-1}:W\to V is linear. If

A=[T]BVBW,A=[T]_{B_V}^{B_W},

then AA is square and

[T−1]BWBV=A−1.[T^{-1}]_{B_W}^{B_V}=A^{-1}.

Equivalently, for every w∈Ww\in W,

[T−1(w)]BV=A−1[w]BW.[T^{-1}(w)]_{B_V}=A^{-1}[w]_{B_W}.

Conversely, if the matrix representation AA is invertible, then TT is bijective.

The formula follows by writing w=T(v)w=T(v), so that [w]BW=A[v]BV[w]_{B_W}=A[v]_{B_V} and hence [v]BV=A−1[w]BW[v]_{B_V}=A^{-1}[w]_{B_W}. The two compositions are represented by A−1AA^{-1}A and AA−1AA^{-1}, which return the original coordinate vector. To check that T−1T^{-1} is linear, write w1=T(v1)w_1=T(v_1) and w2=T(v2)w_2=T(v_2). Then T(αv1+βv2)=αw1+βw2T(\alpha v_1+\beta v_2)=\alpha w_1+\beta w_2 and uniqueness of preimages gives T−1(αw1+βw2)=αT−1(w1)+βT−1(w2)T^{-1}(\alpha w_1+\beta w_2)=\alpha T^{-1}(w_1)+\beta T^{-1}(w_2).

[EXAMPLE]

A scalar map and its inverse

Let α∈R∖{0}\alpha\in\mathbb R\setminus\{0\} and define

T:Pn(R)→Pn(R),T(p)=αp.T:P_n(\mathbb R)\to P_n(\mathbb R),\qquad T(p)=\alpha p.

Relative to the standard polynomial basis (1,x,…,xn)(1,x,\ldots,x^n),

A=[T]=αI.A=[T]=\alpha I.

The candidate inverse is

S:Pn(R)→Pn(R),S(p)=1αp,S:P_n(\mathbb R)\to P_n(\mathbb R),\qquad S(p)=\frac{1}{\alpha}p,

whose matrix is

[S]=1αI=A−1.[S]=\frac{1}{\alpha}I=A^{-1}.

For every p∈Pn(R)p\in P_n(\mathbb R),

S(T(p))=S(αp)=p,T(S(p))=T(1αp)=p.S(T(p))=S(\alpha p)=p, \qquad T(S(p))=T\left(\frac{1}{\alpha}p\right)=p.

Thus TT is bijective with inverse SS and its matrix [S]=A−1[S]=A^{-1} matches the theorem.

The eigenvalues chapter asks when a choice of basis makes the matrix of an operator diagonal.

On this page