Modulus

Modulusn
is an option that can be given in certain algebraic functions to specify that integers should be treated modulo n.

DetailsDetails

  • Modulus appears as an option in Solve, Reduce, Factor, PolynomialGCD, and PolynomialLCM, as well as in linear algebra functions such as Inverse, LinearSolve, and Det.
  • Arithmetic is usually done over the full ring of integers; setting the option Modulus specifies that arithmetic should instead be done in the finite ring .
  • The setting Modulus->0 specifies the full ring of integers.
  • Some functions require that Modulus be set to a prime, or a power of a prime. is a finite field when is prime.
  • Equations for Modulus can be given in Eliminate and related functions.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Solve equations:

In[1]:=
Click for copyable input
Out[1]=

Factor polynomials:

In[2]:=
Click for copyable input
Out[2]=

Compute inverse:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 1988
(1.0)