Let $n$ be a positive integer. Show that there exists a group homomorphism $$p:C_n \longrightarrow GL(2,\mathbb{R})$$ with, $$p((0 1 2 \cdots (n-2) (n-1))^r)=\left( \begin{smallmatrix} \cos(\frac{2r\pi}{n})&-\sin(\frac{2r\pi}{n})\\ \sin(\frac{2r\pi}{n})&\cos(\frac{2r\pi}{n}) \end{smallmatrix} \right)$$ for $1 \leq r \leq n$.
My work: We know that both $C_n$ (The cyclic group of order $n$) and $GL(2,\mathbb{R})$ (The group of units of the monoid of $2\times2$ matrices) are both groups and therefore we only need to show that $p$ is a semigroup homomorphism, and that will be enough to show $p$ is a group homomorphism. I'm not sure how to do that, any help is appreciated.
The group $C_n$ is cyclic. Denote a generator by $g$ (in your example $g$ is $(0\,1\,2\,\ldots\,(n-1))$). A homomorphism from $C_n$ to a group $H$ is always defined by a formula $\phi(g^r)=h^r$ where $h$ is an element of $H$ satisfying $h^n=e_H$ (the identity of $H$).
Here, your $h$ is the matrix $$\pmatrix{\cos(2\pi/n)&-\sin(2\pi/n)\\\sin(2\pi/n)&\cos(2\pi/n)}.$$ So you need to check that $$\pmatrix{\cos(2\pi/n)&-\sin(2\pi/n)\\\sin(2\pi/n)&\cos(2\pi/n)}^r =\pmatrix{\cos(2\pi r/n)&-\sin(2\pi r/n)\\\sin(2\pi r/n)&\cos(2\pi r/n)}$$ and $$\pmatrix{\cos(2\pi/n)&-\sin(2\pi/n)\\\sin(2\pi/n)&\cos(2\pi/n)}^n=I.$$