---
title: Eigenvectors and Linear Transformations
module: Eigenvalues and Eigenvectors
moduleNumber: 5
lessonNumber: 4
order: 504
summary: >
  Every linear transformation between finite-dimensional spaces has a matrix
  relative to chosen bases, built from the coordinate vectors of the images of
  the basis vectors. For a map from a space to itself, an eigenvector basis
  makes that matrix diagonal, and that change of basis is diagonalization; the matrices
  similar to A are the representations of the map in every basis.
topics: [Eigenvalues and Eigenvectors]
sources:
  - book: Lay
    ref: "§5.4 Eigenvectors and Linear Transformations"
---

The factorization $A = P D P^{-1}$ is a statement about coordinates: the
transformation $x \mapsto Ax$ is the same map as the scaling $u \mapsto Du$, written
in a different basis. Making this precise needs the matrix of a linear transformation
between abstract vector spaces.

## The matrix of a transformation relative to bases

Let $V$ be $n$-dimensional with basis $\mathcal{B} = \{b_1, \dots, b_n\}$, let $W$ be
$m$-dimensional with basis $\mathcal{C}$, and let $T : V \to W$ be linear. Every
$x \in V$ has a
[coordinate vector](/linear-algebra/vector-spaces/coordinate-systems)
$[x]_\mathcal{B} \in \mathbb{R}^n$, and its image $T(x)$ has a coordinate vector
$[T(x)]_\mathcal{C} \in \mathbb{R}^m$. These two are linked by a matrix.

If $x = r_1 b_1 + \cdots + r_n b_n$, then linearity gives
$T(x) = r_1 T(b_1) + \cdots + r_n T(b_n)$, and applying the coordinate map (itself
linear) yields

$$
[T(x)]_\mathcal{C}
= r_1 [T(b_1)]_\mathcal{C} + \cdots + r_n [T(b_n)]_\mathcal{C}
= M [x]_\mathcal{B},
$$

where the columns of $M$ are the coordinate vectors of the images of the basis vectors.

> **Definition (Matrix for $T$ relative to $\mathcal{B}$ and $\mathcal{C}$).** For a
> linear $T : V \to W$, the matrix
> $$
> M = \big[\; [T(b_1)]_\mathcal{C} \;\; [T(b_2)]_\mathcal{C} \;\; \cdots \;\;
>            [T(b_n)]_\mathcal{C} \;\big]
> $$
> satisfies $[T(x)]_\mathcal{C} = M [x]_\mathcal{B}$ for all $x \in V$. As far as
> coordinate vectors are concerned, $T$ acts by left-multiplication by $M$.

$$
% caption: The matrix $M$ makes the square commute: coordinatize by $\mathcal{B}$,
% multiply by $M$, and the result is the $\mathcal{C}$-coordinates of $T(x)$.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \node (V) at (0,2.2) {$x \in V$};
  \node (W) at (4.4,2.2) {$T(x) \in W$};
  \node (Rn) at (0,0) {$[x]_\mathcal{B} \in \mathbb{R}^n$};
  \node (Rm) at (4.4,0) {$[T(x)]_\mathcal{C} \in \mathbb{R}^m$};
  \draw[->, thick] (V) -- (W) node[midway, above] {$T$};
  \draw[->, thick] (V) -- (Rn) node[midway, left] {coords};
  \draw[->, thick] (W) -- (Rm) node[midway, right] {coords};
  \draw[->, acc, very thick] (Rn) -- (Rm) node[midway, below, acc] {multiply by $M$};
\end{tikzpicture}
$$

> **Worked example.** Let $\mathcal{B} = \{b_1, b_2\}$ be a basis for $V$ and
> $\mathcal{C} = \{c_1, c_2, c_3\}$ a basis for $W$, with
> $$
> T(b_1) = 3c_1 - 2c_2 + 5c_3, \qquad T(b_2) = 4c_1 + 7c_2 - c_3.
> $$
> The $\mathcal{C}$-coordinates of the images $T(b_1)$ and $T(b_2)$ are the columns
> of $M$:
> $$
> M = \begin{bmatrix} 3 & 4 \\ -2 & 7 \\ 5 & -1 \end{bmatrix}.
> $$

## A transformation from a space to itself

When $W = V$ and $\mathcal{C} = \mathcal{B}$, the matrix is written $[T]_\mathcal{B}$
and called the **matrix for $T$ relative to $\mathcal{B}$**, or the
$\mathcal{B}$-matrix for $T$. It satisfies

