I have trouble proving the above statement.
Here is my approach.
First, I prove that if $n$ and $k$ are not relatively prime, it implies that $[k]_n$ is not invertible.
If $n$ and $k$ are not relatively prime, there exist $g \neq 1$ such that $nx+ky=g$ for some integers $x$ and $y$. (Bézout's identity)
Multiply the equation by, $n/g$
$(n^2x)/g+(nky)/g=n$
We can simplify this by taking the $(mod \hspace{0.1cm} n)$
$(nky)/g=0(mod \hspace{0.1cm} n)$
I don't understand how to proceed from here!. I sense that it has something to do with $k=0$ is the only solution here.
The converse proof is fairly straightforward (I assume.)
Here is my approach to prove the converse, if $k$ and $n$ are relatively prime then $[k]_n$ is invertible.
Again by the Bézout's identity (if $k$ and $n$ are relatively prime), there exist integers $x$ and $y$ which satisfy $nx+ky=1$. We can simplify this to $k\times(y+nx/k)=1$. It is clear that $(y+nx/k)$ is the inverse of $k$.