Product of units modulo m Help!!! I can find units in a given $Z_m$ manually by testing out every single value which is relative to m,,, but in general I do not know a way how to find such units... hence I cant answer this question: Prove that the product of units mod m is congruent to $\pm 1$ mod m.
Any idea?
 A: More generally: the product of all elements in any finite abelian group has order $2$ or $1$, and the order is $2$ iff there is exactly one element of order $2$ in the group.
The first claim is easy to show: For each element that does not have order $2$, its inverse is also in the product, so they pair up and disappear from the final result. Thus the product of all elements is the same as the product of all elements of order $2$, which necessarily has order $2$ or $1$.
From here on, I will just disregard all the other elements and concentrate on the subgroup consisting of elements of order $2$ (plus the identity), since all the other elements cancel anyways and don't contribute to the final product. If this subgroup is trivial, then we are done, since there is no element of order $2$, and the product must therefore have order $1$.
Otherwise, take any non-identity element $g$ in the group, and divide all the elements of the group up in pairs so that $h$ is paired with $gh$ for all elements $h$. The product of the two elements in a pair is $g$, so it remains to count the number of pairs.
In fact, the number of elements in the group (and therefore the number of pairs) is a power of $2$: If you want to count the elements, start with the identity, that's one element. Now take a $g_1\neq e$. We now have two elements. Take a new $g_2\neq e, g_1$. This $g_2$ gives two new elements, because neither $g_2$ nor $g_1g_2$ have been counted already. Next, we pick a new element $g_3$, and get four new elements: $g_3, g_1g_3, g_2g_3, g_1g_2g_3$. We keep going, for each new element doubling the number of elements we can reach. Thus when we are done we must have ended up on a power of $2$.
So we see that if there is exactly one element of order $2$, then we just get one pair, so the final product is that $g$. Otherwise, the number of pairs must be even, and so the final product becomes $e$.
A: The product of all units mod $m$ can be written as $P=\prod_{x^2\ne1} x \prod_{y^2=1} y$.
The first product is $1$ because each $x$ is paired with $x^{-1}$ and they are different.
Therefore, $P=y_1 \cdots y_n$ with $y_i^2=1$.
If $n=1$, then $P=1$ because $y=1$ is certainly there.
If $n=2$, then $P=-1$ because $y=-1$ is certainly there.
If $n>2$, Then $y \mapsto -y$ is a permutation of the elements such $y^2=1$. This permutation has no fixed points, that is, $-y\ne y$. This implies than $n$ is even. Thus, every $y$ is paired with $-y\ne y$ and $y(-y)=-1$. Therefore, $P=(-1)^{n/2}=\pm 1$.
(Actually, in the last case, $n/2$ is even and $P=1$. This follows from Lagrange's theorem applied to a subgroup $\{1,-1,y,-y\}$.)
A: If the class of of $[p]$ is invertible mod $m$, $a'p=am+1$ or $am-1$, you have
$(am+1)(bm+1)=m(mab+a+b)+1, (am+1)(bm-1)=m(abm-a+b)-1$
$ (am-1)(bm-1)=m(abm-a-b)+1$. This shows the product of two invertible numbers mod $m$ is $1$ mod $m$ or $-1$ mod $m$.
