So I have to prove that prove that $[0]$ and $[1]$ are the only two idempotent elements of $\mathbb{Z}_p$.
Here is how my proof goes:
Suppose there is another idempotent element of $\mathbb{Z}_p$ which we call $[a]$, where $[a]\neq [0] $ and $[1]$. Further $1<[a]<[p]$. But since $p\geq 2$ it follows that $2\leq[a]<[p]$, a contradiction when $p=2$.
Not sure if this is correct or not. I don't think its correct if not a small hint would help. Thanks
Edit: New Proof:
Suppose that there exists another idempotent element call it $[a]$ such that ${[a]}^2=[a]$. Also $a \neq 0$ and $a \neq 1$. Let $x\in[a]$ then it follows $x \equiv a \pmod{p} \iff p|(x-a) \iff ps=x-a$ for some $s\in\mathbb{Z}$ and $x \equiv a^2 \pmod{p} \iff p|(x-a^2) \iff pt=x-a^2$ for some $t\in\mathbb{Z}$. It follows that $ps-pt= a^2-a \implies p|(a^2-a) \iff a^2-a \equiv 0 \pmod {p}$. It follows that since $p|(a^2-a)$ then by Euclid's lemma we get $p|a$ or $p|(a-1)$. In other words $a \equiv 0 \pmod{p}$ or $a \equiv 1 \pmod{p}$. A contradiction since $a<p$ ( since $a$ make up the congruence classes of $\mathbb{Z}_p$ and since $a\neq 1$ and $a \neq 0$ .Thus $a=0$ or $a=1$ are the only two idempotent elements in $\mathbb{Z}_p$