A diagonal matrix is the easiest kind there is: it multiplies each coordinate by its own number and leaves the rest alone. Most matrices aren't diagonal, but many of them are diagonal in disguise. Change to a basis of eigenvectors and the matrix becomes diagonal, which makes powers, inverses, and even square roots easy to compute. This page finds that basis, says exactly when it exists, and puts it to work.
Some matrices only stretch: three times as long across, twice as tall, and nothing slants. Those are the diagonal matrices, and everything about them is easy. Plenty of other matrices are secretly just as simple: draw the grid along their eigenvectors and all they do is stretch it. This page draws that grid, shows when it exists and when it can't, and uses it to take powers and even square roots of matrices.
On the last page, $\begin{pmatrix} 1 & 2 \\ 2 & 1 \end{pmatrix}$ stretched by $3$ along $(1, 1)$ and flipped along $(1, -1)$, and that was the whole map. Knowing the eigenvectors told us everything. Now we turn that into a factorization.
Here is one matrix acting twice on the same F: once on the usual square grid, once on a grid drawn along its eigenvectors.
A diagonal matrix like $D = \begin{pmatrix} 3 & 0 \\ 0 & 2 \end{pmatrix}$ sends $(x, y)$ to $(3x, 2y)$: it stretches the $x$-direction by $3$ and the $y$-direction by $2$. Its powers are free, $D^k = \begin{pmatrix} 3^k & 0 \\ 0 & 2^k \end{pmatrix}$, because stretching $k$ times multiplies the stretches. The figure above says $A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}$ is that same $D$, just drawn on a slanted grid. Matrices like that get a name.
An $n \times n$ matrix $A$ is diagonalizable if $A = QDQ^{-1}$ for some invertible $n \times n$ matrix $Q$ and some diagonal matrix $D$.
A $2 \times 2$ or $3 \times 3$ matrix $A$ is diagonalizable if $A = QDQ^{-1}$ for some invertible matrix $Q$ and some diagonal matrix $D$.
Read $QDQ^{-1}$ right to left: $Q^{-1}$ rewrites a vector in the coordinates of the basis made of $Q$'s columns (that's the change of coordinates), $D$ scales each coordinate, and $Q$ translates back. So $A$ is diagonalizable exactly when some basis turns it into pure scaling, and scaling a basis vector is what an eigenvector does.
Read $QDQ^{-1}$ right to left, as three moves: $Q^{-1}$ straightens a slanted grid into the square grid, $D$ stretches along the axes, and $Q$ bends the grid back. For that to be $A$, the slanted grid's lines have to be lines that $A$ only stretches: eigenvector lines.
An $n \times n$ matrix $A$ is diagonalizable if and only if $\R^n$ has a basis $\{v_1, \ldots, v_n\}$ of eigenvectors of $A$. In that case $A = QDQ^{-1}$, where column $j$ of $Q$ is $v_j$ and $D_{jj}$ is the eigenvalue belonging to $v_j$.
Let $Q$ have columns $v_1, \ldots, v_n$ and let $D$ be diagonal with entries $\lambda_1, \ldots, \lambda_n$. Column $j$ of $AQ$ is $Av_j$, and column $j$ of $QD$ is $\lambda_jv_j$. So $AQ = QD$ exactly when $Av_j = \lambda_jv_j$ for every $j$. Also, $Q$ is invertible exactly when its columns form a basis of $\R^n$ (the Invertible Matrix Theorem).
If $A = QDQ^{-1}$, then $AQ = QD$ and $Q$ is invertible, so the columns of $Q$ are a basis with $Av_j = \lambda_jv_j$; each $v_j$ is nonzero (it's in a basis), so each is an eigenvector. Conversely, if $v_1, \ldots, v_n$ is a basis of eigenvectors with $Av_j = \lambda_jv_j$, then $Q$ is invertible and $AQ = QD$, so $A = QDQ^{-1}$. $\blacksquare$
A $2 \times 2$ matrix is diagonalizable exactly when it has two eigenvectors on different lines through $0$. A $3 \times 3$ matrix is diagonalizable exactly when it has three eigenvectors that don't all lie in one plane. Then $A = QDQ^{-1}$, where the columns of $Q$ are those eigenvectors and the diagonal of $D$ holds their eigenvalues, in the same order.
This is a visual argument, not a formal proof. Two eigenvectors on different lines are the axes of a slanted grid, and $A$ only stretches along those axes. Play $Q^{-1}$, $D$, $Q$ in order on that grid: straighten it, stretch it, bend it back. The F lands exactly where $A$ puts it in one step. Without enough eigenvector directions there is no slanted grid to straighten, so no $Q$ works.
The full proof is in the n version.
So diagonalizing is finding eigenvectors, then lining them up. This is the matrix from the opening figure.
Diagonalize $A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}$: find an invertible $Q$ and a diagonal $D$ with $A = QDQ^{-1}$.
The trace is $5$ and the determinant is $4 + 2 = 6$, so $f(t) = t^2 - 5t + 6 = (t - 3)(t - 2)$. The eigenvalues are $3$ and $2$.
For $\lambda = 3$: $A - 3I = \begin{pmatrix} 1 & -2 \\ 1 & -2 \end{pmatrix}$ says $v_1 = 2v_2$, so $(2, 1)$ is an eigenvector. For $\lambda = 2$: $A - 2I = \begin{pmatrix} 2 & -2 \\ 1 & -1 \end{pmatrix}$ says $v_1 = v_2$, so $(1, 1)$ is one. Put them in as columns, in the same order as the eigenvalues:
$$Q = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}, \qquad D = \begin{pmatrix} 3 & 0 \\ 0 & 2 \end{pmatrix}, \qquad Q^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}.$$Check without the inverse: $AQ = \begin{pmatrix} 6 & 2 \\ 3 & 2 \end{pmatrix}$ and $QD = \begin{pmatrix} 6 & 2 \\ 3 & 2 \end{pmatrix}$. They match, so $A = QDQ^{-1}$.
In the picture, $A$ sends each column of $Q$ along its own line: $(2, 1)$ to three times itself, $(1, 1)$ to twice itself. Those images are the columns of $AQ$.
Nothing forced us to list $\lambda = 3$ first, but once you choose an order, you're stuck with it.
The columns of $Q$ and the diagonal of $D$ have to match: column $1$ of $Q$ is the eigenvector for $D_{11}$, and so on. Swap two columns of $Q$ without swapping $D$ and $QDQ^{-1}$ is a different matrix. Check your answer with $AQ = QD$, which needs no inverse. And any eigenvectors will do: $(4, 2)$ in place of $(2, 1)$ gives another correct $Q$.
Your turn. In free response, type $Q$ row by row with a semicolon between rows (like 2, 1; 1, 1); any correct $Q$ counts.
Loading practice engine...
A $3 \times 3$ works the same way, with three columns. Here's the triangular matrix from last page, finished off.
Diagonalize $A = \begin{pmatrix} 2 & 1 & 0 \\ 0 & 3 & 4 \\ 0 & 0 & -1 \end{pmatrix}$, whose eigenvectors are $(1, 0, 0)$ for $2$, $(1, 1, 0)$ for $3$, and $(1, -3, 3)$ for $-1$.
The columns of $Q$ are the eigenvectors, and $D$ lists their eigenvalues in the same order:
$$Q = \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & -3 \\ 0 & 0 & 3 \end{pmatrix}, \qquad D = \begin{pmatrix} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & -1 \end{pmatrix}.$$Check the third column, the one most likely to go wrong: $A(1, -3, 3) = (2 - 3, \ -9 + 12, \ -3) = (-1, 3, -3) = -1 \cdot (1, -3, 3)$. Good. $Q$ is triangular with nonzero diagonal, so it is invertible, and $A = QDQ^{-1}$.
On the box built from the three eigenvectors, $A$ doubles one edge, triples another, and flips the third. The box's volume grows six times and it turns over, which is why $\det(A) = 2 \cdot 3 \cdot (-1) = -6$.
Everything hinges on having enough independent eigenvectors. The good news first: eigenvectors from different eigenvalues never get in each other's way.
Let $\lambda_1, \ldots, \lambda_k$ be different eigenvalues of a square matrix $A$, and let $v_i$ be an eigenvector for $\lambda_i$. Then $\{v_1, \ldots, v_k\}$ is linearly independent.
By induction on $k$. One eigenvector is nonzero, so $\{v_1\}$ is independent. Suppose the statement holds for $k - 1$ eigenvectors, and that $c_1v_1 + \cdots + c_kv_k = 0$. Apply $A$ to get $c_1\lambda_1v_1 + \cdots + c_k\lambda_kv_k = 0$, and subtract $\lambda_k$ times the original equation:
$$c_1(\lambda_1 - \lambda_k)v_1 + \cdots + c_{k-1}(\lambda_{k-1} - \lambda_k)v_{k-1} = 0.$$By the induction hypothesis every $c_i(\lambda_i - \lambda_k) = 0$, and the eigenvalues are different, so $c_1 = \cdots = c_{k-1} = 0$. That leaves $c_kv_k = 0$ with $v_k \neq 0$, so $c_k = 0$ too. $\blacksquare$
This is a visual argument, not a formal proof. Two eigenvectors can't share a line, because $A$ stretches a whole line by one amount. Now take two eigenvectors $u$ and $v$ with different stretches, and any other arrow $p$ in their plane: $p$ is a mix of $u$ and $v$, and $A$ stretches the two parts differently, so $Ap$ swings off $p$'s line. So the plane of $u$ and $v$ holds no eigenvector for a third eigenvalue, and a third eigenvector has to stick out of it. Here it is for the $3 \times 3$ example above.
The full proof is in the n version.
So if the eigenvalues are all different, there's one eigenvector for each, they're independent, and there are as many as the size of the matrix.
A square matrix with as many different real eigenvalues as it has rows is diagonalizable.
For an $n \times n$ matrix with $n$ different eigenvalues, pick one eigenvector for each. By the theorem above the $n$ eigenvectors are independent, so they form a basis of $\R^n$, and the matrix is diagonalizable by the basis-of-eigenvectors theorem. $\blacksquare$
Both examples so far had different eigenvalues, so they were guaranteed to work. A repeated eigenvalue is where things can break.
Is $A = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix}$ diagonalizable?
$A$ is triangular, so $f(t) = (2 - t)^2$ and the only eigenvalue is $2$. Its eigenvectors solve $(A - 2I)v = 0$ with $A - 2I = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}$, which says $v_2 = 0$. So $E_2 = \span\{(1, 0)\}$, a single line. A $2 \times 2$ needs two eigenvectors on different lines, and every eigenvector of $A$ is on this one. Not diagonalizable.
Watch it: every arrow leans toward the $x$-axis except the ones along it.
$\begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix}$: so close to diagonal. One stray $1$. And because of that $1$, no basis in the universe will fix it. Brutal.
There are exactly two ways to fail. The first: the eigenvalues aren't all real. The $90^\circ$ rotation has $f(t) = t^2 + 1$, which has no real roots, so it has no real eigenvectors at all. To rule that out, the characteristic polynomial has to factor completely.
A polynomial $f(t)$ splits if $f(t) = c(t - a_1)(t - a_2)\cdots(t - a_n)$ for some real numbers $c, a_1, \ldots, a_n$ (not necessarily different).
Splitting is a yes-or-no question you can usually answer by factoring.
Which of these split: (a) $t^2 - 5t + 6$, (b) $t^2 + 1$, (c) $-(t - 2)^2(t + 1)$?
(a) Splits: $(t - 2)(t - 3)$. (b) Doesn't: $t^2 + 1 \geq 1$ for every real $t$, so it has no real root and no factor $t - a$. (c) Splits already, with $c = -1$ and the root $2$ listed twice. That repeat is fine for splitting; whether it's fine for diagonalizing is the next question.
$t^2 + 1$ doesn't split over the real numbers, but its roots $\pm i$ are perfectly good complex numbers. A later page, Complex Eigenvalues, takes them seriously and finds the turning they describe.
The second way to fail is the one in the example: a repeated root whose eigenspace is too small. That needs two ways of counting an eigenvalue. The first counts it in the polynomial.
The algebraic multiplicity of an eigenvalue $\lambda$ of $A$ is the number of times the factor $(t - \lambda)$ appears in the characteristic polynomial of $A$.
The second counts it in space, by how many independent eigenvectors it brings.
The geometric multiplicity of an eigenvalue $\lambda$ of $A$ is $\dim(E_\lambda)$.
The two counts agree in some examples and not in others.
Find both multiplicities of every eigenvalue of (a) $\begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix}$ and (b) the projection onto the floor, $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix}$.
(a) $f(t) = (t - 2)^2$, so $2$ has algebraic multiplicity $2$. Its eigenspace is the $x$-axis, so its geometric multiplicity is $1$.
(b) $f(t) = -(t - 1)^2t$. The eigenvalue $1$ has algebraic multiplicity $2$, and its eigenspace is the whole floor, a plane, so its geometric multiplicity is $2$ as well. The eigenvalue $0$ has both multiplicities equal to $1$ (its eigenspace is the $z$-axis).
The geometric count can fall short of the algebraic one, as in (a), but it can never go over.
For every eigenvalue $\lambda$ of a square matrix $A$, $$1 \leq \dim(E_\lambda) \leq \text{the algebraic multiplicity of } \lambda.$$
$E_\lambda$ contains an eigenvector, so its dimension $g$ is at least $1$. Take a basis $v_1, \ldots, v_g$ of $E_\lambda$, extend it to a basis of $\R^n$, and let $Q$ have that basis as its columns. Column $j$ of $Q^{-1}AQ$ is the coordinate vector of $Av_j$, which for $j \leq g$ is $\lambda e_j$. So the first $g$ columns of $Q^{-1}AQ - tI$ each hold just $\lambda - t$ on the diagonal, and expanding the determinant down those columns one at a time gives $\det(Q^{-1}AQ - tI) = (\lambda - t)^g\,h(t)$ for some polynomial $h$. Finally, $\det(Q^{-1}AQ - tI) = \det(Q^{-1}(A - tI)Q) = \det(A - tI)$, since $\det(Q^{-1})\det(Q) = 1$. So $(t - \lambda)^g$ divides the characteristic polynomial, and $g$ is at most the algebraic multiplicity. $\blacksquare$
The left side: $\lambda$ is an eigenvalue, so it has at least one eigenvector, and $E_\lambda$ is at least a line. The right side, for a plane: if $E_\lambda$ is a plane, use two arrows in it as the first two axes of a grid (and any third axis). In that grid $A$ just multiplies the first two axes by $\lambda$, so its matrix starts with $\lambda$, $\lambda$ down the diagonal with zeros under them, and its characteristic polynomial (which is the same in every grid) picks up $(\lambda - t)$ twice.
The full proof is in the n version.
Now the complete test. Each eigenvalue can bring at most as many directions as it appears in the polynomial, and we need all of them.
An $n \times n$ matrix $A$ is diagonalizable if and only if its characteristic polynomial splits and, for every eigenvalue $\lambda$, $\dim(E_\lambda)$ equals the algebraic multiplicity of $\lambda$. In that case, putting together a basis of each eigenspace gives a basis of $\R^n$ made of eigenvectors.
Suppose $A = QDQ^{-1}$. Then $f(t) = \det(D - tI) = (D_{11} - t)\cdots(D_{nn} - t)$ (the same determinant trick as in the previous proof), which splits. If $\lambda$ appears $m$ times on the diagonal of $D$, its algebraic multiplicity is $m$, and the $m$ matching columns of $Q$ are independent vectors of $E_\lambda$, so $\dim(E_\lambda) \geq m$; the previous theorem gives $\leq$.
Conversely, suppose $f$ splits with different roots $\lambda_1, \ldots, \lambda_k$ of multiplicities $m_1, \ldots, m_k$, so $m_1 + \cdots + m_k = n$, and $\dim(E_{\lambda_i}) = m_i$. Choose a basis of each $E_{\lambda_i}$: $n$ vectors in all. They are independent: if a combination of them is $0$, group its terms by eigenspace to get $w_1 + \cdots + w_k = 0$ with $w_i \in E_{\lambda_i}$. If some $w_i$ were nonzero, the nonzero ones would be eigenvectors for different eigenvalues adding to $0$, which the independence theorem forbids. So every $w_i = 0$, and since each eigenspace basis is independent, every coefficient is $0$. So $n$ independent eigenvectors form a basis of $\R^n$, and $A$ is diagonalizable. $\blacksquare$
A $2 \times 2$ or $3 \times 3$ matrix is diagonalizable exactly when all of its eigenvalues are real and every eigenvalue that repeats has a big enough eigenspace: a double root needs a plane of eigenvectors, and a triple root needs all of space.
This is a visual argument, not a formal proof. Count directions. An eigenspace that's a line gives you one direction to build the grid with, a plane gives two. Eigenspaces for different eigenvalues never overlap (the floor picture above), so their directions add up. A $3 \times 3$ needs three. Its characteristic polynomial is a cubic with three roots counting repeats, and each eigenspace brings at most as many directions as its root repeats. So you reach three exactly when every root is real and every repeated root brings its full count. The shear above had a double root with only a line: one direction short. The example below has a double root with a plane: exactly enough.
The full proof is in the n version.
Here's a repeated eigenvalue that passes.
Is $A = \begin{pmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 1 & 0 & 3 \end{pmatrix}$ diagonalizable? If so, find $Q$ and $D$.
$A$ is lower triangular, so $f(t) = (2 - t)^2(3 - t)$: the eigenvalue $2$ has algebraic multiplicity $2$, and $3$ has $1$. The polynomial splits, and $3$ passes automatically (its eigenspace is at least a line and at most a line). For $\lambda = 2$:
$$A - 2I = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 1 & 0 & 1 \end{pmatrix}$$has rank $1$, so $\dim(E_2) = 3 - 1 = 2$. That matches, so $A$ is diagonalizable. The one equation $v_1 + v_3 = 0$ gives $E_2 = \span\{(0, 1, 0), (1, 0, -1)\}$, and $A - 3I$ gives $E_3 = \span\{(0, 0, 1)\}$. So
$$Q = \begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & -1 & 1 \end{pmatrix}, \qquad D = \begin{pmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{pmatrix}.$$A plane that doubles and a line that triples: two directions plus one, enough for a grid of all of space.
That's the whole procedure. In practice it goes in this order.
The test, in order: (1) find the eigenvalues and check they're all real; (2) for each eigenvalue that repeats $m$ times, compute $\dim(E_\lambda) = n - \rank(A - \lambda I)$ and check that it equals $m$. Eigenvalues that appear once always pass (the dimension is squeezed between $1$ and $1$), so don't spend time on them. If every eigenvalue appears once, you're done before you start.
Try the counting step yourself. In free response, type the dimension.
Loading practice engine...
Now run the whole test on a deck of matrices. Each card is a matrix; decide whether it's diagonalizable using real numbers.
The cards that fail all failed one of the two checks. Spot the one that's different from the other three.
Loading practice engine...
There's a tidier way to say what the test checks: the eigenspaces fit together into all of $\R^n$ with no overlap. That needs one more piece of language.
The sum of subspaces $\W_1, \ldots, \W_k$ of $\R^n$ is $\W_1 + \cdots + \W_k = \{w_1 + \cdots + w_k : w_i \in \W_i\}$.
A sum can cover everything and still overlap. The no-overlap version gets its own name.
$\R^n$ is the direct sum of subspaces $\W_1, \ldots, \W_k$, written $\R^n = \W_1 \oplus \cdots \oplus \W_k$, if every vector of $\R^n$ can be written in exactly one way as $w_1 + \cdots + w_k$ with each $w_i \in \W_i$.
"Exactly one way" is the part that can fail, even when the sum covers everything.
Is $\R^3$ the direct sum of (a) the floor $\{z = 0\}$ and the $z$-axis? (b) the floor and the wall $\{x = 0\}$?
(a) Yes. Every vector splits as $(x, y, z) = (x, y, 0) + (0, 0, z)$, and that's the only way: the floor part has to carry $x$ and $y$, and the axis part has to carry $z$.
(b) No. The floor and the wall do add up to $\R^3$, but they share the $y$-axis, so splits aren't unique: $(0, 1, 0) = (0, 1, 0) + 0 = 0 + (0, 1, 0)$.
Part (a) is the eigenspace picture of the floor projection: $E_1$ is the floor and $E_0$ is the $z$-axis. That's the general story.
An $n \times n$ matrix $A$ with different eigenvalues $\lambda_1, \ldots, \lambda_k$ is diagonalizable if and only if $\R^n = E_{\lambda_1} \oplus \cdots \oplus E_{\lambda_k}$.
First, a split is never ambiguous: if $w_1 + \cdots + w_k = w_1' + \cdots + w_k'$ with $w_i, w_i' \in E_{\lambda_i}$, then $(w_1 - w_1') + \cdots + (w_k - w_k') = 0$, and the nonzero differences would be eigenvectors for different eigenvalues adding to $0$, which the independence theorem forbids. So all of them are $0$.
If $A$ is diagonalizable, write any $v$ in a basis of eigenvectors and group the terms by eigenvalue: that writes $v$ as $w_1 + \cdots + w_k$ with $w_i \in E_{\lambda_i}$, so the direct sum holds. Conversely, if $\R^n$ is the direct sum, put together a basis of each $E_{\lambda_i}$. Those vectors span $\R^n$ (every $v$ is a sum of pieces, and each piece is a combination of its eigenspace's basis), and they are independent by the same grouping argument as in the multiplicity proof. So they are a basis of eigenvectors. $\blacksquare$
In pictures, the test says the eigenspaces fit together into all of space with nothing missing and nothing doubled up: a plane plus a line through $0$ that isn't in the plane, like the example above, or three lines not all in one plane.
Here's the payoff. Multiplying $A$ by itself a hundred times is a hundred matrix products. Multiplying $QDQ^{-1}$ by itself, almost everything cancels.
Here's the payoff. Doing $A$ twice is doing its three moves twice, and two of those moves cancel.
If $A = QDQ^{-1}$ with $D$ diagonal, then for every whole number $k \geq 1$, $$A^k = QD^kQ^{-1},$$ where $D^k$ is the diagonal matrix whose entries are the entries of $D$ raised to the $k$th power.
$A^k = (QDQ^{-1})(QDQ^{-1})\cdots(QDQ^{-1})$ with $k$ factors. Each of the $k - 1$ places where one factor meets the next holds $Q^{-1}Q = I$, so $A^k = QD^kQ^{-1}$. The product of two diagonal matrices is diagonal, with the products of the matching entries on its diagonal, so $D^k$ has entries $D_{ii}^k$. $\blacksquare$
This is a visual argument, not a formal proof. $A^2$ is $A$ twice: $Q^{-1}$, $D$, $Q$, and then $Q^{-1}$, $D$, $Q$ again. In the middle, $Q$ bends the grid and $Q^{-1}$ straightens it right back: a round trip that does nothing. Drop it and you're left with $Q^{-1}$, then two stretches in a row, then $Q$. Stretching by $3$ twice is stretching by $9$, so two $D$'s make $D^2$. The same cancelling happens for any power.
The full proof is in the n version.
So a big power costs one diagonalization and two matrix products, however big $k$ is.
Find $A^5$ for $A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}$.
From the first example, $Q = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}$, $D = \begin{pmatrix} 3 & 0 \\ 0 & 2 \end{pmatrix}$, and $Q^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}$. With $3^5 = 243$ and $2^5 = 32$,
$$QD^5 = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 243 & 0 \\ 0 & 32 \end{pmatrix} = \begin{pmatrix} 486 & 32 \\ 243 & 32 \end{pmatrix},$$ $$A^5 = QD^5Q^{-1} = \begin{pmatrix} 486 & 32 \\ 243 & 32 \end{pmatrix}\begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix} = \begin{pmatrix} 454 & -422 \\ 211 & -179 \end{pmatrix}.$$Doing the same with letters gives every power at once: $A^k = \begin{pmatrix} 2 \cdot 3^k - 2^k & 2^{k+1} - 2 \cdot 3^k \\ 3^k - 2^k & 2^{k+1} - 3^k \end{pmatrix}$. At $k = 1$ it gives back $A$, a good check.
The same trick undoes $A$. When no eigenvalue is $0$, $A^{-1} = QD^{-1}Q^{-1}$, where $D^{-1}$ just flips each diagonal entry to its reciprocal: multiply it out and $(QDQ^{-1})(QD^{-1}Q^{-1}) = QDD^{-1}Q^{-1} = I$. Build these out of the three moves yourself. Each tile is a move; line them up and press Play.
Often you don't need all of $A^k$, just $A^k$ times one vector. Then skip the matrices entirely: split the vector into eigenvector pieces, and each piece just gets multiplied by its eigenvalue, again and again.
Slide $k$ up in that widget and the piece with the bigger eigenvalue takes over. A later page, Matrix Powers & Recurrences, follows that takeover to the end, and it's how a single formula gives every Fibonacci number.
Your turn: one split, then powers. In free response, type the vector's entries, like 31, 30.
Loading practice engine...
Animators and robot arms run into this all the time. A program knows the transformation $A$ that takes a shape from its starting pose to its final pose, and it wants to show the motion in equal steps: half of $A$, then the other half. "Half of $A$" means a matrix $B$ with $B^2 = A$, a square root of $A$. For a diagonalizable $A$ with positive eigenvalues, it's one line: take the square root of $D$.
Find $B$ with $B^2 = A$ and positive eigenvalues, for $A = \begin{pmatrix} 4 & 0 \\ 3 & 1 \end{pmatrix}$.
$A$ is triangular, so its eigenvalues are $4$ and $1$. $A - 4I = \begin{pmatrix} 0 & 0 \\ 3 & -3 \end{pmatrix}$ gives the eigenvector $(1, 1)$, and $A - I = \begin{pmatrix} 3 & 0 \\ 3 & 0 \end{pmatrix}$ gives $(0, 1)$. So $A = QDQ^{-1}$ with
$$Q = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}, \qquad D = \begin{pmatrix} 4 & 0 \\ 0 & 1 \end{pmatrix}, \qquad Q^{-1} = \begin{pmatrix} 1 & 0 \\ -1 & 1 \end{pmatrix}.$$Take the square root of each eigenvalue, $\sqrt{4} = 2$ and $\sqrt{1} = 1$, and put the grid back:
$$B = Q\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}Q^{-1} = \begin{pmatrix} 2 & 0 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ -1 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 1 & 1 \end{pmatrix}.$$Check: $B^2 = \begin{pmatrix} 4 & 0 \\ 2 + 1 & 1 \end{pmatrix} = \begin{pmatrix} 4 & 0 \\ 3 & 1 \end{pmatrix} = A$. It works because $B^2 = Q\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}^2Q^{-1} = QDQ^{-1}$.
Here is the motion in two equal steps. The F, moved by $B$ and then by $B$ again, lands right on top of where $A$ sends it.
The same idea gives thirds, tenths, any fraction of a move: use $D^{1/3}$ or $D^{1/10}$ in the middle. It's one reason graphics and robotics software diagonalizes (or does something very close to it) behind the scenes.
Don't take square roots entry by entry. $\begin{pmatrix} 2 & 0 \\ \sqrt{3} & 1 \end{pmatrix}$ looks like a natural guess, but it squares to $\begin{pmatrix} 4 & 0 \\ 3\sqrt{3} & 1 \end{pmatrix}$, not $A$: the corner entries mix when you multiply. The roots go on the eigenvalues, inside $D$.
Why "with positive eigenvalues"? Because $Q\begin{pmatrix} -2 & 0 \\ 0 & 1 \end{pmatrix}Q^{-1}$ squares to $A$ too, and so do two more sign choices. Asking for positive eigenvalues picks the one that is really "half of $A$": it stretches along the same eigenvector lines as $A$, in the same directions, just less. And $A$ needs positive eigenvalues for that root to exist using real numbers.
The toolkit for this page: $A$ is diagonalizable when it has a basis of eigenvectors. Then $A = QDQ^{-1}$, with the eigenvectors as the columns of $Q$ in the same order as the eigenvalues on the diagonal of $D$, and $A^k = QD^kQ^{-1}$. Different eigenvalues guarantee it. With a repeated eigenvalue, check that its eigenspace has as many dimensions as the eigenvalue repeats.
Every question so far came right after its idea, which is a hint a quiz never gives you. Down here the hint is gone. First, true or false: a claim from anywhere on this page, and you decide whether it holds.
Loading practice engine...
Next, a mixed set: every question type on this page, shuffled. Type a number, a vector, or a matrix when it asks you to.
Loading practice engine...
Made it this far? Time for something with a little heat: the square root of a matrix, from scratch. In free response, type $B$ row by row, like 3, -2; 1, 0.
Loading practice engine...