$$
[T(x)]_\mathcal{B} = [T]_\mathcal{B}\, [x]_\mathcal{B}, \qquad \text{for all } x \in V.
$$

> **Worked example.** Let $T : \mathbb{P}_2 \to \mathbb{P}_2$ be differentiation,
> $T(a_0 + a_1 t + a_2 t^2) = a_1 + 2 a_2 t$, with $\mathcal{B} = \{1, t, t^2\}$. Find
> the $\mathcal{B}$-matrix and verify it.
>
> The images of the basis vectors are $T(1) = 0$, $T(t) = 1$, $T(t^2) = 2t$, whose
> $\mathcal{B}$-coordinates form the columns of
> $$
> [T]_\mathcal{B}
> = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix}.
> $$
> For a general $p = a_0 + a_1 t + a_2 t^2$, both $[T(p)]_\mathcal{B}$ and
> $[T]_\mathcal{B}[p]_\mathcal{B}$ equal $(a_1, 2a_2, 0)$, confirming the identity.

$$
% caption: Differentiation sends each basis monomial of P2 to its derivative; the
% images 0, 1, 2t supply the columns of the B-matrix.
\begin{tikzpicture}[>=stealth, font=\footnotesize,
  nd/.style={draw, minimum width=9mm, minimum height=7mm}]
  \definecolor{acc}{HTML}{4A6FA5}
  \node[nd] (a) at (0,2) {$1$};
  \node[nd] (b) at (0,1) {$t$};
  \node[nd] (c) at (0,0) {$t^2$};
  \node[nd] (za) at (3,2) {$0$};
  \node[nd] (zb) at (3,1) {$1$};
  \node[nd] (zc) at (3,0) {$2t$};
  \draw[->, acc, thick] (a) -- (za);
  \draw[->, acc, thick] (b) -- (zb);
  \draw[->, acc, thick] (c) -- (zc);
  \node[black] at (0,2.75) {basis};
  \node[black] at (3,2.75) {image};
\end{tikzpicture}
$$

## Diagonal matrix representations

On $\mathbb{R}^n$ a linear transformation usually appears first as a matrix map
$x \mapsto Ax$ in the standard basis. If $A$ is
[diagonalizable](/linear-algebra/eigenvalues/diagonalization), there is a basis of
eigenvectors, and in that basis the matrix of the transformation is diagonal.

> **Theorem (Diagonal Matrix Representation).** Suppose $A = P D P^{-1}$ with $D$
> diagonal. If $\mathcal{B}$ is the basis of $\mathbb{R}^n$ formed from the columns of
> $P$, then $D$ is the $\mathcal{B}$-matrix for the transformation $x \mapsto Ax$.

> **Proof.** Let $\mathcal{B} = \{b_1, \dots, b_n\}$ be the columns of $P$, so $P$ is the
> change-of-coordinates matrix with $P[x]_\mathcal{B} = x$ and $[x]_\mathcal{B} = P^{-1}x$.
> For $T(x) = Ax$,
>
> $$
> [T]_\mathcal{B}
> = \big[\, [Ab_1]_\mathcal{B} \; \cdots \; [Ab_n]_\mathcal{B} \,\big]
> = \big[\, P^{-1} A b_1 \; \cdots \; P^{-1} A b_n \,\big]
> = P^{-1} A P = D. \qquad \blacksquare
> $$

The two maps $x \mapsto Ax$ and $u \mapsto Du$ are the same transformation described in
two coordinate systems. Diagonalizing $A$ is nothing more than finding a basis in which
the transformation acts as independent scalings along the axes.

**Example.** For $A = \begin{bmatrix} 7 & 2 \\ -4 & 1 \end{bmatrix}
= P D P^{-1}$ with $P = \begin{bmatrix} 1 & 1 \\ -1 & -2 \end{bmatrix}$ and
$D = \begin{bmatrix} 5 & 0 \\ 0 & 3 \end{bmatrix}$, the basis $\mathcal{B}$ of the
columns of $P$ makes the $\mathcal{B}$-matrix of $x \mapsto Ax$ equal to $D$: along
$b_1$ the map scales by $5$, along $b_2$ by $3$.

