# Proving any linear transformation can be represented as a matrix

I'm trying to prove that

Theorem. Consider a linear transformation $T : \mathbb R^n \to \mathbb R^n$. The transformation $T$ can be represented as a matrix product $\mathbf x \mapsto A \mathbf x$, for some matrix $A \in \mathbb R^{n \times n}$.

Here's my attempt at a constructive proof. (This is a .)

Proof. Consider a matrix $\mathbf x \in \mathbb R^n$ given by \begin{align*} \mathbf x &= \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}. \end{align*} We will construct a matrix $A \in \mathbb R^{n \times n}$ such that $T(\mathbf x) = A \mathbf x$.

The vector $\mathbf x$ can also be written as \begin{align*} \mathbf x &= x_1 \begin{bmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{bmatrix} + x_2 \begin{bmatrix} 0 \\ 1 \\ \vdots \\ 0 \end{bmatrix} + \dotsb + x_n \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 1 \end{bmatrix} \\ &= x_1 \mathbf{e}_{1} + x_2 \mathbf{e}_{2} + \dotsb + x_n \mathbf{e}_{n} \\ &= \sum_{i=1}^{n} x_i \mathbf{e}_{i}, \end{align*} where $\mathbf{e}_{i}$ are the standard basis vectors in $\mathbb R^n$.

Consider the transformation $T(\mathbf x)$. Rewriting $\mathbf x$ as above, we have \begin{align} T(\mathbf x) &= T \left( \sum_{i=1}^{n} x_i \mathbf{e}_{i} \right) \\ &= \sum_{i=1}^{n} T(x_i \mathbf{e}_{i}) \\ T(\mathbf x) &= \sum_{i=1}^{n} x_i T(\mathbf{e}_{i}). \tag{1} \end{align}

Let the matrix $A \in \mathbb R^{n \times n}$ be defined by \begin{align*} A &= \begin{bmatrix} T(\mathbf{e}_{1}) & T(\mathbf{e}_{2}) & \cdots & T(\mathbf{e}_{n}) & \end{bmatrix} \\ &= \begin{bmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nn} \end{bmatrix}, \end{align*} where each $T(\mathbf{e}_{i})$ is a column of $A$, and each $a_{ij} = T(\mathbf{e}_{i}) \cdot \mathbf{e}_{j}$ is the $j$th component of $T(\mathbf{e}_{i})$. Then, by the definition of matrix-vector multiplication, we have \begin{align*} A \mathbf x &= \begin{bmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nn} \end{bmatrix} \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} \\ &= \begin{bmatrix} x_1 a_{11} + \dotsb + x_n a_{1n} \\ \vdots \\ x_1 a_{n1} + \dotsb + x_n a_{nn} \\ \end{bmatrix} \\ &= x_1 \begin{bmatrix} a_{11} \\ \vdots \\ a_{n1} \end{bmatrix} + \dotsb + x_n \begin{bmatrix} a_{n1} \\ \vdots \\ a_{nn} \end{bmatrix} \\ &= x_1 T(\mathbf{e}_{1}) + \dotsb + x_n T(\mathbf{e}_{n}) \\ A \mathbf x &= \sum_{i=1}^{n} x_i T(\mathbf{e}_{i}). \tag{2} \end{align*}

Therefore, by eqs. (1) and (2), we have that \begin{align*} T(\mathbf x) &= \sum_{i=1}^{n} x_i T(\mathbf{e}_{i}) & A \mathbf x &= \sum_{i=1}^{n} x_i T(\mathbf{e}_{i}), \end{align*} and we reach $T(\mathbf x) = A \mathbf x$, as was to be shown.

Any thoughts or suggestions would be appreciated.

• It's the correct proof- very well written. – voldemort Sep 1 '14 at 18:27
• The key here is that $e_1,...,e_n$ is a basis for $\mathbb{R}^n$. – copper.hat Sep 1 '14 at 19:00
• @copper.hat ah—$\mathbf e_i$ must form a basis so that $\mathbf x$ can be constructed as a linear combination thereof, right? Should I prove that they form a basis? At the risk of jumping to conclusions…isn't it pretty obvious from the definitions of vector addition and scalar multiplication? – wchargin Sep 1 '14 at 19:16
• I think it is fairly clear that the $e_k$ form a basis. – copper.hat Sep 1 '14 at 19:21
• The crux of the proof is that using the standard basis and by linearity, $\mathbf x=\sum\mathbf e_ix_i\implies T(\mathbf x)=\sum T(\mathbf e_i)x_i=\sum\mathbf a_ix_i$ where the $\mathbf a_i$ can be arranged as the columns of the matrix. – Yves Daoust May 17 '16 at 19:13