Multiplicative Inverse $\mod p$

Here's the question I'm working on:

Let $p$ be an odd prime number. Show that the multiplicative inverse of $\overline {2}$ in $\mathbb{Z_p}$ is $\overline {(p+1)/2}$. What is its multiplicative inverse if $p = 2?$

I really don't know how to even approach this problem. In order to find multiplicative inverses, I usually just compute the $gcd$ of a pair of given numbers using the Euclidian algorithm somewhere along the proof.

• It is asking about nonexistent object.. – i707107 Feb 27 '17 at 18:28
• Check that $\overline{(p+1)/2}$ satisfies the requirements of being a multiplicative inverse of $\overline{2}$ in $\Bbb{Z}_p$. That's all there is to it! About the second question: If $p=2$ then $\overline{2}=\overline{0}$. Have you not been taught what they say about division by zero? – Jyrki Lahtonen Feb 27 '17 at 18:29
• I know that but how should I begin is the real question. – John Smith Feb 27 '17 at 18:30
• Just calculate. If you are asked to show that the last digit of $3\cdot7$ is $1$ you just calculate the product, right? It's the same thing here. You calculate whatever product you are required to calculate. – Jyrki Lahtonen Feb 27 '17 at 18:32
• Correct me if I'm wrong but I just calculate the product of $2$ and $(p+1)/2$? – John Smith Feb 27 '17 at 18:35

Hint $\,\ p\,$ odd $\,\Rightarrow\, p = 2k-1\,\Rightarrow\, 2k\equiv 1\pmod{\!p}$