Describing the symmetries of a $2n$-gon in $\Bbb R^2$ with matrices. Problem:

Consider a regular $2n$-gon in the Euclidean plane $\Bbb R^2$ centered at the origin $(0, 0)$ and with its $2n$ vertices equally distributed on the unit circle. Label the vertices from $1$ to $2n$ in the counter-clockwise direction, the vertex at $(1, 0)$ being labelled $1$ and the one at $(−1, 0)$ being labelled $n + 1$. Let $j(i)$ denote the reflection with respect to the line which passes through vertices $i,\ i + n$ and the center $(0, 0)$ of the $2n$-gon. Find a formula for the matrix of $j(i)$ which represents the linear isometry $j(i)$ with respect to the standard basis of $\Bbb R^2$.

So for a regular hexagon and the reflection along the line passing through the 2nd vertex, I need to desribe the matrix that will map the column vector $(1,0)$ to the third vertex which would be at $\left(\cos \frac{\pi}{6} , \sin \frac{\pi}{6} \right)$ so the first column of my matrix would be that, but I don't know how to get the second part of the basis, $(0,1)$. And then making it in the general case.
 A: Note that we can write any such reflection as the matrix product:
$R^kS$, where:
$R^k = \begin{bmatrix}\cos(\frac{\pi k}{n})&-\sin(\frac{\pi k}{n})\\ \sin(\frac{\pi k}{n})&\cos(\frac{\pi k}{n})\end{bmatrix}$, $k = 0,1,\dots,2n-1$;
and
$S = \begin{bmatrix}1&0\\0&-1\end{bmatrix}$.
It should not be hard for you to prove that:
$R^{2k}S$ fixes the $k$-th vertex and the $k+n$-th vertex, and is thus the reflection we seek.
A: I bet using a $4n$-gon will help. Here is a picture.

Now, what's nice here is that the unlabeled vertex of our dodecagon between vertices $2$ and $3$ just so happens to have coordinates $(0, 1)$. So if we can just figure out what happens to vertex $2.5$ (the vertex between $2$ and $3$), then you'll know where $(0, 1)$ gets sent.
Let's look closely at this hexagon, and see if we spot a pattern. I agree that $j(2)$ will swap vertices $1$ and $3$. If we just look at our picture, we can see where the various vertices get sent:
\begin{align*} 
j(1): 1 &\mapsto 1, \quad 2.5 \mapsto 5.5 \\
j(2): 1 &\mapsto 3, \quad 2.5 \mapsto 1.5 \\
j(3): 1 &\mapsto 5, \quad 2.5 \mapsto 3.5
\end{align*}
Can you see the patterns, where $j(i)$ sends vertices $1$ and $2.5$?
Also, be careful about the vertices of a regular $k$-gon. Yours have coordinates $$\left(\cos\left( m\frac{2pi}{k}\right), \sin \left( m \frac{2\pi}{k}\right)\right) \quad \text{ for }m = 1, 2, \ldots, k,$$
so for example vertex $2$ in the picture has coordinates involving $\pi/3$, not $\pi/6$.
It may help to number the vertices from $1$ to $4n$, if you use the $4n$-gon (vertex $i$ of the $2n$-gon will be $2i - 1$ in the $4n$-gon). Then the coordinate formulas will work nicely on those "in between" vertices, and you can compute where $(0, 1)$ will be sent. You'll need to change the labels of the mirror lines as well.
