Idempotent functions on Sp(1) The quaternion group $Sp(1)\simeq S^3$ can be understood as $(z,w)\in\mathbb {C}^2$ with $|z|^2+|w|^2=1$ where multiplication is defined by $(z,w)(t,s)=(zt-\bar{s}w,zs+\bar{t}w)$. 
Question: How do the nontrivial continuous idempotent functions (wrt convolution) look like? That is, functions $f*f=f$, defined using Haar measure of 3-sphere.
 A: As Venkataramana says, this is a natural candidate for the Peter-Weyl theorem: Let $G$ be a compact group. Let $\{ V_i \}_{i \in I}$ be the set of isomorphism classes of irreducible complex representations of $G$ (for some index set $I$), and fix a $G$-invariant Hermitian inner product on each $V_i$. Let $\{ e_i^b \}_{b \in B_i}$ be an orthonormal basis of $V_i$ and put $f_i^{ab}(g) = \langle e_i^a, g e_i^b \rangle$. Then the Peter-Weyl theorem tells us that the $f_i^{ab}$ are an orthonormal basis for $L^2(G)$ (with $\int_G 1$ normalized to $1$). This basis identifies $L^2(G)$ with convolution with the Hilbert direct sum of matrix algebras
$$\bigoplus_{i \in I} \mathrm{Mat}_{|B_i| \times |B_i|}.$$
Let's write this isomorphism as $f \mapsto \left( \rho_i(f) \right)_{i \in I}$.
So a function in $L^2(G)$ is idempotent iff each matrix $\rho_i$ is idempotent. Moreover, $|f|^2 = \sum_{i \in I} |\rho_i(f)|^2$ (right hand side is Frobenius norm) so $f \in L^2(G)$ implies $|\rho_i(f)| \to 0$. The Frobenus norm of a rank $k$ idempotent is $\sqrt{k}$, so only finitely many $\rho_i(f)$ can be nonzero. So such idempotents correspond to choosing finitely many nonzero subspaces $W_i$ in finitely many $V_i$. Explicilty, take an orthogonal basis $(u_i^c)_{c \in C_i}$ for each $W_i$ and form the sum $\sum \langle u_i^c, g u_i^c \rangle$. 
The simplest such example is to directly take the two dimensional representation
$$a+bi+cj+dk \mapsto \begin{bmatrix} a+bi & c+di \\ -c+di & a-bi \\ \end{bmatrix}$$
and project onto the $1$-dimensional subspace spanned by $\left[ \begin{smallmatrix} 1\\0 \end{smallmatrix} \right]$ to get the idempotent
$$\left\langle \begin{bmatrix} 1\\0 \end{bmatrix} ,\ \begin{bmatrix} a+bi & c+di \\ -c+di & a-bi \\ \end{bmatrix}\begin{bmatrix} 1\\0 \end{bmatrix} \right\rangle = a+bi.$$
