Dihedral group as a matrix group I wish to consider the dihedral group as a matrix group. One way to do that is to consider it as a finite subgroup of $O_2$, a group of orthogonal $2\times 2$ matrices, defined by $\{R_0,R_1,R_2,\cdots R_{n-1},F_0,F_1,F_2,\cdots F_{n-1}\}$ where $R_k=\begin{pmatrix}c_k&-s_k\\s_k&c_k\end{pmatrix},F_k=\begin{pmatrix}c_k&s_k\\s_k&-c_k\end{pmatrix}$ for $c_k=\cos \frac{2\pi k}{n}, s_k=\sin \frac{2\pi k}{n}$. This very nicely shows that $R_k$ rotates by an angle of $\frac{2\pi k}{n}$ and $F_k$ flips across a line making an angle $\frac{\pi k}{n}$ with the $x$-axis. 
However I am interested in interpreting $D_n$ as a subgroup of $S_n$, where $S_n$ is defined as the group obtained by permuting rows of $I_n$. What will be the definition of $D_n$ as a matrix group in that case and how does it correspond to to the geometric notion of $D_n$?
Thanks
 A: The most natural representation of $S_n$ is in terms of permutation matrices; for example, in $S_5$ the matrix
$$\begin{bmatrix} 
1 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 \\
0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 1 & 0 & 0 
\end{bmatrix}$$
maps $1\mapsto 1, 2\mapsto 3,3\mapsto 5,4\mapsto 2,5\mapsto 4$.
As a subgroup of these matrices, the dihedral group contains two types of maps, the rotations and the reflections. Numbering the vertices $1,\cdots,n$ anticlockwise we obtain $n$ matrices like the cyclic permutation
$$\begin{bmatrix} 
0 & 0 & 0 & 0 & 1 \\
1 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 
\end{bmatrix}$$
which are easy to understand. The remaining terms are reflections. These are harder to imagine.
For $n$ odd, each reflection fixes one point and swaps the rest. The reflections fixing 3 and then 4 in the pentagon are as follows
$$\begin{bmatrix} 
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 1 & 0 \\
0 & 0 & 1 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 & 0 
\end{bmatrix} \text{ and }
\begin{bmatrix} 
0 & 1 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 1 & 0 \\
0 & 0 & 1 & 0 & 0 
\end{bmatrix}$$
They form a diagonal of ones travelling in the opposite direction; this is because the two points immediately adjacent to the fixed point must swap, as must the next two round, ...
For $n$ even, there are two types, fixing two points, or fixing none. But either way, counting away from the line of reflection, each pair must swap. In the hexagon, the reflection swapping (1,2) and (6,3) and (5,4) is
$$\begin{bmatrix} 
0 & 1 & 0 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 
\end{bmatrix}$$
Hence the pattern works.

In general, the rotations are a down-right diagonal of ones, wrapping back into the matrix, whilst the reflections are a down-left diagonal of ones, also wrapping around.
Edit: The geometrical interpretation is much looser here; the key idea is that two points are next to each other before if and only if they were next to each other afterwards. Consequently, the ones must lie on some (shifted) diagonal because this is the only type of matrix that preserves all adjacencies.
