Call the inverse of a square matrix1 MM, denoted M−1M^{-1}, the matrix such that M−1M=MM−1=IM^{-1}M = MM^{-1} = I. It's the equivalent of 1x\frac{1}{x} for real numbers.

Let's suppose we can find some matrix PP such that M=PDP−1M = PDP^{-1}, where DD is a diagonal matrix.

If we expand out, for instance, M2M^2, a funny thing happens: M=PDP−1M2=(PDP−1)(PDP−1)=PD(P−1P)DP−1=PDIDP−1=PDDP−1=P(D2)P−1 \begin{aligned} M &= PDP^{-1} \\ M^2 &= (PDP^{-1})(PDP^{-1}) \\ &= PD(P^{-1}P)DP^{-1} \\ &= PDIDP^{-1} \\ &= PDDP^{-1} \\ &= P(D^2)P^{-1} \end{aligned}

The extra copies of PP and P−1P^{-1} just vanish. In general, we have that (PDP−1)n=P(Dn)P−1(PDP^{-1})^n = P(D^n)P^{-1}. All of those cancellations save us a lot of work: recall that DnD^n is relatively easy to compute. So, for the price of just two extra multiplications, we can use this representation, called a diagonalization of MM, to efficiently compute MnM^n.


  1. Exercise for the reader: why do I specify square?↩

Call the inverse of a square matrix1 MM, denoted M−1M^{-1}, the matrix such that M−1M=MM−1=IM^{-1}M = MM^{-1} = I. It's the equivalent of 1x\frac{1}{x} for real numbers.

Let's suppose we can find some matrix PP such that M=PDP−1M = PDP^{-1}, where DD is a diagonal matrix.

If we expand out, for instance, M2M^2, a funny thing happens: M=PDP−1M2=(PDP−1)(PDP−1)=PD(P−1P)DP−1=PDIDP−1=PDDP−1=P(D2)P−1 \begin{aligned} M &= PDP^{-1} \\ M^2 &= (PDP^{-1})(PDP^{-1}) \\ &= PD(P^{-1}P)DP^{-1} \\ &= PDIDP^{-1} \\ &= PDDP^{-1} \\ &= P(D^2)P^{-1} \end{aligned}

The extra copies of PP and P−1P^{-1} just vanish. In general, we have that (PDP−1)n=P(Dn)P−1(PDP^{-1})^n = P(D^n)P^{-1}. All of those cancellations save us a lot of work: recall that DnD^n is relatively easy to compute. So, for the price of just two extra multiplications, we can use this representation, called a diagonalization of MM, to efficiently compute MnM^n.


  1. Exercise for the reader: why do I specify square?↩