Tutorials › Linear Algebra › Powers Of Diagonal Matrices

Matrix Operations and Algebra · Tutorial 82 of 1000

Powers Of Diagonal Matrices

Use a proved entrywise rule to compute powers of diagonal matrices, including the special cases of the identity and zero matrices.

Beginner 9 min read

What You'll Learn

  • State the definition of a nonnegative integer matrix power.
  • Prove that multiplying diagonal matrices multiplies corresponding diagonal entries.
  • Derive the formula for every nonnegative power of a diagonal matrix.
  • Distinguish the zeroth power from positive powers when diagonal entries are zero.
  • Compute and check powers of diagonal, identity, and zero matrices.
  • Correct common errors involving matrix powers and scalar powers.

Why Diagonal Powers Are Simple

A matrix power is defined by repeated matrix multiplication, so computing a high power can involve many products. For a diagonal matrix, however, the multiplication does not mix different positions: each diagonal entry is multiplied only by the entry in the same position. This makes the power of a diagonal matrix a collection of ordinary scalar powers, with one important exception to handle carefully: the zeroth matrix power is the identity, even when some diagonal entries are zero.

Throughout this tutorial, matrices have real entries and are square of size \(n\times n\). A diagonal matrix has zero entries everywhere except possibly on its main diagonal. We write it as \(\operatorname{diag}(d_1,\dots,d_n)\), meaning the matrix with diagonal entries \(d_1,\dots,d_n\) in that order. The \(n\times n\) identity matrix is \(\mathbf{I}_n\), and the \(n\times n\) zero matrix is \(\mathbf{O}\).

Definition: For a square matrix \(\mathbf{A}\), its nonnegative integer powers are defined by \(\mathbf{A}^0=\mathbf{I}_n\) and \(\mathbf{A}^{k+1}=\mathbf{A}^k\mathbf{A}\) for each integer \(k\geq 0\). Thus, for \(k\geq1\), \(\mathbf{A}^k\) is the product of \(k\) copies of \(\mathbf{A}\). This tutorial treats only nonnegative integer powers.

The order in which the copies are grouped does not change the result because matrix multiplication is associative. The defining recurrence is enough for the proof below: once \(\mathbf{A}^k\) is known, multiply it by \(\mathbf{A}\) to obtain \(\mathbf{A}^{k+1}\).

Multiplying Diagonal Matrices

The key calculation is the product of two diagonal matrices of the same size. The entries away from the main diagonal stay zero, while each diagonal position contains the product of the two entries at that position.

Theorem: If \(\mathbf{D}=\operatorname{diag}(d_1,\dots,d_n)\) and \(\mathbf{E}=\operatorname{diag}(e_1,\dots,e_n)\), then \(\mathbf{D}\mathbf{E}=\operatorname{diag}(d_1e_1,\dots,d_ne_n)\).

Proof. The entry in row \(i\), column \(j\) of the product is \(\sum_{r=1}^{n} d_{ir}e_{rj}\). Since \(\mathbf{D}\) is diagonal, \(d_{ir}=0\) unless \(r=i\); since \(\mathbf{E}\) is diagonal, \(e_{rj}=0\) unless \(r=j\). If \(i\ne j\), no index \(r\) can equal both \(i\) and \(j\), so every summand is zero and the product entry is zero. If \(i=j\), the only possibly nonzero summand is the one with \(r=i\), and the entry is \(d_{ii}e_{ii}=d_i e_i\). These are exactly the entries of the stated diagonal matrix. \(\square\)

This also shows why the diagonal power rule works: at each multiplication, the entry in position \(i\) picks up another factor of \(d_i\), without interacting with any other diagonal position.

Theorem (Powers of a diagonal matrix): Let \(\mathbf{D}=\operatorname{diag}(d_1,\dots,d_n)\). For every integer \(k\geq1\), \(\mathbf{D}^k=\operatorname{diag}(d_1^k,\dots,d_n^k)\). For \(k=0\), \(\mathbf{D}^0=\mathbf{I}_n\), regardless of whether any \(d_i\) is zero.

