Prove that this set can be identified with a lie group $O(2,\mathbb{R})$ This question is from my assignment on Lie groups and I am struck on it.

Define a map $f: O(3,\mathbb{R}) \times S^2 \to S^2 $ by $f(A, x) =Ax$. Let $e_1 =(1,0,0)$. Show that the set $S =\{ B\in O(3,\mathbb{R} ) | f(B,e_1)=e_1\}$ can be identified with Lie group $O(2, \mathbb{R})$.

Attempt: If I try to find the matrices satisfying $S=\{B\in O(3,\mathbb{R})| f(B,e_1)\}=e_1$. I will get $b_{11} =1 $, $b_{12}=0$ , $b_{13}=0$ of the matrices (B) but for other six values I am not able to find them by just comparing RHS and LHS. Also, I am not able to understand if I get values of other six entries how exactly I can identify it as Lie group $O(2,\mathbb{R})$.
 A: You know that if $B$ is in $S$, then
$$ B = \begin{bmatrix} 1 & * & * \\ 0 & * & * \\ 0 & * & * \end{bmatrix}$$
Since $B$ is orthogonal. We must also have
$$ B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & * & * \\ 0 & * & * \end{bmatrix}$$
Since the first column of $B$ is orthogonal to the second and the third column. So one can write
$$\tag{1} B = \begin{bmatrix} 1 &  \\  & C\end{bmatrix}$$
for a $2\times 2$ matrix $C$. Using $BB^t = I_3$, one has $CC^t = I_2$. Thus $C\in O(2, \mathbb R)$. On the other hand, for any $C\in O(2, \mathbb R)$, $B$ constructed in (1) is in $S$. Thus there is a bijective map between $S$ and $O(2, \mathbb R)$.
A: I wanted to type something similar to the other answer (so now I don't have to anymore), as an indication how to prove this along the lines you were already working on. But I also wanted to say something else (which I still will) about how to see more intuitively that this is indeed true.
O(3) consists of all linear transformations from 3-dimensional space that conserve distances and hence angles. Being linear they must map the origin to itself. The other properties in the definition of linear however already follow from preserving distances (remember how vector addition is described in terms of parallellograms). So what $O(3)$ is is the set of all transformations that preserve distances and the origin.
Now obviously this means that they map any sphere around the origin to itself, and in fact (since empty space is a bit hard to picture) 'the group of all rigid maps from a sphere $S^2$ to itself' is in fact the easiest way to think about $O(3)$.
Similar $O(2)$ can be best thought of as the set of all rigid maps from a circle to itself.
The question now asks 'within the set of all rigid transformation of a sphere, I look at the subset of all transformations that keep the North Pole in place. Why would this be isomorphic to the set of all rigid transformations of a circle?'
The natural first step in finding an answer is to find a circle that is mapped to itself by all transformations in the subset Next we can try to see that, conversely, every rigid transformation of that circle extends to one of the whole sphere that preserves the North Pole.
If you picture a sphere in your head such a circle is not hard to find: it is the equator!
