Maximum number of idempotent independent matrices What is the maximum number of idempotent and linearly independent matrices in $M_n(F)$ (considered as a vector space over the field $F$). 
My attemp: computer check in low dimensions shows that the answer should be $n^2$ but I have no formal proof or counter example. 
 A: The answer is indeed $n^2$, as conjectured. To see this, first note that no linearly independent list in $M_n(F)$ can have length longer than $n^2$, because the dimension of $M_n(F)$ is $n^2$.
We will construct a linearly independent list with length $n^2$ such that each element of the list is an idempotent matrix in $M_n(F)$. For $1 \le j, k \le n$, let $A_{j,k}$ denote the matrix consisting of all $0$'s except that the entry in row $j$, column $j$ equals $1$ and the entry in row $j$, column $k$ equals $1$. Thus if $j \ne k$, then the matrix $A_{j,k}$ contains exactly two $1$'s; if $j = k$, then the matrix $A_{j,k}$ contains exactly one $1$.
It is easy to verify that each $A_{j,k}$ is idempotent. Furthermore, the list consisting of all $A_{j,k}$ is linearly independent. This list has length $n^2$, completing the proof that $n^2$ is the answer to the question above.
A: Your answer is correct.   In particular: let $E_{ij}$ denote the matrix with zeros except in the $i,j$ entry, where it has a $1$.  The following matrices are idempotent:


*

*$E_{ii}$

*$E_{ii} + E_{ij}$


Counting the distinct matrices of these types gives us $n^2$ in total. Moreover, the set of all such matrices is linearly independent.  Since $n^2$ is also the dimension of $M_n(F)$, we can't do any better.  The conclusion follows.