$$
% caption: The same transformation in two frames: it shears the standard grid (left)
% but scales the eigenvector grid along its own axes (right).
\begin{tikzpicture}[>=stealth, scale=0.72, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  % standard
  \draw[black] (-0.2,-0.2) grid (2.2,2.2);
  \draw[->, black, thick] (0,0) -- (1.6,0);
  \draw[->, black, thick] (0,0) -- (0,1.6);
  \node[black] at (1.0,-0.75) {standard basis};
  \draw[->, acc, very thick] (3.1,1.0) -- (4.3,1.0);
  % eigenbasis (skewed grid)
  \begin{scope}[xshift=5.6cm]
    \foreach \i in {0,1,2} \draw[acc!30] (\i,0) -- (\i+1.2,1.8);
    \foreach \j in {0,0.6,0.9} \draw[acc!30] (\j,{1.5*\j}) -- (\j+2.4,{1.5*\j});
    \draw[->, acc, thick] (0,0) -- (1.6,0) node[right] {$b_1$};
    \draw[->, acc, thick] (0,0) -- (0.8,1.2) node[above] {$b_2$};
    \node[black] at (1.2,-0.75) {eigenvector basis};
  \end{scope}
\end{tikzpicture}
$$

## Similarity as change of basis for maps

The proof of the diagonal-matrix-representation theorem never used that $D$ was diagonal. The same computation shows
that if $A = P C P^{-1}$ for **any** $C$, then $C$ is the $\mathcal{B}$-matrix of
$x \mapsto Ax$ when $\mathcal{B}$ is the basis of columns of $P$. Conversely, for any
basis $\mathcal{B}$ with column matrix $P$, the $\mathcal{B}$-matrix is
$[T]_\mathcal{B} = P^{-1} A P$. So the matrices similar to $A$ are precisely
the matrix representations of the transformation $x \mapsto Ax$.

$$
% caption: Similarity $A = P C P^{-1}$ reads as: change into $\mathcal{B}$-coordinates,
% apply $C$, change back. The two routes around the square agree.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
  \definecolor{acc}{HTML}{4A6FA5}
  \node (x) at (0,2.2) {$x$};
  \node (Ax) at (4.6,2.2) {$Ax$};
  \node (bx) at (0,0) {$[x]_\mathcal{B}$};
  \node (bAx) at (4.6,0) {$[Ax]_\mathcal{B}$};
  \draw[->, thick] (x) -- (Ax) node[midway, above] {multiply by $A$};
  \draw[->, thick] (x) -- (bx) node[midway, left] {$P^{-1}$};
  \draw[->, thick] (bAx) -- (Ax) node[midway, right] {$P$};
  \draw[->, acc, very thick] (bx) -- (bAx) node[midway, below, acc] {multiply by $C$};
\end{tikzpicture}
$$

## The Jordan form

If $A$ is defective, no basis makes its matrix diagonal, but a nearly diagonal
representation still exists.

> **Worked example.** For
> $A = \begin{bmatrix} 4 & -9 \\ 4 & -8 \end{bmatrix}$, with
> $b_1 = \begin{bmatrix} 3 \\ 2 \end{bmatrix}$ and
> $b_2 = \begin{bmatrix} 2 \\ 1 \end{bmatrix}$, find the $\mathcal{B}$-matrix of
> $x \mapsto Ax$.
>
> The characteristic polynomial is $(\lambda + 2)^2$ and the eigenspace for $-2$ is
> one-dimensional, so $A$ is not diagonalizable. With $\mathcal{B} = \{b_1, b_2\}$ and
> $P = [\,b_1 \; b_2\,]$,
> $$
> [T]_\mathcal{B} = P^{-1} A P = \begin{bmatrix} -2 & 1 \\ 0 & -2 \end{bmatrix}.
> $$
> This upper-triangular form, with the eigenvalue on the diagonal and a single $1$ just
> above it, is the **Jordan form** of $A$: the closest a defective matrix comes to
> diagonal.

| Situation | Best $\mathcal{B}$-matrix | Basis $\mathcal{B}$ |
| --- | --- | --- |
| $A$ diagonalizable | diagonal $D$ | $n$ eigenvectors |
| $A$ defective | Jordan form (block-triangular) | eigenvectors + generalized eigenvectors |
| General $C$ similar to $A$ | $C = P^{-1} A P$ | columns of $P$ |

The same change of basis applies to real matrices whose simplest representation is a
[rotation](/linear-algebra/eigenvalues/complex-eigenvalues) rather than a scaling,
found by way of complex eigenvalues.[^lay54]

[^lay54]: **Lay**, _Linear Algebra and Its Applications_, 5th ed., §5.4 — Eigenvectors and Linear Transformations: the matrix of $T$ relative to bases, the $\mathcal{B}$-matrix for $T : V \to V$, Theorem 8 (diagonal matrix representation), and similarity as the set of all matrix representations of $x \mapsto Ax$, including the Jordan-form example.
