First of all, this is no useful way to *decompose* a matrix -
you need to know the eigenvalues beforehand. But it popped up
naturally during my knot theory dabblings.


Assume that you know the characteristic equation  

$$\prod\_{i=1}^n (S - e\_i I) = 0$$
with $S$ being an $n \times n$ matrix, $I$ the $n \times n$ identity matrix and $e\_1, e\_2, \dotsc$ the eigenvalues of $S$.
Define the matrices  

$$T\_i = \prod\_{j \neq i} \frac{1}{e\_i-e\_j} (S - e\_j I)$$  

Now $T\_i T\_j=0$ if $i \neq j$ (obvious) and $T\_i.T\_i=T\_i$ (needs proof),
to the effect that you can compute  

$$S^k = \sum\_{i=1}^n e\_i^k T\_i$$
for any $k$ (obvious again). 


Question: Under what conditions does this scheme work? Equal eigenvalues are no problem, this just reduces the number of $T\_i$ needed, but I've got a hunch that equal eigenvalues which are defective (off-diagonal elements in the Jordan decomposition) will be ruinous. (An elegant proof of $T\_i.T\_i=T\_i$ is also welcome, but on gunpoint I'll probably come up with one myself :-)



Matrix decomposition the other way
This is a fairly standard result in the theory of diagonalizable linear operators, sometimes known as the spectral decomposition theorem for diagonalizable operators. Indeed, a linear operator over some field is diagonalizable if and only if it has a decomposition of this form. You can read about this in Hoffman & Kunze's "Linear Algebra" (specifically, the chapter "invariant sum decompositions"). The following theorem (quoted from the book) sums most of it up:



> 
> Let $T$ be a linear operator on a
>  finite-dimensional space $V$. If $T$
>  is diagonalizable and if
>  $c\_1,\dots,c\_k$ are the distinct
>  eigenvalues of $T$, then there exist
>  linear operators $E\_1,\dots,E\_k$ on
>  $V$ such that:
> 
> 
> 1. $T = c\_1 E\_1 + \cdots + c\_k E\_k$
> 2. $I = E\_1 + \cdots + E\_k$
> 3. $E\_i E\_j = 0$ if $i \ne j$.
> 4. $E\_i ^2 = E\_i$ for all $i$.
> 5. The image of $E\_i$ is the space of $T$-eigenvectors with eigenvalue
>  $c\_i$.
> 
> 
> Conversely,if there exist $k$ distinct
>  scalars $c\_1,\dots,c\_k$ and $k$
>  non-zero linear operators
>  $E\_1,\dots,E\_k$ which satisfy
>  conditions 1,2,3, then $T$ is
>  diagonalizable, $c\_1,\dots,c\_k$ are
>  the distinct eigenvalues of $T$ and
>  conditions 4,5 are satisfied also.
> 
> 
> 


Note that given such a decomposition for $T$, we have $f(T) = \sum f(c\_i) E\_i$ for any polynomial $f$ over the field. Fix some $1 \le i \le k$ and consider the polynomial $f (x) = \prod\_{j \ne i} \frac{x - c\_j}{c\_i - c\_j}$. This polynomial satisfies $f(c\_r) = \delta\_{r,i}$ and thus $f(T) = E\_i$. So the projections $E\_i$ are necessarily of the form you found.


By standard theory, $T$ is diagonalizable if and only if its minimal polynomial factors into distinct linear factors. Now, one may ask what kind of decomposition we can get if the minimal polynomial of $T$ factors into linear factors, not necessarily distinct. In this case, one can still form the sum $c\_1 E\_1 + \cdots + c\_k E\_k$ (where the $E\_i$ are defined either by your formula or by property 5 above), but it won't be equal to $T$. Rather, it will differ from $T$ by a nilpotent operator (an operator $N$ with $N^m = 0$ for some integer $m$). More generally, a linear operator on a fin. dimensional vector space, over an algebraically closed field, can be written uniquely as the sum of a diagonalizable operator (called its diagonalizable part) and a nilpotent operator (called its nilpotent part) which commute with with one another. In this case $c\_1 E\_1 + \cdots + c\_k E\_k$ gives the diagonalizable part of $T$.


If the field is not algebraically closed then one may not be able to form the sum $c\_1 E\_1 + \cdots + c\_k E\_k$ at all, since some of the eigenvalues of $T$ may not be in the field. Nevertheless, there is still an analogous decomposition for $T$ in this case (at least when the field has characteristic zero, I guess), which represents $T$ (uniquely) as the sum of a "semisimple" operator and a nilpotent operator which commute with one another. Here "semisimple" is a property of operators which is equivalent to being diagonalizable if the field is algebraically closed, but is otherwise more involved.


