We know that if a square matrix $A$ is idempotent, then
$$A^2 = A$$
If $A$ is non-singular, then the only possible matrix that is idempotent is $A=I$.
But if $A$ is singular, then are there infinitely many idempotent matrices. I got two matrices by brute force such as
$$A=\begin{bmatrix} 1 &1 \\ 0& 0 \end{bmatrix}$$
and
$$A=\begin{bmatrix} 0 &0 \\ 1& 1 \end{bmatrix}$$
How can we find any other matrices which are singular and idempotent?
Equating entries, you can check that the following is idempotent for any $\;\theta\in\Bbb R\;$:
$$\frac12\begin{pmatrix}1-\cos\theta&\sin\theta\\\sin\theta&1+\cos\theta\end{pmatrix}$$