In algebraic structure $\langle Z_n, *\rangle$ say for $n=6$, element $3,2,4$ has no inverse. It can be seen that as $(5,6)=1$, so all elements in the set are generated, same for identity element $1$, as:
\begin{array}{|c|c|c|c|} \hline * & 0& 1 & 2 & 3 & 4 & 5\\ \hline 0 & 0& 0 & 0 & 0 & 0 & 0\\ \hline 1 & 0& 1 & 2 & 3 & 4 & 5\\ \hline 2 & 0& 2 & 4 & 0 & 2 & 4\\ \hline 3 & 0& 3 & 0 & 3 & 0 & 3\\ \hline 4 & 0& 4 & 2 & 0 & 4 & 2\\ \hline 5 & 0& 5 & 4 & 3 & 2 & 1\\ \hline \end{array}
Request hint as to which theorem can apply to explain it.
Have some basic analysis, with obvious assumption that all elements are representing modulo remainder equivalence class.:
If there exist for an element $a$ an inverse in set $x \in \mathbb{Z_n}$, then $ax\equiv 1$.
Hence, there must exist another element $a' \in \mathbb{Z_n}$ s.t. $ax= 1+a'y\implies ax+(-a')y =1$.
//Am assuming $y\equiv 1$ to match linear diophantine equation form.
Hence $(a,a')=1$.
But, this fails to explain why inverse of element $5=5$ in above table; as $a=5, x=5$, then for $y=1$, have $a'=0$.
Else, if take $y=4$, then fine; as then $(-a')y= -6.4=-24$.