[example: Averaging On The Circle]
Let $G=T^1$ act on a finite-dimensional complex [vector space](/page/Vector%20Space) $V$ by a continuous representation $\rho:T^1\to GL(V)$, and start with a Hermitian inner product $(\cdot,\cdot)_0$. Define
\begin{align*}
(v,w)_V=\frac{1}{2\pi}\int_0^{2\pi}(\rho(e^{i\theta})v,\rho(e^{i\theta})w)_0\,d\theta.
\end{align*}
The integral is Hermitian and linear in the same variable as $(\cdot,\cdot)_0$, because integration preserves addition and scalar multiplication. If $v\neq 0$, then the function $\theta\mapsto (\rho(e^{i\theta})v,\rho(e^{i\theta})v)_0$ is continuous and non-negative. Its value at $\theta=0$ is $(v,v)_0>0$, so it is positive on some interval around $0$, and therefore
\begin{align*}
(v,v)_V=\frac{1}{2\pi}\int_0^{2\pi}(\rho(e^{i\theta})v,\rho(e^{i\theta})v)_0\,d\theta>0.
\end{align*}
Thus $(\cdot,\cdot)_V$ is a Hermitian inner product.
For invariance, fix $e^{i\phi}\in T^1$. Using that $\rho$ is a homomorphism,
\begin{align*}
(\rho(e^{i\phi})v,\rho(e^{i\phi})w)_V=\frac{1}{2\pi}\int_0^{2\pi}(\rho(e^{i(\theta+\phi)})v,\rho(e^{i(\theta+\phi)})w)_0\,d\theta.
\end{align*}
With $u=\theta+\phi$, this becomes
\begin{align*}
(\rho(e^{i\phi})v,\rho(e^{i\phi})w)_V=\frac{1}{2\pi}\int_\phi^{2\pi+\phi}(\rho(e^{iu})v,\rho(e^{iu})w)_0\,du.
\end{align*}
The integrand is $2\pi$-periodic because $e^{i(u+2\pi)}=e^{iu}$, so the last integral equals the integral over $[0,2\pi]$. Hence
\begin{align*}
(\rho(e^{i\phi})v,\rho(e^{i\phi})w)_V=(v,w)_V.
\end{align*}
Therefore every $\rho(e^{i\phi})$ is unitary for the averaged inner product. Since $T^1$ is abelian, these unitary operators commute with one another, and the finite-dimensional spectral theorem for commuting normal operators gives a simultaneous decomposition into common eigenspaces. The eigenvalue of $z\in T^1$ on such a common eigenspace is a continuous homomorphism $T^1\to S^1$, hence has the form $z\mapsto z^m$ for a unique $m\in\mathbb Z$. Thus the averaging construction makes the circle action unitary, and the representation splits into its Fourier weight spaces.
[/example]