From a Coordinate Formula to a Matrix
A linear map between coordinate spaces can be expressed as a matrix multiplication once we know where it sends the standard basis vectors. This gives a direct method for constructing the matrix: evaluate the map on each standard basis vector in the domain, then place the resulting vectors in order as the matrix columns. The domain determines how many columns are needed; the codomain determines how many entries each column has.
Throughout, scalars are real. For \(\mathbb{R}^n\), the standard basis vectors are \(\mathbf{e}_1,\dots,\mathbf{e}_n\), where \(\mathbf{e}_j\) has a \(1\) in coordinate \(j\) and \(0\) in every other coordinate. Every \(\mathbf{x}\in\mathbb{R}^n\) has the expansion \(\mathbf{x}=x_1\mathbf{e}_1+\cdots+x_n\mathbf{e}_n\). A map \(T:\mathbb{R}^n\to\mathbb{R}^m\) is linear if it preserves addition and scalar multiplication: \(T(\mathbf{x}+\mathbf{y})=T(\mathbf{x})+T(\mathbf{y})\) and \(T(c\mathbf{x})=cT(\mathbf{x})\).
The order of the columns matters: column \(j\) is the image of \(\mathbf{e}_j\), not an image chosen in some other order. Each image is a vector in \(\mathbb{R}^m\), so it supplies \(m\) entries to one column. For example, a map from \(\mathbb{R}^2\) to \(\mathbb{R}^3\) has a \(3\times2\) standard matrix.
Why the Columns Give the Whole Map
Proof. Let \(\mathbf{x}=(x_1,\dots,x_n)^{\top}\). Its standard-basis expansion is \(\mathbf{x}=\sum_{j=1}^{n}x_j\mathbf{e}_j\). Repeated use of additivity and scalar preservation gives \(T(\mathbf{x})=\sum_{j=1}^{n}x_jT(\mathbf{e}_j)\). Multiplying \(\mathbf{A}\) by \(\mathbf{x}\) forms the same combination of its columns, so \(\mathbf{A}\mathbf{x}=\sum_{j=1}^{n}x_jT(\mathbf{e}_j)=T(\mathbf{x})\). To prove uniqueness, suppose an \(m\times n\) matrix \(\mathbf{B}\) also satisfies \(\mathbf{B}\mathbf{x}=T(\mathbf{x})\) for every \(\mathbf{x}\). In particular, \(\mathbf{B}\mathbf{e}_j=T(\mathbf{e}_j)\) for each \(j\). Multiplication by \(\mathbf{e}_j\) selects column \(j\) of \(\mathbf{B}\), so every column of \(\mathbf{B}\) equals the corresponding column of \(\mathbf{A}\). Hence \(\mathbf{B}=\mathbf{A}\). \(\square\)
This argument explains why the method works: linearity means that knowing the images of the standard basis vectors determines the image of every vector. The result also gives a useful way to check a proposed answer. Multiply its matrix by an arbitrary input \(\mathbf{x}\); the resulting coordinate formula must match \(T(\mathbf{x})\).
Indeed, the \(j\)-th column contains the coordinates of \(T(\mathbf{e}_j)\), so its entry in row \(i\) is \((T(\mathbf{e}_j))_i\). By the theorem, \(T(\mathbf{x})=\mathbf{A}\mathbf{x}\); the \(i\)-th entry of this product is the row-by-column sum \(\sum_{j=1}^{n}a_{ij}x_j\). This is a consequence of the matrix product, not a separate recipe for guessing the entries.
Worked Examples
Worked Example: A Map from \(\mathbb{R}^2\) to \(\mathbb{R}^3\)
Find the standard matrix of \(T:\mathbb{R}^2\to\mathbb{R}^3\) defined by \(T(x,y)=(2x-y,\ x+3y,\ -x+2y)\).
The domain standard basis is \(\mathbf{e}_1=(1,0)^{\top}\), \(\mathbf{e}_2=(0,1)^{\top}\). Evaluate the map at the first vector:
Evaluate it at the second:
Use these two images, in order, as columns. The result has three rows because the output is in \(\mathbb{R}^3\), and two columns because the input is in \(\mathbb{R}^2\):
Check: For an arbitrary input \((x,y)^{\top}\), multiplication gives \(\mathbf{A}(x,y)^{\top}=(2x-y,\ x+3y,\ -x+2y)^{\top}\), which is exactly the defining formula for \(T(x,y)\). Thus the matrix represents the map on every input.
Worked Example: A Map from \(\mathbb{R}^3\) to \(\mathbb{R}^2\)
Find the standard matrix of \(S:\mathbb{R}^3\to\mathbb{R}^2\) given by \(S(x,y,z)=(x+2y-3z,\ 4x-y+z)\).
The domain standard basis vectors are \(\mathbf{e}_1=(1,0,0)^{\top}\), \(\mathbf{e}_2=(0,1,0)^{\top}\), and \(\mathbf{e}_3=(0,0,1)^{\top}\). Substituting each one into the formula gives
These are the three columns, so the standard matrix is
Its shape is \(2\times3\): two output coordinates and three input coordinates. Check: Multiplying by an arbitrary column gives \(\mathbf{B}(x,y,z)^{\top}=(x+2y-3z,\ 4x-y+z)^{\top}\), exactly the formula for \(S(x,y,z)\). The first row computes the first output coordinate, and the second row computes the second.
Worked Example: A Map from \(\mathbb{R}^3\) to \(\mathbb{R}^3\)
Let \(U:\mathbb{R}^3\to\mathbb{R}^3\) be defined by \(U(x,y,z)=(x+z,\ 2y,\ x-y+z)\). Find its standard matrix.
Evaluate \(U\) on the three standard basis vectors separately:
The first and third images happen to be equal, but each belongs in its own column. Therefore
Check: The matrix product is \(\mathbf{C}(x,y,z)^{\top}=(x+z,\ 2y,\ x-y+z)^{\top}\), as required. In particular, the third column being equal to the first records that \(U(\mathbf{e}_3)=U(\mathbf{e}_1)\); it does not mean that one of those columns should be omitted.
Using Coordinate Formulas Carefully
For a map specified by coordinate formulas, a reliable process is to write down the domain standard basis, substitute each basis vector into every output coordinate, and then place each resulting output column in the matrix. Checking the number of rows and columns before proceeding catches many errors: the matrix must have \(m\) rows and \(n\) columns for a map \(\mathbb{R}^n\to\mathbb{R}^m\).
For a map from \(\mathbb{R}^n\), use \(\mathbf{e}_1,\dots,\mathbf{e}_n\), each with \(n\) coordinates.
Compute \(T(\mathbf{e}_j)\) for every \(j\), preserving the order of the basis vectors.
Place \(T(\mathbf{e}_j)\) in column \(j\). Each column must have \(m\) entries for a map into \(\mathbb{R}^m\).
Multiply the proposed matrix by \((x_1,\dots,x_n)^{\top}\) and compare the output coordinates with the defining formulas.
The procedure assumes that the given map is linear. Evaluating any function on the standard basis still produces a list of vectors, but those vectors need not give a matrix that represents the function away from the basis vectors. The theorem’s proof uses linearity when it replaces \(T(\sum_j x_j\mathbf{e}_j)\) by \(\sum_jx_jT(\mathbf{e}_j)\). Without that property, the argument does not apply.
Common Mistakes and Their Corrections
Putting images in rows instead of columns. For the map \(T(x,y)=(2x-y,\ x+3y,\ -x+2y)\) above, a mistaken arrangement puts the images side by side as rows and produces \(\begin{bmatrix}2&1&-1\\-1&3&2\end{bmatrix}\). This is a \(2\times3\) matrix, so it cannot multiply an input column in \(\mathbb{R}^2\) to produce an output in \(\mathbb{R}^3\). The correction is to place the images vertically as columns: \(\begin{bmatrix}2&-1\\1&3\\-1&2\end{bmatrix}\), a \(3\times2\) matrix.
Evaluating at the wrong vectors. A standard matrix uses the standard basis of the domain, not arbitrary inputs and not basis vectors of the codomain. For a map with domain \(\mathbb{R}^3\), the inputs for constructing its columns are \((1,0,0)^{\top}\), \((0,1,0)^{\top}\), and \((0,0,1)^{\top}\). Each resulting output has the codomain’s number of coordinates.
Assuming basis evaluations suffice for a nonlinear rule. Consider \(F:\mathbb{R}^2\to\mathbb{R}^2\) given by \(F(x,y)=(x,y^2)\). The standard basis evaluations are \(F(1,0)=(1,0)\) and \(F(0,1)=(0,1)\). Placing these as columns gives \(\mathbf{I}_2\), but \(\mathbf{I}_2(0,2)^{\top}=(0,2)^{\top}\), whereas \(F(0,2)=(0,4)^{\top}\). The proposed matrix does not represent \(F\). In fact, \(F\) is not linear: \(F(0,2)\ne2F(0,1)\). Basis evaluation determines the map in this way only when linearity is known.
Why the Standard Matrix Is Useful
The standard matrix turns a linear map into a coordinate calculation: the input coordinates are multiplied by the matrix to obtain the output coordinates. The columns retain a direct interpretation as the images of the input basis vectors, while the rows collect the contributions to individual output coordinates. The distinction is useful in practice: when constructing the matrix, evaluate basis vectors and fill columns; when checking a result, multiply a general input and compare each output coordinate.
Check Your Understanding
For each question, keep the domain and codomain dimensions visible and check your matrix by multiplying it by a general input.
- Find the standard matrix of \(T:\mathbb{R}^2\to\mathbb{R}^2\) defined by \(T(x,y)=(3x+y,\ -2x+4y)\).
- For \(S:\mathbb{R}^3\to\mathbb{R}^2\), \(S(x,y,z)=(2x-z,\ x+y+3z)\), compute \(S(\mathbf{e}_1)\), \(S(\mathbf{e}_2)\), and \(S(\mathbf{e}_3)\), then assemble the matrix.
- What are the dimensions of the standard matrix of a linear map from \(\mathbb{R}^4\) to \(\mathbb{R}^3\)? Explain which space determines its rows and which determines its columns.
- Explain why the images \(T(\mathbf{e}_1),\dots,T(\mathbf{e}_n)\) must be placed in columns in that order.
- For \(F(x,y)=(x,y^2)\), compute the matrix obtained from its standard basis evaluations and give an input showing that this matrix does not represent \(F\).