First of all, I think that. The most important function of multiplicative inverse is to divide the division into multiplication and then modulo when dividing by a number and then modulo. Because the division, for example, with 16/5 should be 3.2, but the computer will be counted as 3 ... Error is not, with double, not to mention, the number of large there must be errors, so, with the inverse of the yuan ....
If x is present for the number a,c, so that a * X = 1 (mod C), then the x is the multiplicative inverse of a to C. The function of the inverse element. Let's take a look at the following example:
12/4 MoD 7 =? Well, apparently, the result is 3.
We are now on the pair (4,7), we can know X = 2 is 4 to 7 multiplication inverse is 2*4=1 (mod 7)
Then we have (12/4) * (4 * 2) = (?) * (1) (mod 7)
Division is transformed perfectly to multiply
Theory:
f/a mod C =?
If present a*x = 1 (mod C)
So the 2 sides multiply at the same time, get F * X =? (mod C)
Conditions of Incorporation
(1) modulo equation A * X = 1 (mod C) existence solution
(2) A | F (f% A = = 0)
To come down Baidu Encyclopedia:
If Ax=1 MoD F is called a the multiplication inverse of modulo f is x. Can also be expressed as ax≡1 (mod f).
When a and f mutual element, a on the modulo f multiplication inverse has the unique solution. If there is no reciprocity, then there is no solution. If f is prime, then any number from 1 to F-1 is the same as the F-element, i.e. between 1 and f-1 there is a multiplicative inverse of modulo f.
For example, for the multiplication inverse of 5 on modulo 14:
14=5*2+4
5=4+1
Note 5 and 14, the existence of 5 on the multiplication of 14 inverse element.
1=5-4=5-(14-5*2) =5*3-14
Therefore, the multiplication inverse of 5 on modulo 14 is 3.