# Multiplicative inverses why two z in this formula?

I am studying maths and have the following question set by my professor.

I thought the answer was 5, because: 3 . 5 = 15, and 15 mod 7 is 1. Since 1 mod 7 = 1 that means they match.

However, I looked at the formula and noticed both variables are z, which leads me to believe they both have to be 3. Look for the red in the picture. I guess my question is what the answer is, and why?

• You may let $z^{-1} = x$ and proceed. $z^{-1}$ is different, it is not $\dfrac{1}{z}$. – AgentS Jul 28 '19 at 23:36
• @plagiarism The $z$ values don't have to be the same (and, in this case, are not) in each question. They're just reusing a variable letter. – John Omielan Jul 28 '19 at 23:39
• @rsadhvika $z^{-1}=x$ is a bad idea, because $x$ is used for the modulus in the first equation. – Andreas Blass Jul 28 '19 at 23:47
• Ah I didn't notice that! bad idea agree :) Ty @a – AgentS Jul 28 '19 at 23:52
• The question is so badly worded that I find it hard to believe it came from a maths professor. – TonyK Jul 29 '19 at 0:05

The first line, where you have underlined it in red, is the definition of $$z^{-1}$$. The next two lines are problems you are to do. Your answer of $$5$$ for the first is correct.

$$3^{-1}\cong 5\pmod 7$$ and $$2^{-1}\cong3\pmod 5$$. The first is because $$3\cdot 5=15\cong1\pmod7$$. The second because $$2\cdot3=6\cong1\pmod5$$.

• If my answer to the question is correct (I said it was 5) I do not understand why my professor had two variables with the same letter z, when clearly they hold different numbers?! :'-( – plagiarism Jul 28 '19 at 23:44
• @plagiarism Mira and Mira's husband are two different people. Do you see that? – AgentS Jul 28 '19 at 23:45
• Two different problems. – Chris Custer Jul 28 '19 at 23:46
• Okay. So just to double check, my answer of 5 was correct, and z and z^-1 are two different numbers? – plagiarism Jul 28 '19 at 23:48
• Yes. $z$ and $z^{-1}$ are different; and there are two problems. – Chris Custer Jul 28 '19 at 23:49

The professor gives the general form as

$$z \cdot z^{-1} \equiv 1 \pmod x$$

where $$x,z,z^{-1}$$ are integers.

For the first question,

$$3\cdot z^{-1} \equiv 1 \pmod 7$$

setting

$$z^{-1}=\{5,12,19,26,\dots\}$$

will work. For the second question,

$$2\cdot z^{-1} \equiv 1 \pmod 5$$

setting

$$z^{-1}=\{3,8,13,18,\dots\}$$

will work. There are multiple values to assign for $$z^{-1}$$ depending on the context.

The answer is that the z variables are different numbers, because one z is to the power of negative one.

The answer 5 was also correct for the example question.