Corollary. Linear coefficients of the gcd and reciprocals of modular integers [01EZ]

For all positive integers m and n,

  1. n\cdot \operatorname {lc}_2{\mathopen {}\left (m,n\right )\mathclose {}} \equiv \gcd {\mathopen {}\left (m,n\right )\mathclose {}}\mod m, and
  2. whenever m and n are coprime (i.e. \gcd {\mathopen {}\left (m,n\right )\mathclose {}}=1), the modular normal form {\mathopen {}\left [\operatorname {lc}_2{\mathopen {}\left (m,n\right )\mathclose {}}\right ]\mathclose {}}_m is the reciprocal of {\mathopen {}\left [n\right ]\mathclose {}}_m in \mathbb {Z}_m.
After attempting to prove this yourself, you may click this text to see my proof.