Call the inverse of a square matrix1 MM, denoted M1M^{-1}, the matrix such that M1M=MM1=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=PDP1M = PDP^{-1}, where DD is a diagonal matrix.

If we expand out, for instance, M2M^2, a funny thing happens: M=PDP1M2=(PDP1)(PDP1)=PD(P1P)DP1=PDIDP1=PDDP1=P(D2)P1 \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 P1P^{-1} just vanish. In general, we have that (PDP1)n=P(Dn)P1(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 M1M^{-1}, the matrix such that M1M=MM1=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=PDP1M = PDP^{-1}, where DD is a diagonal matrix.

If we expand out, for instance, M2M^2, a funny thing happens: M=PDP1M2=(PDP1)(PDP1)=PD(P1P)DP1=PDIDP1=PDDP1=P(D2)P1 \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 P1P^{-1} just vanish. In general, we have that (PDP1)n=P(Dn)P1(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?