Let $m, x$ be positive integers such that $\gcd(m, x) = 1$. Then $x$ has a multiplicative inverse modulo $m$, and it is unique (modulo $m$).
Proof: Consider the sequence of $m$ numbers $0, x, 2x, \dots, (m−1)x$. We claim that these are all distinct modulo $m$. Since there are only $m$ distinct values modulo $m$, it must then be the case that $ax \equiv 1 \pmod m$ for exactly one $a$ (modulo $m$). This $a$ is the unique multiplicative inverse of $x$.
To verify the above claim, suppose for contradiction that $ax \equiv bx \pmod m$ for two distinct values $a,b$ in the range $0 \leq b \leq a \leq m−1$. Then we would have $(a−b)x \equiv 0 \pmod m$, or equivalently, $(a−b)x = km$ for some integer $k$ (possibly zero or negative). However, $x$ and $m$ are relatively prime, so $x$ cannot share any factors with $m$. This implies that $a−b$ must be an integer multiple of $m$. This is not possible, since $a−b$ ranges between $1$ and $m−1$.
I understand the contradiction and how this proves that the sequence of $m$ numbers are all unique mod $m$; however, I am unsure how if this is the case, then it implies that $ax \equiv 1 \pmod m$ for exactly one $a \pmod m$.