Number of reflections is odd Let $D_{4}$ be the dihedral group of a square, $r$ and $s$ denote rotation by $90^{\circ}$ in the clockwise direction and reflection respectively. Suppose through a series of reflections and rotations you attained a reflection prove that there are odd number of reflections you have done.
It can be proved by using the relation $rs=sr^{-1}$ and that every element of the dihedral group can be written uniquely as $ r^is^j,0\leq i\leq3,0\leq j\leq1$.
I'm looking for a proof by the action of dihedral group on a polynomial say $f(x_1,x_2,x_3,x_4) \in \mathbb{Z}[x_1,x_2,x_3,x_4]$ (I label the vertices from 1 to 4 cyclically) such that sign of the polynomial changes when we apply a reflection and its unchanged by a rotation.
I tried using the polynomial $f(x_1,x_2,x_3,x_4) = \prod_{1\leq i < j \leq 4} (x_i-x_j)$ but it gives a negative sign for a rotation.
Thanks in advance
 A: Might this be the kind of thing you're after? Take
$$
f(x_1,x_2,x_3,x_4)=x_1x_2x_3^2+x_2x_3x_4^2+x_3x_4x_1^2+x_4x_1x_2^2
$$
For any point in $\Bbb Z^4$, cyclically permuting the coordinates clearly doesn't change the value of the function, but flipping them does:
$$
f(0,1,2,3)=18\neq 6=f(3,2,1,0)
$$
Or, if you want a polynomial such that cyclic permutation leaves it unchanged while flipping just changes the sign, then $f(x_1,x_2,x_3,x_4)-f(x_4,x_3,x_2,x_1)$ is the one you're looking for.
A: I had asked for a polynomial in 4 variables and Arthur has answered it but one can also consider this polynomial with 8 variables
$$
\begin{vmatrix}
1 & x_1 & y_1 \\
1 & x_2 & y_2 \\
1 & x_3 & y_3 \\
\end{vmatrix}
+
\begin{vmatrix}
1 & x_2 & y_2 \\
1 & x_3 & y_3 \\
1 & x_4 & y_4 \\
\end{vmatrix}
+
\begin{vmatrix}
1 & x_3 & y_3 \\
1 & x_4 & y_4 \\
1 & x_1 & y_1 \\
\end{vmatrix}
+
\begin{vmatrix}
1 & x_4 & y_4 \\
1 & x_1 & y_1 \\
1 & x_2 & y_2 \\
\end{vmatrix}
$$
One can check that rotations don't change the polynomial but reflections change the sign of the polynomial (by the property of the determinants). Motivation for this polynomial is consider the square in a cartesian plane with vertices $(x_i,y_j)$ cyclically. Then the above polynomial is twice the area of the square but when we reflect, the area remains the same but the orientation of the square is changed.
