# 11.2: Matrix of a Linear Transformation (Redux)

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

Not only do bases allow us to describe arbitrary vectors as column vectors, they also permit linear transformations to be expressed as matrices. This is a very powerful tool for computations, which is covered in chapter 7 and reviewed again here.

Suppose we have a linear transformation $$L \colon V\rightarrow W$$ and ordered input and output bases $$E=(e_{1}, \ldots, e_{n})$$ and $$F=(f_{1}, \ldots, f_{m})$$ for $$V$$ and $$W$$ respectively (of course, these need not be the standard basis--in all likelihood $$V$$ is $$\textit{not}$$ $$\mathbb{R}^{n}$$). Since for each $$e_{j}$$, $$L(e_{j})$$ is a vector in $$W$$, there exist unique numbers $$m^{i}_{j}$$ such that
$L(e_j)=f_{1}m^{1}_{j} + \cdots + f_{m}m^{m}_{j} =(f_{1},\ldots, f_{m}) \begin{pmatrix}m^{1}_{j}\\\vdots\\m^{m}_{j}\end{pmatrix}\, . = \sum_{i=1}^{m} f_{i}M^{i}_{j} =\begin{pmatrix}f_{1} & f_{2} & \cdots & f_{m}\end{pmatrix}\begin{pmatrix}M^{1}_{j} \\ M^{2}_{j} \\ \vdots \\ M^{m}_{j}\end{pmatrix}\, .$
The number $$m^{i}_{j}$$ is the $$i$$th component of $$L(e_{j})$$ in the basis $$F$$, while the $$f_{i}$$ are vectors (note that if $$\alpha$$ is a scalar, and $$v$$ a vector, $$\alpha v=v\alpha$$, we have used the latter---rather uncommon---notation in the above formula). The numbers $$m^{i}_{j}$$ naturally form a matrix whose $$j$$th column is the column vector displayed above. Indeed, if $$v=e_{1}v^{1}+\cdots+e_{n} v^{n}\, ,$$
Then

$L(v) = L(v^{1}e_{1} + v^{2}e_{2} + \cdots + v^{n}e_{n})$

$~~~~= v^{1}L(e_{1}) + v^{2}L(e_{2}) + \cdots + v^{n}L(e_{n}) = \sum_{j=1}^{m} L(e_{j})v^{j}$

$~~~~= \sum_{j=1}^{m} (f_{1}m_{j}^{1} + \cdots + f_{m}m_{j}^{m})v^{j} = \sum_{i=1}^{n}f_{i}[\sum_{j=1}^{m} M_{j}^{i}v^{j}]$

