Proof of sum of modular inverses Prove the following theorem:   Theorem: Given modulus $m$ and invertible numbers $a,b \,(\mathrm{mod} \, m) $ if $a^{-1}+b^{-1} = m$ then $a + b = m.$  
My proof: We know that $aa^{-1} \equiv 1\, (\mathrm{mod} \, m)$ and $bb^{-1} = 1 \,(\mathrm{mod} \, m)$. That means that $$aa^{-1} = mk +1$$ 
for some integer $k$, and $$bb^{-1} = mn +1$$ for some integer $n$. Then $$a^{-1} = \frac{mk +1}{a}$$ and $$b^{-1} = \frac{mn +1}{b}$$ We know that $a^{-1} + b^{-1} = m$, so $$\frac{mk +1}{a} + \frac{mn +1}{b} = m$$ Simplifying, $$\frac{m(kb+an) + a + b}{ab} = m$$ Multiplying by $ab$ on both sides and grouping terms, $$a+b = m(ab - kb - an)$$
To prove the original theorem, we need to show that $ab - kb - an = 1$, but how does one do that?
 A: First of all we have to take $0<a,b<m$ and also $0<a^{-1},b^{-1}<m$, as otherwise $a^{-1} + b^{-1}$ doesn't make sense in $\mathbb{Z}$. The reason is that we can take $a^{-1} + m$, instead of $a^{-1}$, which again would be an inverse of $a$. 
Now back to the proof. First note that $b  \equiv -a \pmod m$. This means that $b^{-1} \equiv -a^{-1} \pmod m$. Hence we have that $a^{-1} + b^{-1} \equiv 0 \pmod m$. As $0< a^{-1}, b^{-1} < m$ and $m \mid a^{-1} + b^{-1}$ we must have that $a^{-1} + b^{-1} = m$
A: You don't need to show that $ab - kb - an = 1$.
You have shown that $a+b = m(ab - kb - an)\equiv 0 \bmod m$. Then taking $a$ and $b$ as values in the range $1\le a,b \lt m$ you can see that $2\le a+b \lt 2m$ so the only value also meeting $a+b\equiv 0 \bmod m$ is $a+b=m$.
A: $$a^{-1} + b^{-1} \equiv 0 \mod{n}$$
$$a^{-1} \equiv -b^{-1} \mod{n}$$
$$a*a^{-1} \equiv a * (-b^{-1}) \mod{n}$$
$$1\equiv a * (-b^{-1}) \mod{n}$$
$$-1\equiv a * b^{-1} \mod{n}$$
But we know also that
$$1\equiv b * b^{-1} \mod{n}$$
Summing the two equations:
$$0 \equiv (a+b)*b^{-1} \mod{n}$$
But $b \not \equiv 0 \mod{n}$ (since it has an inverse) $\implies$ $a+b \equiv 0 \mod{n}$