Proof. We use induction on \(k\). For \(k=1\), the formula says \(\mathbf{D}^1=\operatorname{diag}(d_1,\dots,d_n)=\mathbf{D}\), which follows from the definition of the first power. Now suppose \(k\geq1\) and the formula holds for \(k\), so that \(\mathbf{D}^k=\operatorname{diag}(d_1^k,\dots,d_n^k)\). By the definition of the next power and the theorem on products of diagonal matrices,

$$ \mathbf{D}^{k+1} =\mathbf{D}^k\mathbf{D} =\operatorname{diag}(d_1^k,\dots,d_n^k)\operatorname{diag}(d_1,\dots,d_n) =\operatorname{diag}(d_1^{k+1},\dots,d_n^{k+1}). $$

This proves the formula for every \(k\geq1\). For \(k=0\), the definition of matrix powers gives \(\mathbf{D}^0=\mathbf{I}_n\). This case is stated separately, so it does not require interpreting \(d_i^0\) when \(d_i=0\). \(\square\)

Worked Calculations

Worked Example: A Diagonal Matrix with a Zero Entry

Let \(\mathbf{D}=\operatorname{diag}(2,-1,0)\). Find \(\mathbf{D}^0\), \(\mathbf{D}^2\), and \(\mathbf{D}^3\), and check the positive powers by multiplication.

The zeroth power is the identity by definition:

$$ \mathbf{D}^0=\mathbf{I}_3 =\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}. $$

For the positive powers, square each diagonal entry to get the second power, and then multiply each squared entry by its original entry to get the third:

$$ \mathbf{D}^2 =\operatorname{diag}(2^2,(-1)^2,0^2) =\operatorname{diag}(4,1,0) =\begin{bmatrix}4&0&0\\0&1&0\\0&0&0\end{bmatrix}, $$
$$ \mathbf{D}^3 =\operatorname{diag}(2^3,(-1)^3,0^3) =\operatorname{diag}(8,-1,0) =\begin{bmatrix}8&0&0\\0&-1&0\\0&0&0\end{bmatrix}. $$

Check: Multiplying the second power by \(\mathbf{D}\) gives

$$ \begin{bmatrix}4&0&0\\0&1&0\\0&0&0\end{bmatrix} \begin{bmatrix}2&0&0\\0&-1&0\\0&0&0\end{bmatrix} = \begin{bmatrix}8&0&0\\0&-1&0\\0&0&0\end{bmatrix} =\mathbf{D}^3. $$

The zero diagonal entry stays zero in every positive power. But it causes no problem for the zeroth power: the third diagonal entry of \(\mathbf{D}^0\) is \(1\), because \(\mathbf{D}^0\) is \(\mathbf{I}_3\).

Worked Example: A Higher Power with a Negative Entry

Find the fifth power of \(\mathbf{A}=\operatorname{diag}(-3,2)\). Show the repeated-multiplication check using an intermediate power.

The rule gives

$$ \mathbf{A}^5 =\operatorname{diag}((-3)^5,2^5) =\operatorname{diag}(-243,32) =\begin{bmatrix}-243&0\\0&32\end{bmatrix}. $$

To check the calculation through repeated multiplication, first compute the second power and then the fourth power:

$$ \mathbf{A}^2 =\begin{bmatrix}(-3)^2&0\\0&2^2\end{bmatrix} =\begin{bmatrix}9&0\\0&4\end{bmatrix}, \qquad \mathbf{A}^4 =\begin{bmatrix}9^2&0\\0&4^2\end{bmatrix} =\begin{bmatrix}81&0\\0&16\end{bmatrix}. $$

Now multiply \(\mathbf{A}^4\) by \(\mathbf{A}\):

$$ \begin{bmatrix}81&0\\0&16\end{bmatrix} \begin{bmatrix}-3&0\\0&2\end{bmatrix} = \begin{bmatrix}-243&0\\0&32\end{bmatrix} =\mathbf{A}^5. $$

The negative diagonal entry has an odd exponent, so its fifth power is negative; the positive diagonal entry remains positive. The matrix product confirms both values.

Worked Example: Powers of the Identity and Zero Matrices

For a fixed positive size \(n\), determine \(\mathbf{I}_n^k\) and \(\mathbf{O}^k\) for \(k=0\) and for positive integers \(k\).

