$U(24) $ isomorphic to $Z_2\times Z_2 \times Z_2$ I'm trying to show that $Z_2 \times Z_2 \times Z_2$ is  isomorphic to $U(24)$.
I start by defining $f \colon Z_2 \times Z_2 \times Z_2 \to U(24)$  by $f((a,b,c)) = 12a + 6b + 4c + 1 \pmod{24}$.
Let's attempt to show it preserves the operation:
$$ \begin{align*}
f((a,b,c))f((d,e,f)) &= 
(12a+6b+4c+ 1)(12d+6e+4f+1) \pmod{24} \\ &= 
144ad + 72ae + 48af + 12a + 72bd + 36be + 24bf + 6b \\ & \quad + 48cd + 24ec + 16cf + 4c + 12d + 6e + 4f + 1 \pmod{24} \\ &= 
12a + 12d + 6b + 6e + 4c + 4f + 1 + 36be + 16cf \pmod{24} \\ &= f((a+d,b+e,c+f)) + 36be + 16cf \pmod{24} \\ &= 
f((a,b,c)(d,e,f)) + 36be + 16cf \pmod{24}
\end{align*} $$
It seems like the extra $36be$ and $16cf$ terms are saying that $f$ does not preserve the operation...
However, I have been unable to find a counter example of the map not working (not a proof obviously, but I'm just wondering where I'm going wrong).
 A: Hints:


*

*$\mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2$ has order 8.

*Identify the 8 invertible elements in $\mathbb{Z}_{24}$.

*A homomorphism must map identity to identity.  Be careful here, since the group operation for $\mathbb{Z}_{24}^\times$ is multiplication but addition in $\mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2$.

*Start multiplying some of the invertible elements in $\mathbb{Z}_{24}$, to try to see an isomorphism.

A: Okay, here's the rub.  The variables $a,b,c,d,e,f \in \mathbb{Z}_2$.  So, for example, the "error" term $36be$ is $0$ unless both $b = e = 1$, but in that case, $b + e = 0 \in \mathbb{Z}_2$.
Concretely, we have
$$\begin{align}
f((0,1,0))f((0,1,0)) &= (6 + 1)(6 + 1) = 36 + 6 + 6 + 1 = 49 = 1 \\
\text{and }f((0,1,0)+(0,1,0)) &= f(0,0,0) = 1,
\end{align}$$
as expected.  However, without reducing modulo $2$ before applying the function, we get
$$ f((0,1,0)+(0,1,0)) = f((0,2,0)) = 12 + 1 = 13,$$
and only after adding $36be = 36$ do we recover the correct value of 1.
Your function is not well-defined.

Here's a map that is a homomorphism:
$$\begin{align}
\varphi: \mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2 &\to \mathbb{Z}_{24}^\times \\
(a, b, c) &\mapsto 13^a \cdot 7^b \cdot 5^c
\end{align}
$$
Notice that it gives the same values as your $f$, but it has the expected exponential behavior, converting additive structure to multiplicative structure.
A: For odd $n$ that are not a multiple of 3, one of $n-1$ and $n+1$ is divisible by 4 and the other is divisible by 2. Also, one of $n-1$ and $n+1$ is divisible by three. 
So, for odd $n$ that are not a multiple of 3, $n^2-1$ is a multiple of 24. 
If $x$ is invertible mod 24, $x$ must be odd and not a multiple of three. There are $\phi(24) = \phi(8 \times 3) = 8$ such $x$.
Therefore, $U(24)$ is a group of 8 elements, in which every element has order 2. Thus $U(24) \cong \mathbb{Z}_2^3$ by elementary group theory.
