System of Linear Congruence: M M Ad BC
System of Linear Congruence: M M Ad BC
ax + by ≡ e(mod m)
cx + dy ≡ f (mod m)
x + 2 y ≡ 1(mod 5)
2 x + y ≡ 1(mod 5)
Definition 1: Let A = ( aij ) and B = ( bij ) be n x k matrices with integer entries. Then A is called
congruence to B modulo m if aij ≡ bij (mod m), ∀i, j
Example:
15 3 4 14 4 3
8 12 ≡ −3 1 (mod 11) ≡ −3 1 (mod11) .
Example:
1 3 3 4 1 0 3 4 1 3 1 0
2 4 1 2 ≡ 0 1 (mod 5) and 1 2 2 4 ≡ 0 1 (mod 5)
1
1 3 3 4
We call that is the inverse of 1 2 modulo 5.
2 4
a b
Theorem 2: Let A = be matrix of integers with gcd(∆, m) =
1 , ∆= ad − bc , then
c d
d −b a b
A = ∆ is the inverse of matrix A = with ∆ is the inverse of ∆(mod m) .
−c a c d
Example:
3 4
A= , and ∆= ad − bc= 15 − 8= 7 . We know that 2 is inverse of 7 modulo 13, then
2 5
d −b 5 −4 10 −8 10 5
A=∆ ≡ 2 ≡ ≡ (mod13) .
−c a −2 3 −4 6 9 6
Note:
We can find inverse of a matrix using adjoint matrix or elementary row operation to the
matrix.
Problems:
2
FERMAT AND WILSON THEOREMS
Theorem 1: If gcd(a, m) = 1, then the least residuals modulo m for sequence :
Example 1: Given a = 4 and m = 9 and gcd(4, 9) = 1, then the least residuals modulo 9 for
sequence : 4, 2(4), 3(4), 4(4), 5(4), 6(4), 7(4), 8(4) is a permutation of 1, 2, 3, 4, 5, 6, 7, 8.
Check that 4 ≡ 4 mod 9), 2(4) ≡ 8 (mod 9), 3(4) = 12 ≡ 3 (mod 9), 4(4) = 16 ≡ 7 (mod 9), 5(4) =
20 ≡ 2 (mod 9), 6(4) = 24 ≡ 6 (mod 9), 7(4) = 28 ≡ 1 (mod 9), 8(4) = 32 ≡ 5 (mod 9).
Theorem 2: ( Fermat Theorem) If p is prime integer and gcd (a, p) = 1, then a p −1 ≡ 1(mod p ) .
Theorem 4: If p and q are difference prime integers such that a p ≡ a (mod q ) and
a q ≡ a (mod p ) , then a pq ≡ a (mod pq ) .
2=
10
= 31.33 + 1 ≡ 1(mod 31) , then 211 ≡ 2(mod 31)
1024
2=
10
231 210.3+1 ≡ 2(mod11) .
= 11.93 + 1 ≡ 1(mod11) , then=
1024
Because gcd (2, 341) = 1, then 2340 ≡ 1(mod 341) so the remainder if 2340 is divided by 341 is 1.
3
Theorem 5: If p is prime integer, then the congruence x 2 ≡ 1(mod p ) has exactly two solutions
that are 1 and p-1.
Example 7: Take p= 7, then using Theorem 6, 1−1 = 1 , 2−1 = 4 , 3−1 = 5 , 4−1 = 2 , 5−1 = 3 , 6−1 = 6 .
Theorem 9: If p is odd prime integer, then the congruence x 2 + 1 ≡ 0(mod p ) has solution if and
only if p ≡ 1(mod 4) .
If p is odd prime integer and the congruence x 2 + 1 ≡ 0(mod p ) has solution , then the solutions
p −1 p −1
is ! (mod p) and p − 2 ! (mod p ) .
2
Answer: because 17 ≡ 1(mod 4) , then the congruence has solution and the solutions are
17 − 1
! = 8! = 13 (mod 17) and 17-13 = 4 (mod 17).
2
4
Discussions:
11. If a and b are integers that are not divisible by prime p, prove that if a p ≡ b p (mod p ) , then
a ≡ b(mod p ) .