Linear transformations · Definition
Matrix of a linear transformation
Before you start you need to know
The matrix translates a linear transformation into numbers: applying \(T\) becomes multiplication, and composing transformations becomes multiplying matrices.
Definition
The matrix \([T]\) of a linear transformation \(T\), with respect to given bases, has as columns the images of the domain basis vectors, written in coordinates of the codomain basis.
To build it, apply \(T\) to each vector of the domain basis and express the result in coordinates of the codomain basis; each result is a column. In the standard bases, column \(j\) is simply \(T(e_j)\). For example, if \(T(x,y)=(2x+y,\,3x-y)\), then \(T(e_1)=(2,3)\) and \(T(e_2)=(1,-1)\), and the matrix is \(\begin{pmatrix}2&1\\3&-1\end{pmatrix}\).
With the matrix, evaluating is multiplying: the coordinates of \(T(v)\) are obtained by multiplying the matrix by the coordinates of \(v\). If \(T:\mathbb{R}^n\to\mathbb{R}^m\), the matrix is \(m\times n\): as many columns as the dimension of the domain and as many rows as that of the codomain. Also, the matrix of the composition \(T\circ S\) is the product \([T][S]\): \(S\) acts first, so it sits on the right.
The matrix depends on the chosen bases. The same transformation has another matrix in another basis, and a good choice can make it very simple, for instance diagonal. Another example: the derivative on polynomials of degree at most 2, with basis \(\{1,x,x^2\}\), has columns \((0,0,0)\), \((1,0,0)\) and \((0,2,0)\).
Typical mistakes: writing the images as rows instead of columns, and multiplying in the wrong order when composing. This construction is what will make eigenvalues approachable: a transformation is best understood in the basis where its matrix is simplest.
Think about it
Why does the matrix of the \(90^\circ\) rotation of \(\mathbb{R}^2\) have columns \((0,1)\) and \((-1,0)\)?
Because the rotation sends \(e_1\) to \((0,1)\) and \(e_2\) to \((-1,0)\), and the images of the basis are the columns.
Can the same linear transformation have different matrices?
Yes: the matrix depends on the bases of the domain and codomain; changing them changes the numbers even though the transformation is the same.
Exercises 10
- What is the matrix of \(T(x,y)=(2x+y,\,3x-y)\) in the standard bases?
- Let \(T:\mathbb{R}^3\to\mathbb{R}^2\) be linear. What size is its matrix in the standard bases?
- The matrix of \(T\) is \(A=\begin{pmatrix}1&2\\0&3\end{pmatrix}\). What is \(T(2,-1)\)?
- It is known that \(T(e_1)=(1,4)\) and \(T(e_2)=(-2,5)\). What is the matrix of \(T\) in the standard bases?
- What is the matrix of the \(90^\circ\) counterclockwise rotation of \(\mathbb{R}^2\)?
- It is known that \(T(1,0)=(1,2)\) and \(T(0,1)=(3,-1)\). What is \(T(2,5)\)?
- \(S\) has matrix \(A=\begin{pmatrix}1&1\\0&1\end{pmatrix}\) and \(T\) has matrix \(B=\begin{pmatrix}2&0\\0&3\end{pmatrix}\). What is the matrix of \(T\circ S\)?
- The derivative \(D\) acts on polynomials of degree at most 2. What is its matrix in the basis \(\{1,\,x,\,x^2\}\)?
- The matrix of \(T\) in the standard bases is \(\begin{pmatrix}1&2\\3&4\end{pmatrix}\) and \(T(v)=(5,11)\). What is \(v\)?
- Let \(T(x,y)=(y,x)\) and the basis \(B=\{(1,1),\,(1,-1)\}\) used in domain and codomain. What is the matrix of \(T\) in \(B\)?
What comes next
References
- Gilbert Strang, Introduction to Linear Algebra, 6th edition, Wellesley-Cambridge Press, 2023. §8.2
- Sheldon Axler, Linear Algebra Done Right, 4th edition, Springer, 2024. §3.C
- David C. Lay, Steven R. Lay, Judi J. McDonald, Linear Algebra and Its Applications, 6th edition, Pearson, 2021. §1.9 y §5.4