Wolfram Researchmathworld.wolfram.comOther Wolfram Sites
Search Site

INDEX
Algebra
Applied Mathematics
Calculus and Analysis
Discrete Mathematics
Foundations of Mathematics
Geometry
History and Terminology
Number Theory
Probability and Statistics
Recreational Mathematics
Topology
Alphabetical Index

ABOUT THIS SITE
About MathWorld
About the Author
Terms of Use

DESTINATIONS
What's New
Headline News (RSS)
Random Entry
Animations
Live 3D Graphics

CONTACT
Email Comments
Contribute!
Sign the Guestbook

MATHWORLD - IN PRINT
Order book from Amazon

Modular Inverse

download Mathematica trial versionModularInverse.nb

Portions of this entry contributed by Reid Nichol

A modular inverse of an integer b (modulo m) is the integer such that


A modular inverse can be computed in Mathematica using PowerMod[b, -1, m].

Every nonzero integer b has an inverse (modulo p) for p a prime and b not a multiple of p. For example, the modular inverses of 1, 2, 3, and 4 (mod 5) are 1, 3, 2, and 4.

If m is not prime, then not every nonzero integer b has a modular inverse. For example, (mod 4) and (mod 4), but 2 does not have a modular inverse.

The triangle above (Sloane's A102057) gives modular inverses of b (mod m) for b = 1, 2, ..., and m = 2, 3, .... 0 indicates that no modular inverse exists.

Congruence, Congruence Equation, Linear Congruence Equation

Links search




References

Sloane, N. J. A. Sequences A102057 in "The On-Line Encyclopedia of Integer Sequences." http://www.research.att.com/~njas/sequences/.




cite this as

Eric W. Weisstein et al. "Modular Inverse." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/ModularInverse.html



header
mathematica calculationcenter