# Using Cayley-Hamilton Theorem to Calculate Matrix Powers

1. Feb 13, 2013

### AcidRainLiTE

Given a matrix A (for simplicity assume 2x2) we can use the Cayley-Hamilton theorem to write:

$$A^k = a_0 + a_1 A$$

for k>= 2.

So suppose we have a given k and want to find the coefficients $a_0,a_1$. We can use the fact that the same equation is satisfied by the eigenvalues. That is, for any eigenvalue $\lambda$ we have

$$\text{(1) } \quad \lambda^k=a_0+a_1\lambda.$$

If A has 2 distinct eigenvalues, we can plug them into this equation and get 2 equations which allow us to solve for $a_0, a_1$. And we're done.

If on, the other hand, A has a repeated eigenvalue $\lambda_1$, then we only get 1 equation from the above procedure. To get another equation we can differentiate (1) to get
$$\text{(2) } \quad k \lambda^{k-1} = a_1.$$
We then plug $\lambda_1$ into (2) to get our second equation. Now we can solve for $a_0, a_1$.

My question is how we know we can differentiate (1) and still get a valid equation. In order to differentiate, (1) must hold for all $\lambda$ (or at least over some interval). But we only know that it holds for particular discrete values of $\lambda$ (i.e. for the eigenvalues of A).

2. Dec 10, 2016

### Zinomorph

Ugh... First, huge thanks for your question. I solved my problem via this method.
I'm not sure that this is still valid question since you posted almost 3yrs ago.