Diagonalize simultaneously Let $A_1,\cdots, A_n$ be $n\times n$ matrices. If $A_i^2=A_i$, $A_iA_j=0$ for $i\neq j$. Show that there exists an invertible matrix $P$ such that $P^{-1}A_iP$ are all diagonal..
I only know that all $A_i$ can be diagonalized. However, this same $P$ I could not find...
 A: You can read theorem 5.1 in this great paper by K. Conrad , stating
 that two or more diagonalizable linear maps are simultaneously diagonalizable iff  they commute. 
In our case, each map is a zero of the polynomial
$$x^2-x=x(x-1)$$
and then the minimal map of each map divides the above polynomial and is thus a product of different linear maps, which means each map is diagonalizable (you can read about this also in that paper), and the condition $\;A_iA_j=0\;\;\forall\;i\neq j\;$ gives us pairwise commutativity, and thus we're done.
A: Proof by induction on $n$:
For $n=1$, its obvious;
Suppose its right for $n-1$, then for $n$, there exist an invertible matrix $P$ such that $P^{-1}A_1P=\left(
  \begin{array}{cc}
     D_1&  \\
     & 0  \\
  \end{array}
\right)$
,where $D_1$ is a diagnol  invertible matrix, $P^{-1}A_1PP^{-1}A_i P=P^{-1}A_i PP^{-1}A_1 P=0$
,so $P^{-1}A_i P=\left(
  \begin{array}{cc}
     0&  \\
     & D_i  \\
  \end{array}
\right)$
,where $D_i$ is an low dim matrix and $D_i^2=D_i$ and $D_i D_j=D_j D_i$, so there exist some matrix $Q$ such that $Q^{-1}D_iQ$ are all diagonal, then set $R=P\left(
  \begin{array}{cc}
     I&  \\
     & Q  \\
  \end{array}
\right)$, $R^{-1}A_i R$ are all diagonal.
