Is idempotency, $\rho^2=\rho$, a necessary and sufficient condition for $\rho$ to be a pure state? I've seen some claims that idempotency ($\rho^2=\rho$) is necessary and sufficient to guarantee the existence of some state $\psi$ such that $\rho=|\psi\rangle\langle\psi|$, as well as claims on the trace such as here. However, I have so far been unable to prove a necessary and sufficient condition for a density matrix to represent a pure state.
It is easy to see that if $\rho=|\psi\rangle\langle\psi|$ then $\rho$ is idempotent:
$$
\rho^2=|\psi\rangle\langle\psi|\psi\rangle\langle\psi|=|\psi\rangle\langle\psi|=\rho
$$
by normalization. However, the converse has proven more difficult I have been able to show, by expanding in a basis and noting that the eigenvalues of an idempotent matrix are either 0 or 1, that if $\rho$ is idempotent then
$$
\rho=\sum_j \lambda_j |\psi_j\rangle\langle\psi_j|
$$
where each $\lambda_j$ is either 0 or 1. How can I complete the proof? Alternatively, is idempotency not a sufficient condition for a pure state?
 A: THEOREM 1 If $\rho$ is a density matrix (i.e.,  a positive, unit-trace, trace-class operator, also in an infinite dimensional Hilbert space), then $\rho$ is a pure state iff $\rho^2=\rho$.
Proof. If $\rho$ is pure, then $\rho^2=\rho$. Let us prove the converse implication.
Suppose that $\rho^2 = \rho$ ($\rho^2$ is trace class if $\rho$ is because the set of trace class operators is a $^*$ ideal of the $C^*$-algebra of bounded operators) then 
$$0=\rho^2-\rho = \sum_{j} (\lambda_j^2 -\lambda_j) |\psi_j\rangle \langle \psi_j|\tag{1}$$
where, from the definition of density matrix (positive unit-trace trace-class operator)  $$\lambda_j \in [0,1]\tag{2}$$ and $$\sum_j \lambda_j =1\tag{3}\:.$$
Let us assume that there are at least two $j\neq j'$ with $\lambda_j,\lambda_{j'}>0$. We conclude from (2) that both $\lambda_j^2-\lambda_j<0$ and $\lambda_{j'}^2-\lambda_{j'}<0$. Since $\langle \psi_k|\psi_h \rangle = \delta_{hk}$,  (1) leads to $$0 = \langle \psi_{j'}|0 \psi_{j'}\rangle = \lambda_{j'}^2-\lambda_{j'} <0$$
that is impossible. We conclude that the assumption that there are at least two $j\neq j'$ with $\lambda_j,\lambda_{j'}>0$ is untenable so that $\rho = |\psi_j\rangle \langle \psi_j|$. $\Box$
With a similar route one easily proves that
THEOREM 2 If $\rho$ is a density matrix (also in an infinite dimensional Hilbert space), then $\rho$ is a pure state iff $tr(\rho^2)=tr(\rho)$  ($=1$).
Proof. If $\rho$ is pure the thesis it trivial. Let us pass to the converse implication. Since $\sum_j \lambda_j =1$ and $\lambda_j\in [0,1]$, if more than one $\lambda_j$ does not vanish, every $\lambda_j$ is strictly less than $1$, so that   we have in particular  $\lambda^2_j < \lambda_j$ for all $j$, which implies $\sum_j \lambda_j^2 < \sum_j \lambda_j$. This meas that if $tr(\rho^2) = tr(\rho)$, then only one $\lambda_j$ does not vanish so that $\rho$ is pure. $\Box$
A: Let $\rho\ge0$ be a positive semidefinite (finite-dimensional) operator, and consider the following three conditions:

*

*$\newcommand{\tr}{\operatorname{tr}}\tr(\rho)=1$

*$\tr(\rho^2)=1$

*$\rho^2=\rho$.

Any two of the above imply the remaining one.
(1 and 2 $\Longrightarrow$ 3)
Positivity implies that we can eigedecompose $\rho$ as $\rho=\sum_k p_k P_k$ with $\tr(P_j P_k)=\delta_{jk}$, $P_j$ orthogonal projections, and $p_k\ge0$. Then $\tr(\rho)=1$ implies $\sum_k p_k=1$, and $\tr(\rho^2)=1$ implies $\sum_k p_k^2=1$. These two conditions are compatible only if $p_k=\delta_{k,1}$, that is, if $\rho=P_1$ for some trace-1 projection $P_1$.
(1 and 3 $\Longrightarrow$ 2)
This is obvious.
(2 and 3 $\Longrightarrow$ 1) Also obvious.
A: if $\rho^2=\rho$, the only eigenvalues of $\rho$ can be $0$ or $1$, as a matter of fact if
$$ \rho|\psi\rangle=\lambda|\psi\rangle$$
then
$$ \rho^2|\psi\rangle=\lambda^2|\psi\rangle=\rho|\psi\rangle=\lambda|\psi\rangle$$
hence $\lambda^2=\lambda$, i.e. $\lambda\in\{0,1\}$. Since $\mathrm{Tr}(\rho)=1$, $\rho$ can have at most one eigenvalue $1$, hence $\rho=|\psi\rangle\langle \psi|$.
