LINEAR CONGRUENCE
Prepared by:
Asst. Prof. ISRAEL P. PENERO
Course Facilitator
In ordinary algebra, an equation of the form
ax = b (where a and b are given real numbers)
is called a linear equation, and its solution x =
b/a is obtained by multiplying both sides of the
-1
equation by a = 1/a.
On this lecture, you will learn on how to solve then
solution of any linear congruence.
Linear congruences are congruences
with unknowns to the first power. Their
general form is :
ax ≡ b (mod m) .
Theorem. Let d = gcd(a,m), and consider the
equation ax = b (mod m) .
(a) If d does not divides b, there are no solutions.
(b) If d | b, there are exactly d distinct solutions mod
m.
Whenever a linear congruence has
any solutions, it has infinitely many.
The solutions fall into congruence
classes, and there are only a finite
number of congruence classes that
solve the congruence.
Here is the key observation which enables us to solve linear
congruences.
By denition of congruence, ax ≡ b (mod m) if and only if ax - b is
divisible by m. Hence, ax ≡ b (mod m) if and only if ax - b = my, for
some integer y. Rearranging the equation to the equivalent form
ax - my = b (Diophantine equation).
Lemma: Solving the congruence ax ≡ b (mod m) is equivalent to
solving the linear diophantine equation ax - my = b.
Since we already know how to solve linear diophantine
equations, this means we can apply that knowledge to solve linear
congruences.
Example: Tell whether the linear congruence has a solution or
do not have solution.
a) 3x ≡ 7(mod 4).
Here, the linear congruence is in a form of ax ≡ b (mod m).
So a = 3 and m = 4. Now, you need to determine the
gcd(a,m). Solving the greatest common divisor of 3 and 4,
the result would be d = 1. Hence, the gcd(3,4) = 1.
Applying the theorem for linear congruence, we need to
show that d|b. Since 1|7, it has a solution.
Example: Tell whether the linear congruence has a solution or
do not have solution.
b) 6x ≡ 7(mod 8)
Here, the linear congruence is in a form of ax ≡ b (mod m).
So a = 6 and m = 8. Now, you need to determine the
gcd(a,m). Solving the greatest common divisor of 6 and 8,
the result would be d = 2. Hence, the gcd(6,8) = 2.
Applying the theorem for linear congruence, we need to
show that d|b. Since 2 does not divides 7, it has no solution.
Example: Determine the number of solutions in the
following linear congruence:
a) 4x ≡ 41 (mod 111)
Solving for the gcd (4, 111), it is clearly seen
through inspection that the gcd (4, 111) is 1. With
this, there is only one (1) solution for the given
linear congruence.
Example: Determine the number of solutions in the
following linear congruence:
b) 6x ≡ 3 (mod 15)
First, we need to solve for the gcd(6, 15). The gcd
of 6 and 15 is 3. Since d = 3, there are three (3)
exactly distinct (incongruent) solutions for a given
linear congruence.
Example: Determine the number of solutions in the
following linear congruence:
c) 42x ≡ 12 (mod 90)
First, we need to solve for the gcd(42, 90). The
gcd of 42 and 90 is 6. Since d = 6 and 6|12, there
are six (6) exactly distinct (incongruent) solutions
for a given linear congruence.
But how are you going to solve for the solution/s of linear congruence? Here are some examples.
But how are you going to solve for the solution/s of linear congruence? Here are some examples.
But how are you going to solve for the solution/s of linear congruence? Here are some examples.
NAME: _________________________________________ SECTION:___________________
Directions: Tell whether the following linear congruence has a solution or do not
have a solution. If the linear congruence has a solution, solve for the possible
solution/s.
1) 10x ≡ 30(mod 150)
2) 6x ≡ 9(mod 33)
3) 12x ≡ 4(mod 1000)
4) 42x ≡ 12(mod 90)
5) 55x ≡ 35(mod 75)