Questions on dihedral group and orthogonal group I am learning dihedral groups in my abstract algebra course. My teacher leaves us the following exercise. I can work out the first three parts only and I cannot even understand the question in part 5. Please feel free to offer help.
Question:

Let $O(2, \mathbb{R}) = \{ A \in GL(2, \mathbb{R}) : A A^t = I \}$,
  i.e. the orthogonal group. $GL(2, \mathbb{R})$ is the set containing
  all invertible $2 \times 2$ matrices with real entries.
  
  
*
  
*Prove that $O(2, \mathbb{R})$ is a subgroup of $GL(2, \mathbb{R})$.
  
*Consider $D_n$, the dihedral group. Prove that $D_n \subset O(2, \mathbb{R})$.
  
*Prove that $SO(2, \mathbb{R})$, the set of all $A \in O(2, \mathbb{R})$ such that $det(A) = 1$, is a subgroup of $O(2,
 \mathbb{R})$.
  
*Show that every element in $O(2, \mathbb{R})$ is of the form either $ \left(\begin{array}{ccc}cos \theta & sin \theta  \\-sin
 \theta & cos \theta  \end{array} \right) $ or $
 \left(\begin{array}{ccc}0 & 1  \\1 & 0  \end{array} \right) $$
 \left(\begin{array}{ccc}cos \theta & sin \theta  \\-sin \theta & cos
 \theta  \end{array} \right) $ for some $\theta \in \mathbb{R}$.
  
*Let $n \geq3$ be an integer. Consider the regular $n$-gon $\Gamma_n$ in $\mathbb{R}^2=\mathbb{C}$ whose vertices are the $n$
  points $(cos\frac{2\pi k}{n}, sin\frac{2 \pi k}{n})$. Prove that $D_n
 = \{ A \in O(2, \mathbb{R}): A(\Gamma_n)=\Gamma_n\}$.
  

The first three parts are trivial. I have successfully shown all of them. But what about question 4 and 5? Thanks in advance.
 A: For part four, write down
$$
\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} a & c \\ d & d \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
$$
and consider two cases: 


*

*$a = 0$

*$a \ne 0$


The first will lead you to 
$$
\begin{bmatrix} 0 & \pm 1 \\ \pm 1 & 0 \end{bmatrix}
$$
The second will lead you to $c = -b$, and $a^2 + c^2 = 1$. Set $\theta = atan2(c, a)$, and observe that for this $\theta$, $a = q\cos \theta, c = q\sin \theta$ ... and then that $q = \pm 1$. That pretty much handles part 4. 
Once you've done that, part 5 should not be too bad. The subgroup $G$ of $O(2, R)$ specified certainly contains rotation by $h = 2\pi k / n$, and hence all its powers. Since its $n$th power is the identity, you've got a $Z/nZ$ in $G$. It also contains a flip about a horizontal axis. That's the order-2 element of $D_n$. Now all you have to do is set of a mapping and prove it's an isomorphism. 
Post-comment edit: 
I'm not sure how you've defined $D_n$. I think of it as a group with two generators $a$ and $b$, and relations $a^n = b^2 = e$ and $bab = a^{-1}$. Others say "it's the group of symmetries of a regular $n$-gon." I'm sure there are other definitions. If you go with my definition, you need to find a map from $D_n$ to the subgroup $G$, and since $a$ and $b$ are generators, you just need to show where to send those. You send $a$ to 
$$
f(a) = \begin{bmatrix} \cos u & -\sin u \\ \sin u & \cos u \end{bmatrix} 
$$
where $u = 2\pi /n$. You then compute $f(a^k) = f(a)^k$, for $k = 1, 2, \ldots$ and show none of these is the identity until  $f(a^n) = I_2$.
Then you send $b$ to an element of order $2$ in $G$ ... like reflection through the $x$ axis, i.e. 
$$
f(b) = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} 
$$
Now confirm that $f(b)^2 = I_2$, thus checking that the second "relation" holds. 
Finally, you need to check that $f(bab) = f(a)^{-1}$, which is just a bunch of matrix multiplication. 
Once you've done this, you know that $f$ is a homomorphism, it's kernel is $\{e\}$, and the only question is "is it surjective?". To prove surjectivity, suppose that $M$ is a matrix in $O(n)$ that preserves $\Gamma_n$. Call the points of $\Gamma_n$ $v_0, \ldots, v_n$, where $v_k$ corresponds to $2\pi k/n$. 
Then $M v_0 = v_k$ for some $k$. Let $M_k$ be "rotation through angle $2\pi k/n$", i.e., $f(a^k)$. Then we have 
$$
M_k^{-1} M v_0 = v_0
$$
which is a matrix in $O(2)$ that holds fixed the horizontal axis. That makes it have to be 
$$
\begin{bmatrix} 1 & 0 \\ 0 & \pm 1 \end{bmatrix}
$$
If it's the identity, then $M = M_k = f(a^{k}$, so $M$ is in the image of $f$. 
If it's the other matrix, which happens to be $f(b)$, then we have
$$
f(a^{-k}) M = f(b) \\
M = f(b) f(a^{k})
$$
and once again $M$ is in the image of $M$. So $f$ is surjective, injective, and a homomorphism. Thus it's an isomorphism onto a subgroup of $O(2)$. 
A: Part 4 Note that translating the condition $AA^T = I$ into statements about the rows and columns of $A$ simply says that $A$ is orthonormal iff its columns form and orthonormal basis of $\mathbb{R}^2$ (with respect to the usual inner product). Since the first column of $A$ has unit length, we can write it as $$(\cos \theta, -\sin \theta).$$ The second column must be orthogonal to this and have unit length, and so must be able to write it as
$$\pm (\sin \theta, \cos \theta)$$
for some choice of $\pm$. The choice $+$ leads to the first form, and the choice $-$ leads (after an appropriate change of parameter) to the second.
Part 5 This is somewhat involved, and partly depends on what definition you're using for $D_n$ in the first place. But even without knowing that we can get starting by identifying explicitly the subgroup of $O(n)$ that maps $\Gamma_n$ to itself: Any element $A \in O(n)$ such that $A(\Gamma_n) = \Gamma_n$ must in particular send the point $(1, 0)$ to one of the other vertices of $\Gamma_n$, say, to $\left(\cos \frac{2\pi k}{n}, \sin \frac{2\pi k}{n}\right)$, and by definition, this is the first column of $A$. By the above characterization, this determines the second element up to sign. There are $n$ possibilities for $k$, and each leads to two possibilities for $\pm$, giving a total of $2n$ matrices, and checking directly shows that all of these do indeed map $\Gamma_n$ to $\Gamma_n$.
