Unitary operator on $\mathbb{R}^2$ I am trying to solve the following froblem.
Any unitary operator on $\mathbb{R}^2$ in standard inner product with standard ordered basis is given by any of the following two matrices
$$A = \left[\begin{array} &\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array}\right]$$ 
or
$$B = \left[\begin{array} & \cos(\theta) & \sin(\theta)\\ \sin(\theta) & -\cos(\theta) \end{array}\right]$$
I have tried a little. It is as follows.
Unitary operator $U$ on space $\mathbb{R}^2$ are one-one and onto linear mappings, preserving the inner product, i.e. $(U(\alpha)|U(\beta)) = (\alpha|\beta)$. If $\alpha = (a_1,a_2)$ and $\beta = (b_1,b_2)$ and if $U(\alpha) = (a_1',a_2')$, $U(\beta) = (b_1',b_2')$ then from the relation for preserving the inner product we shall get the following relation 
$$a_1'b_1' + a_2'b_2' = a_1b_1 + a_2b_2$$
But I am not getting any more. Can you help me a little to solve it completely?
Can we generalize the result in $\mathbb{R}^n$? If possible what will be the generalization?
Source:Linear Algebra by Hoffman Kenneth, Kunze Ray. Section 8.4. Exercises. Page 309. Problem no. 4 
THANK YOU FOR YOUR ANSWER. PLEASE.
 A: Assuming you meant orthogonal operators, you can reason as follows. Applying the rule $(U(\alpha)\mid U(\beta)) = (\alpha\mid \beta)$ with $\alpha,\beta$ taken to be standard basis vectors, you find that the columns of you matrix are of norm$~1$ and orthogonal to each other. Now any norm$~1$ vector in $\Bbb R^2$ can be written as $\binom{\cos\theta}{\sin\theta}$ for an appropriate angle$~\theta$, and there are precisely two norm$~1$ vectors orthogonal to it (for the other column). Solving which these two vectors are gives you the two forms listed for your matrix.
So explicitly, if $A=\bigl(\begin{smallmatrix}a&c\\b&d\end{smallmatrix}\bigr)$ is your orthogonal matrix, you've got relations $a^2+b^2=1$, $ac+bd=0$, and $c^2+d^2=1$. From the first equation you can find $\theta$ sich that $a=\cos\theta$ and $b=\sin\theta$. Once this is done, the second relation has as solutions $c=-t\sin\theta$ and $d=t\cos\theta$ for $t\in\Bbb R$. The third condition then gives $t^2=1$ with solutions $t=1$ (giving for $A$ the first type of matrix mentioned in the question: $A=\bigl(\begin{smallmatrix}a&c\\b&d\end{smallmatrix}\bigr)=\bigl(\begin{smallmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{smallmatrix}\bigr)$ and $t=-1$ (similarly giving the second kind of matrix $\bigl(\begin{smallmatrix}\cos\theta&\sin\theta\\\sin\theta&-\cos\theta\end{smallmatrix}\bigr)$, called $B$ in the question).
The generalisation to higher dimensions gets considerably messier. Technically expressed, the groups $O(n,\Bbb R)$ for $n>2$ are quite a bit harder to parametrise than $O(2,\Bbb R)$.