$~~~~= (f_{1} f_{2} \cdots f_{m}) \begin{pmatrix} m_{1}^{1} & m_{2}^{1} & \cdots & m_{n}^{1} \\ m_{1}^{2} & m_{2}^{2} & & \\ \vdots & & \ddots & \vdots \\ m_{1}^{m} & & \cdots & m_{n}^{m}\end{pmatrix} \begin{pmatrix} v^{1} \\ v^{2} \\ \vdots \\ v^{n} \end{pmatrix} In the column vector-basis notation this equality looks familiar: \[ L\begin{pmatrix}v^{1}\\ \vdots \\ v^{n}\end{pmatrix}_{E} = \left( \left(\!\begin{array}{ccc} m^{1}_{1} & \ldots & m^{1}_{n} \\ \vdots & & \vdots \\ m^{m}_{1} & \ldots & m^{m}_{n} \\ \end{array}\!\right) \begin{pmatrix}v^{1}\\ \vdots \\ v^{n}\end{pmatrix} \right)_{F}.$
The array of numbers $$M=(m^{i}_{j})$$ is called the matrix of $$L$$ in the input and output bases $$E$$ and $$F$$ for $$V$$ and $$W$$, respectively. This matrix will change if we change either of the bases. Also observe that the columns of $$M$$ are computed by examining $$L$$ acting on each basis vector in $$V$$ expanded in the basis vectors of $$W$$.

Example $$\PageIndex{1}$$:

Let $$L \colon P_{1}(t) \mapsto P_{1}(t)$$, such that $$L(a+bt)=(a+b)t$$. Since $$V=P_{1}(t)=W$$, let's choose the same ordered basis $$B=(1-t, 1+t )$$ for $$V$$ and $$W$$.
\begin{eqnarray*}
L(1-t)&=&(1-1)t=\ 0\ =(1-t)\cdot 0 + (1+t)\cdot 0=
\begin{pmatrix}1-t, 1+t\end{pmatrix}\begin{pmatrix}0\\0\end{pmatrix} \\
L(1+t)&=&(1+1)t=2t\ =(1-t)\cdot -1 + (1+t)\cdot 1=
\begin{pmatrix}1-t, 1+t\end{pmatrix}\begin{pmatrix}-1\\1\end{pmatrix}\\
&\Rightarrow&
L\begin{pmatrix}a\\b\end{pmatrix}_{B}=
\left(
\begin{pmatrix}
0 & -1 \\
0 & 1 \\
\end{pmatrix}
\begin{pmatrix}a\\b\end{pmatrix}
\right)_{B}
\end{eqnarray*}

When the vector space is $$\mathbb{R^{n}}$$ and the standard basis is used, the problem of finding the matrix of a linear transformation will seem almost trivial. It is worthwhile working through it once in the above language though:

Example $$\PageIndex{2}$$:

Any vector in $$\Re^{n}$$ can be written as a linear combination of the $$\textit{standard (ordered) basis}$$ $$(e_{1},\dots e_{n})$$. The vector $$e_{i}$$ has a one in the $$i$$th position, and zeros everywhere else. $$\textit{i.e.}$$
$$e_{1}=\begin{pmatrix}1\\ 0\\ \vdots \\0\end{pmatrix}\, ,\quad e_{2}=\begin{pmatrix}0\\ 1\\ \vdots \\0\end{pmatrix}\, ,\ldots\quad e_{n}=\begin{pmatrix}0\\ 0\\ \vdots \\1 \end{pmatrix}\, .$$
Then to find the matrix of any linear transformation $$L \colon \Re^{n} \rightarrow \Re^{n}$$, it suffices to know what $$L(e_{i})$$ is for every $$i$$.

For any matrix $$M$$, observe that $$Me_{i}$$ is equal to the $i$th column of $$M$$. Then if the $$i$$th column of $$M$$ equals $$L(e_{i})$$ for every $$i$$, then $$Mv=L(v)$$ for every $$v\in \Re^{n}$$. Then the matrix representing $$L$$ in the standard basis is just the matrix whose $$i$$th column is $$L(e_{i})$$.

For example, if
$$L\begin{pmatrix}1\\0\\0\end{pmatrix}=\begin{pmatrix}1\\4\\7\end{pmatrix}\, ,\quad L\begin{pmatrix}0\\1\\0\end{pmatrix}=\begin{pmatrix}2\\5\\8\end{pmatrix}\, ,\quad L\begin{pmatrix}0\\0\\1\end{pmatrix}=\begin{pmatrix}3\\6\\9\end{pmatrix}\, ,$$
then the matrix of $$L$$ in the standard basis is simply
$$\begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix}\, .$$
Alternatively, this information would often be presented as
$$L\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}x+2y+3z\\4x+5y+6z\\7x+8y+9z\end{pmatrix}\, .$$
You could either rewrite this as
$$L\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}\, ,$$
to immediately learn the matrix of $$L$$, or taking a more circuitous route:
\begin{eqnarray*}
L\begin{pmatrix}x\\y\\z\end{pmatrix}&=&L\left[x\begin{pmatrix}1\\0\\0\end{pmatrix}+y\begin{pmatrix}0\\0\\1\end{pmatrix}+z
\begin{pmatrix}0\\0\\1\end{pmatrix}\right]\\&=&
x\begin{pmatrix}1\\4\\7\end{pmatrix}+y\begin{pmatrix}2\\5\\8\end{pmatrix}+z
\begin{pmatrix}3\\6\\9\end{pmatrix}\:=\:\begin{pmatrix}1&2&3\\4&5&6\\7&8&9\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}\, .
\end{eqnarray*}

###### Contributor

This page titled 11.2: Matrix of a Linear Transformation (Redux) is shared under a not declared license and was authored, remixed, and/or curated by David Cherney, Tom Denton, & Andrew Waldron.