The identity matrix is diagonal with every diagonal entry equal to \(1\). For \(k\geq1\), the diagonal-power rule gives \(\mathbf{I}_n^k=\operatorname{diag}(1^k,\dots,1^k)=\mathbf{I}_n\). At \(k=0\), the definition also gives \(\mathbf{I}_n^0=\mathbf{I}_n\). Therefore \(\mathbf{I}_n^k=\mathbf{I}_n\) for every \(k\geq0\).

The zero matrix is diagonal with every diagonal entry equal to \(0\). At \(k=0\), \(\mathbf{O}^0=\mathbf{I}_n\). At any positive integer \(k\), the rule gives \(\mathbf{O}^k=\operatorname{diag}(0^k,\dots,0^k)=\mathbf{O}\), because \(0^k=0\) for \(k\geq1\).

Check: For a concrete size, when \(n=2\) and \(k=3\),

$$ \mathbf{I}_2^3 =\begin{bmatrix}1&0\\0&1\end{bmatrix} \begin{bmatrix}1&0\\0&1\end{bmatrix} \begin{bmatrix}1&0\\0&1\end{bmatrix} =\begin{bmatrix}1&0\\0&1\end{bmatrix}, \qquad \mathbf{O}^3 =\begin{bmatrix}0&0\\0&0\end{bmatrix}. $$

For the zero-matrix calculation, multiplying two zero matrices gives a zero matrix, and multiplying that result by the third zero matrix still gives a zero matrix. The zeroth power is different because it is defined to be the identity.

Reading and Using the Rule

For a positive exponent, the calculation is entry by entry: raise each diagonal entry to that exponent and leave all off-diagonal entries equal to zero. The exponent is applied to the entries, not to the locations of the entries or to the whole matrix as if it were a scalar. The rule needs no nonzero-entry assumption. In particular, zero diagonal entries are allowed as long as \(k\geq1\).

The exponent-zero case must be kept separate. The definition \(\mathbf{A}^0=\mathbf{I}_n\) applies to every square matrix, including diagonal matrices with zero entries. Scalar notation \(0^0\) is not needed here and should not be used to decide the entries of \(\mathbf{D}^0\).

These facts are useful whenever repeated multiplication of a diagonal matrix appears: instead of carrying out many matrix products, compute the scalar powers on the diagonal. The multiplication theorem explains why this shortcut is valid, and induction ensures it works for every positive integer exponent, not only for the small powers in the examples.

Common Pitfalls

Wrong calculation: A student may reason that squaring \(\operatorname{diag}(2,-3)\) means doubling every entry, and write

$$ \begin{bmatrix}2&0\\0&-3\end{bmatrix}^2 \mathrel{\color{red}{\ne}} \begin{bmatrix}4&0\\0&-6\end{bmatrix}. $$

The exponent means multiplying the matrix by itself, not multiplying each entry by \(2\). The correction is

$$ \begin{bmatrix}2&0\\0&-3\end{bmatrix} \begin{bmatrix}2&0\\0&-3\end{bmatrix} = \begin{bmatrix}4&0\\0&9\end{bmatrix}. $$

Wrong calculation: For \(\mathbf{D}=\operatorname{diag}(5,0)\), one might try to obtain \(\mathbf{D}^0\) by writing \(\operatorname{diag}(5^0,0^0)\). This invokes \(0^0\) and obscures the definition. Correction: apply the matrix-power definition directly: \(\mathbf{D}^0=\mathbf{I}_2=\begin{bmatrix}1&0\\0&1\end{bmatrix}\). The entrywise scalar-power formula is for positive exponents.

Check Your Understanding

Use the definition and the diagonal-power rule. In each calculation, distinguish the zeroth power from positive powers.

  1. Find \(\operatorname{diag}(3,-2,0)^4\).
  2. Compute \(\operatorname{diag}(-1,4)^3\), then check by multiplying its square by the original matrix.
  3. State \(\mathbf{I}_3^0\), \(\mathbf{I}_3^5\), \(\mathbf{O}^0\), and \(\mathbf{O}^2\).
  4. Explain why the rule for positive powers does not require every diagonal entry to be nonzero.
  5. Identify and correct the error in claiming \(\operatorname{diag}(2,5)^2=\operatorname{diag}(4,10)\).

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon