TITLE: Are linear combinations of powers of a matrix unique?
QUESTION [11 upvotes]: One can see from the Cayley-Hamilton Theorem that for a $n\times n$ matrix, we can write any power of the matrix as a linear combination of lesser powers and the identity matrix, say if $A\neq cI_n$, $c\in \Bbb{C}$ is a given matrix, it can be written as a linear combination of $I_n,A^{-1},A,A^2,\cdots,A^{n-1}$. Is this representation unique? If so, is it under special cases? As an example let's consider this:

Let $A\neq cI_n$ , $c\in \Bbb{C}$ be a $3\times 3$ matrix over $\Bbb{C}$ and $A^3=k_3A^2+k_2A+k_1I_3=m_3A^2+m_2A+m_1I_3$ for $k_i,m_i\in \Bbb{C}$. Does it hold that $k_i=m_i \forall i=1,2,3?$


If we take a formalistic approach I guess we can say that the equivalence above consitutes a system of $3$ equations with $6$ variables ($k_i,m_i$). 
That is, we evaluate the two linear combinations and by matrix equivalence we demand that all entries are equal: $a_{ij}=b_{ij}=c_{ij}$. But in general, unless the matrix $A$ has a "special" form, that will have infinite solutions.
Is this-overly simplistic-approach correct? Should I try to find counter examples perhaps or the question has some trivial answer that I overlook?

REPLY [17 votes]: The situation is as follows: let $d$ be the degree of the minimal polynomial of $A$.  Then the matrices $\{I,A,A^2,\dots,A^{d-1}\}$ are linearly independent and form a basis for the span of the powers of $A$.
In particular, this means that $A$ will have the uniqueness property you describe if and only if the minimal and characteristic polynomials coincide.  That is, the following are equivalent:

The matrices $\{I,A,\dots, A^{n-1}\}$ are linearly independent
$\Bbb R^n$ is $A$-cyclic
$A$ is similar to a companion matrix
$A$ is non-derogatory
The minimal polynomial of $A$ is the same as its characteristic polynomial
The Jordan form of $A$ has one Jordan block for each eigenvalue
All eigenspaces of $A$ have dimension at most $1$
A matrix $B$ satisfies $AB = BA$ if and only if there is a polynomial $f(x)$ for which $B = f(A)$.

So, for example: any $A$ with $n$ distinct eigenvalues will have this property, and any $A$ which consists of a single Jordan block will have this property.  Any diagonalizable $A$ with a repeated eigenvalue will not have this property.