Let m be a positive integer and fix k:\mathbb {Z}_m.
In the forward direction, we assume that k has a reciprocal in \mathbb {Z}_m, i.e. some \bar {k}:\mathbb {Z}_m such that k\cdot _m \bar {k} \equiv 1\mod m. We must find integers i,j such that k\cdot i + m \cdot j = 1. Choosing i \coloneqq \bar {k}, we have k\cdot i \equiv k\cdot _m i \equiv 1 \mod m and therefore m \mid (k\cdot i - 1) and hence k\cdot i - 1 = m\cdot l for some l. Hence k\cdot i - m\cdot l = 1, so we may choose j\coloneqq -l.
In the backward direction, we suppose that we have i,j such that k\cdot i + m\cdot j = 1. We must find a reciprocal for k; in fact, the modular normal form [i]_m is such a reciprocal:
\begin {aligned}
k \cdot _m [i]_m
&= [k\cdot i]_m
\\
&\equiv k\cdot i &\mod m
\\
&= 1 - m\cdot j
\\
&\equiv 1 &\mod m
\end {aligned}