Congruence Classes and Modular Arithmetic
Congruence Class
For
A congruence class has more than one representation. From the example above,
Modular Arithmetic
We define
and define two operations on
There operations are well-defined. For example, in
Modular Arithmetic Theorem (MAT)
For all integers
has a solution if and only if
Moreover, when
where
(See divisibility, GCD)
From congruence add and multiply,
in
Hence the solutions to the equation
By comparing the proofs of the linear congurence theorem and Modular Arithmetic Theorem, we can see that to find solutions to the equation
Inverses in (INV )
Let
Moreover, when
Inverses in (INV )
For all prime numbers
Examples
If possible, find the multiplicative inverse of
Since
If possible, find the multiplicative inverse of
Since
To find the inverse, we consider the corresponding linear Diophantine equation
Using the EEA, we obtain:
EA | |||||
---|---|---|---|---|---|
So
solve the following system of equations in
First, subtract
Since
Since 11 is prime, and
Multiplying both sides of the equation by
Subbing
But
To make sure this equation isn't extraneous, substitute the values back into equations (1) and (2) to make sure they work out.