Consider the representation of $SO_2$ defined by $$\sigma(\theta)=\begin{bmatrix} \alpha & \alpha^2-\alpha \\ 0 & \alpha^2 \end{bmatrix},$$ where $\alpha=e^{i\theta}$.
It isn't too hard to show this is a valid representation (just show it's a group homomorphism).
Now, we're supposed to reduce it into a unitary representation by averaging the Hermitian product. The first step is to find a orthonormal basis, right?
I define the Hermitian form: $$\langle v,w\rangle = \frac{1}{2\pi}\int_{0}^{2\pi} \sigma(\theta)v\cdot \sigma(\theta)w \,d\theta,$$ where $(\cdot)$ is the usual dot product.
So, I decided to do this by first finding an orthogonal basis $v_1=[1,0]^T$ and $v_2=[1,1]^T$. I did this by first choosing $v_1$ and solving $<v_1,v_2>=0$ to determine what $v_2$ would have to be.
To normalize these vectors, I consider $\langle av_1,av_1\rangle $ and $\langle bv_2,bv_2\rangle $, where $a,b \in \mathbb{C}$. Solving, I get $a=1$ and $b=\frac{1}{\sqrt{2}}$. So, my orthonormal basis consists of the vectors $w_1=[1,0]^T$ and $w_2=[\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}]^T$.
Then, the second step is to determine my change of basis matrix $P$. Using my orthonormal basis, I define: $$P=\begin{bmatrix} 1 & \frac{1}{\sqrt{2}} \\ 0 & \frac{1}{\sqrt{2}} \end{bmatrix} \quad P^{-1}= \begin{bmatrix} 1 & -1 \\ 0 & \sqrt{2} \end{bmatrix}$$
Then, I computed $P\sigma(\theta)P^{-1}$ to convert $\sigma(\theta)$ to a unitary matrix: $$P\sigma(\theta)P^{-1} = \begin{bmatrix} e^{-i \theta} & 0 \\ 0 & e^{-2i \theta} \end{bmatrix} \in U_n$$
So, this implies our new representation defined this way is unitary. Have I done this correctly? Are these the essential steps to creating a unitary representation in general?
Thanks!
I believe the answer I've described in the question is correct, and that in general these are the essential steps to creating a unitary representation.