In this question:
Find natural numbers $n,m$ such that the residue class $[m]_n \in \mathbb{Z}_n$ has order $5$.
My solution was $m = 2$ and $n = 31$ as $2^5 = 32 \equiv 1 \pmod{31}$.
However, the solutions stated that:
If $(\mathbb{Z}_n, \times)$ has an element of order $5$, then we know that its order is divisible by $5$.
Is my answer not a counter-example to this statement?
The Lagrange Theorem for groups helps here: the element in question generates a subgroup. The order of the element is the order of the subgroup. The order of the subgroup divides that of the group, by Lagrange's theorem.