Prove that in the $D_4$ a square's symmetry group each element can be uniquely written as $r^i s^j$, $i =1,2,3, \ \ j=0,1$, where $r$ is a rotation by $\frac{\pi}{2}$ around the centre of the square, and $s$ is a symmetry around one of the axes, and then write the element as $sr^2s^{-1}r^{-1}s^3r^5.$
I'd appreciate any help.
Thanks.
Theorem $rs = sr^{-1}$.
proof: $$rs(x,y) = r(-x,y) = (-y,-x)$$ and $$sr^{-1}(x,y) = s(y,-x) = (-y,-x).$$
Now we can use this result, for example $$\begin{array}{rcl} && sr^2s^{-1}r^{-1}s^3r^5 \\ &=& ss^{-1} r^{-2} r^{-1} s^3 r^{5} \\ &=& r^{-3} s s s r^{5} \\ &=& s r^{3} s s r^{5} \\ &=& s s r^{-3} s r^{5} \\ &=& s s s r^{3} r^{5} \\ &=& s^{3} r^{8} \\ &=& s \end{array}$$