An idempotent matrix \(A\) satisfies
\begin{align*}
A^{n} &= A, & n &> 0
\end{align*}
Here \(n\) only takes integer values. Consider the following exponential function:
\begin{equation*}
U(A, \theta) = \exp{(\theta A)}
\end{equation*}
You can write this as an infinite series:
\begin{equation*}
U(A, \theta) = I + \sum_{n = 0}^{\infty} \frac{1}{\Gamma(n + 1)} \theta^{n} A^{n} = I + \sum_{n = 0}^{\infty} \frac{1}{\Gamma(n + 1)} \theta^{n} A
\end{equation*}
Finally, the second term can be written as an exponential too:
\begin{equation*}
U(A, \theta) = I + \left[\exp{(\theta)} - 1 \right] A
\end{equation*}
An example of an idempotent matrix is an operator of the form \(|x \rangle \langle x |\).