cardinality of set $S_A$ Let $S_A$ be a set such that 

$$S_A=\left\{ A_{6 \times 6}|A^2=A\right\}$$
  if Any two matrices $A$ and $B$ $\in S_A$ such that $\nexists$ $P$ such $P^{-1}AP=B$
Then the number of elements in $S_A$ is ?

$\textbf{solution I tried}$-The given set of matrices is a set of idempotent matrices.Then from condition he is giving hint that given set of matrices is a set of non-similar matrices but within the set.but from this data how can I find cardinality of $S_A$ ?
Please help.
Thank you.
 A: It should be $7$. To prove this I will use Jardon Canonical form of matrices and the statement that two matrices are similar if and only if their Jardon canonical form are same. So in this way our problem is reduced to find distinct number of possible Jardon form $6\times 6$ idempotent matrices.
Since eigen values of $A$ are either $0$ or $1$ and we know that all idempotent matrices are diagnolizable. Therefore number of distinct Jardon form of idempotent matrices is number of ways of its characteristic, since minimal polynomial has only linear factors. First if all  eigen values are $0$ then it is similar to zero matrix and if all  eigen values are $1$ then it is similar to identity matrix. Now suppose it has both eigen values $0$ and $1$. Then its characterstic polynomial is $x^m(x-1)^n$ such that $n+m=6, n\neq 0, m\neq 0.$ Now we have total $5$ choices for the pair $(n,m)$ are $(1,5),(2,4),(3,3),(5,1),(2,4)$. Using Jordan canonical form it can be seen that all these are different upto similarity. Therefore carinality of $S_A$ is $7$.
