Congruence (number theory)
In number theory, congruence is a relationship between whole numbers . They call two integers and congruent modulo (= another number), when used in the division by both the same rest have. This is precisely the case when they differ by an integral multiple of . However, if the remainders do not match, the numbers are called incongruent modulo . Every congruence modulo an integer is a congruence relation on the ring of integers.
Examples
example 1
For example, 5 is congruent 11 modulo 3, da and , the two remainders (2) are therefore the same, or da , the difference is therefore an integer multiple (2) of 3.
Example 2
In contrast, 5 is incongruent 11 modulo 4, da and ; the two remains are not the same here.
Example 3
And −8 is congruent to 10 modulo 6, because when dividing by 6, both 10 and −8 produce the remainder 4. Note that the mathematical definition of the integer division is based, according to which the remainder has the same sign as the divisor (here 6) receives, so .
Notation
The following notations are used for the statement " and are congruent modulo ":
These spellings can be used as a short form of the statement (equivalent to the above statement) "remainder of division of through is equal to remainder of division of through ", ie of
 ,
(where in the lastmentioned equation is the mathematical modulo function that determines the remainder of an integer division, in this case the remainder of or ; with the mathematical modulo function, the result, i.e. the remainder, always has the same sign as ).
history
The theory of congruences was developed by Carl Friedrich Gauß in his work " Disquisitiones Arithmeticae " published in 1801 . The term congruence was used by Christian Goldbach as early as 1730 in letters to Leonhard Euler , but without the theoretical depth of Gauss. In contrast to Gauss, Goldbach used the symbol and not . The Chinese mathematician Qin Jiushao (秦九韶) was also familiar with congruences and the accompanying theory, as can be seen in his book “ Shushu Jiuzhang ” ( Chinese 數 書 九章 / 数 书 九章 , Pinyin Shùshū Jiǔzhāng  “Mathematical treatise in nine chapters” published in 1247 ) “).
Formal definition
In number theory, congruence is reduced to a divisibility statement . In addition , and integers, i.e. H. Elements from .
 Two numbers and are called congruent modulo if the difference divides.
 Two numbers and are called incongruent modulo if the difference does not divide.
Using mathematical notation, these two statements can be written as follows:
Residual classes
A congruence relation is a special equivalence relation . So it has the following properties:
 Reflexivity
 for all
 symmetry
 for all
 Transitivity
 and for everyone
The equivalence classes of the congruence relation are called residual classes . If one also wants to specify, one speaks of residual classes . A remainder class that contains the element is often referred to as.
Like every equivalence relation, a congruence relation defines a partition of its support set: The remainder classes of two elements are either equal or disjoint , the former if and only if the elements are congruent:
 .
Equipped with the links induced by the residue classes form a ring , the socalled residue class ring . He is designated for with .
 comment
 Since a division by has not yet occurred, one can allow for the formal definition (in the previous section) as well as for the equivalence relation (in this section) .
 Since there are no real zero divisors in the ring , the relation degenerates to the trivial case, to equality:
 for everyone .
 The unitary ring of the characteristic is isomorphic to . This property is also needed in the event . Then is . This ring is not viewed as a residual class ring in the narrower sense.
 The interesting cases are the cases that can be taken as the standard .
 The remainder class ring is the null ring , which consists of only one element.
Is not trivial, so then are in a residue class all the numbers that have the same remainder when dividing by exhibit. Then the absolute value of , that is , corresponds to the number of remainder classes. For example, there are two remainder classes of even and odd numbers for 2 .
Calculation rules
Below are , , , , and whole numbers. Be there , and . Then the following calculation rules apply:
If there is a polynomial over the whole numbers, then:
Shortening is also possible if there are congruences . However, other abbreviation rules apply to those used for rational or real numbers ( ... greatest common factor ):
It follows immediately that  if a prime number and this is not a divisor of  the following applies:
If is a composite number or a factor of , only:
For every divisor of it follows that .
If integers are not equal to zero and their lowest common multiple , then:
 for all
Potencies
If it is a natural number , then:
Are and coprime , then according to Euler's theorem
 ,
wherein the Euler's φ function referred to. It also follows from this
 if .
A special case of this is the little Fermat's theorem , hence congruence for all prime numbers
is satisfied.
Derived calculation rules
 The following applies to:
 If is a factor of , then:
 For every odd number :
 Either or or applies to every integer .
 For every whole number :
 Either or or applies to every integer .
 Either or applies to every integer .
 If both a square number and a cube number (e.g. ) then either or or or applies .
 Let be a prime number with . Then:
 Let be an odd integer. Further be . Then:
 Be . Furthermore, let and be prime twins . Then:
Solvability of linear congruences
Linear congruence
A linear congruence of shape
is solvable in if and only if the number divides. In this case the congruence has exactly solutions in , and the solutions are congruent to each other modulo .
The solutions can also be efficiently determined for large ones by applying the extended Euclidean algorithm to and , which also calculates two numbers and , which express as a linear combination of and :
One then receives a solution with , and the other solutions differ from by a multiple of .
Example: is solvable, because divides the number , and there are solutions in the area . The extended Euclidean algorithm gives what the solution is. The solutions are congruent modulo . The solution set for is thus .
Simultaneous congruence
A simultaneous congruence like
can certainly be solved if:
 for all is through divisible d. H. every congruence is solvable for itself, and
 which are pairwise mutually prime .
The proof of the Chinese remainder theorem provides the solution for such simultaneous congruences.
Relationship to the modulo function
General
With , generally applies:
programming
Are two numbers and congruent modulo a number , resulting from the division by the same rest .
With the help of the "symmetrical variant" of the modulo function , which is particularly widespread in computer science and is often referred to in programming languages with the modulo operators mod
or %
, this can be written as follows:

(a mod m) = (b mod m)
or.(a % m) = (b % m)
Note that with the symmetrical modulo function common in computer science, this is only true for positive and positive . So that the equation is actually for all and equivalent to congruence, one has to through
Use a defined mathematical modulo function , the result of which always has the same sign as ( is the Gaussian bracket ). With this definition, for example .
Applications
Congruences or remainder classes are often helpful when you have to perform calculations with very large numbers.
An important statement about congruence of prime numbers is Fermat's little theorem or Fermat's prime number test .
See also
 Chinese remainder
 Linear congruence
 Polynomial congruence
 Simultaneous congruence
 Module (mathematics)
Web links
 Christian Spannagel : Congruences and residual classes . Lecture series, 2012.
swell
 ↑ Peter Bundschuh : Introduction to Number Theory. 5th edition. Springer, Berlin 2002, ISBN 3540435794
 ^ Song Y. Yan: Number theory for computing. 2nd Edition. Springer, 2002, ISBN 3540430725 , pp. 111117