What is #4^(-1)%15#?

2 Answers
Jun 18, 2017

4

Explanation:

The modular inverse #A^-1# of a number #A (mod b)# is the integer between 0 and #b-1# such that satisfies the equality

#A * A^-1 (mod b) = 1#

For this particular case, we have:

#4 * x (mod 15) = 1#

This means that:

#4x = 1 + 15n# for some integer #n#

If we let n = 1, we see that:

#4x = 1 + 15(1)#

#4x = 16#

#x=4#

So we can say that 4 is its own inverse, mod 15.

Final Answer

Jun 18, 2017

I assume that you mean #(4%15)^(-1)#, rather than #(4^(-1))%15#.

Well, normally, if we take #a % b#, then we get the remainder of dividing #a# by #b#. For instance, #4 mod 3 = 1#, because #3# divides once into #4# with a remainder of #1#.

But if #b > a#, we have that #a % b# returns #a#. Thus, this is the same as taking the inverse of #4#. Any number can be treated as a #1xx1# matrix.

We necessarily have that a #1xx1# inverse is just the reciprocal:

#[4] cdot [4]^(-1) = [1]#,

or that #color(blue)((4%15)^(-1)) = (4)^(-1) = color(blue)(1/4)#, as seen here.


If in fact you mean the inverse of #4#, subsequently mod #15#, then we are saying

#(4^(-1))%15 = 4#

as seen here and in John D.'s answer.