0% found this document useful (0 votes)
18 views34 pages

Number Theory Prof Asghar Ali

Number thoery

Uploaded by

Muhammad Ramzan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views34 pages

Number Theory Prof Asghar Ali

Number thoery

Uploaded by

Muhammad Ramzan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Number Theory

Notes for B.Sc

By Prof. Asghar Ali

Available at MathCity.org
Number Theory
Divisibility
Divisibility:
Let „a‟ and „b‟ be any two integers. We say that „a‟ divides „b‟ or „b‟ is divisible by „a‟ denoted
by a|b. when there exist integer „c‟ such that b = ca. If a does not divides b then a∤b.

Perfect Number:
A number is said to be a perfect number if it is equal to the sum of its all +ve integral divisors.
i.e 6|1 , 6|2 , 6|3 without itself 1+2+3=6

Theorem: let a,b and c be integers, then

(1) If a|b, then a|kb, for any integer k


If a|b, then ∃ integer k1 s.t b=ak1..... (1) multiplying equation (1) by integer k
kb=ak k1, where k1,k Є Z, so kk1 = k2 Є Z
kb=ak2 → a|bk

(2) If a|b, and b|a, then a=±b


If a|b, b|a, then ∃ integer k1, k2 s.t
b= k1a..... (1) a= k2b.... (2) use (2) in (1)
b= k1 k2 b, k1 k2=1, which is only possible
when both k1=1, k2=1 or k1 =-1, k2=-1 use in (1) and (2)
b = a..... (3), a= - b....... (4)
combine (3), and (4) a=±b

(3) For any non-zero integer k, a|b iff ka|kb


If a|b then ∃ integer k1 s.t
b= k1a multiplying by k
bk=ka(k1) → ka|bk
conversely
ka|bk, so ∃ integer k2 s.t
bk= k2(ka) cancel out k
b= k2a → a|b

Proposition
Let a,b,c be the integers then prove the following axioms.
(1)
 a|0
0 = 0.a where 0,a be the integers. So a|0
 1|a
Since a = 1.a 1, a be the integer. So 1|a
 -1|a
Since a = - (-1)(a) → -1|a -1, a be integers. So -1|a

2 Available at MathCity.org Prof. Asghar Ali


(2) If a|b and b|c then a|c.
As a|b so there exist an integer 𝑘1 s.t b = 𝑘1 a ………. (1)
Similarly if b|c there exist an integer 𝑘2 s.t c = 𝑘2 b………...(2)
c = 𝑘1 𝑘2 a using (1) 𝑘1 , 𝑘2 ∈ 𝑍, so we take 𝑘1 𝑘2 = 𝑘
c = ka → a|c.

(3) If a|b and a|c then a|bx+cy for every integer x or y.


If a|b then Ǝ an integer 𝑘1 s.t b = 𝑘1 a ………….(1)
if a|c then Ǝ an integer 𝑘2 s.t c = 𝑘2 a…………..(2)
then bx+cy = a𝑘1 x + a𝑘2 y
= a (𝑘1 x + 𝑘2 y) as 𝑘1 , 𝑘2 , x, y∈ 𝑍 ,Let 𝑘1 x + 𝑘2 y = k Є Z
bx +cy = ak
→ a|bx + cy

Assignment: If a|b and a|c then a|b + c and a|b - c.


Proof:
If a|b so Ǝ an integer 𝑘1 s.t b = 𝑘1 a ……….. (1)
if a|c so Ǝ an integer 𝑘2 s.t c = 𝑘2 a ………. .(2) (1) + (2)
b + c = 𝑘1 a + 𝑘2 a
= a(𝑘1 + 𝑘2 ) 𝑘1 , 𝑘2 Є Z ,𝑘1 + 𝑘2 = k Є Z
b + c = ak
→ a|b + c
Now (1) - (2)
b - c = 𝑘1 a - 𝑘2 a
= a(𝑘1 -𝑘2 ) 𝑘1 , 𝑘2 Є Z , 𝑘1 - 𝑘2 = k Є Z
b - c = ka → a|b – c Hence prove.

Division Algorithm

a = qd + r
a = 26, q = 8, d = 3, r = 2
26 = (8)(3) + (2)
26 = 26

Division Algorithm. Given integers a and b, with b>0, there exist unique integers q and r satisfying
𝑎 = 𝑞𝑏 + 𝑟 0≤𝑟<𝑏
The integers q and r are called,respectively,the quotient and remainder in the division of a by b.
Proof. We begin by proving that the set
𝑆 = 𝑎 − 𝑥𝑏 𝑥 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟; 𝑎 − 𝑥𝑏 ≥ 0
is non empty. To do this, it suffices to exhibit a value of 𝑥 making 𝑎 − 𝑥𝑏 nonnegative. Because the
integers 𝑏 ≥ 1, we have 𝑎 𝑏 ≥ 𝑎 , and so
𝑎 − (−1 𝑎 )𝑏 = 𝑎 + 𝑎 𝑏 ≥ 𝑎 + 𝑎 ≥ 0
For the choice 𝑥 = − 𝑎 , then, 𝑎 − 𝑥𝑏 lies 𝑆. This paves the way for an application of the well-
ordering principle, from which we infer that the set S contains a smallest integers; call it r. By the
definition of S, there exists an integers q satisfying
𝑟 = 𝑎 − 𝑞𝑏 0≤𝑟
We argue that 𝑟 < 𝑏. If this were not the case then 𝑟 ≥ 𝑏 and

3 Prof. Asghar Ali


𝑎 − 𝑞 + 1 𝑏 = 𝑎 − 𝑞𝑏 − 𝑏 = 𝑟 − 𝑏 ≥ 0
The implication is that the integers 𝑎 − 𝑞 + 1 𝑏 has the proper form to belong to the set 𝑆. But
𝑎 − 𝑞 + 1 𝑏 = 𝑟 − 𝑏 < 𝑟, leading to a contradiction of the choice of r as the smallest member of 𝑆.
Hence, 𝑟 < 𝑏.
Next we turn to the task of showing the uniqueness of q and r. Suppose that a has two representations of
the desired form, say,
𝑎 = 𝑞𝑏 + 𝑟 = 𝑞 ′ 𝑏 + 𝑟 ′
Where 0 ≤ 𝑟 < 𝑏, 0 ≤ 𝑟 ′ < 𝑏. 𝑡ℎ𝑒𝑛 𝑟 ′ − 𝑟 = 𝑏(𝑞 − 𝑞 ′ ) and, owing to the fact that the absolute value of
a product is equal to the product of the absolute values,
𝑟 ′ − 𝑟 = 𝑏 𝑞 − 𝑞′
Upon adding the two inequalities −𝑏 < −𝑟 ≤ 0 𝑎𝑛𝑑 0 ≤ 𝑟 ′ < 𝑏, we obtain
−𝑏 < 𝑟 ′ − 𝑟 < 𝑏 or,in equivalent terms, 𝑟 ′ − 𝑟 < 𝑏. thus, 𝑏 𝑞 − 𝑞′ < 𝑏, which yeilds
0 ≤ 𝑞 − 𝑞′ < 1
Because 𝑞 − 𝑞′ is a nonnegative integers, the only possibility is that 𝑞 − 𝑞′ = 0, where 𝑞 = 𝑞 ′ ; this,in
turn, gives 𝑟 = 𝑟 ′ , ending the proof.

Mathmatical Induction
It is a method which is often used to prove the divisibility based result. It is most powerful tool
to prove the result in exponent form. To prove the result with the help of mathematical induction, we
have to follow the following steps:

 First , we will check the result at n = 1


 In the second step , we suppose that the result is true for n = k
 Now with the help of above supposition, we have to prove that the result is true for n = k+1
Remark :
If a result fulfilled the above three steps, then that result is true mathematically.

Quesion: Show that: a - b|𝒂𝒏 - 𝒃𝒏 ∀ a,b Є Z, n is +ve


Proof: we prove the result by induction method.

Step 1:
Let n = 1 then,a - b | a1 – b1 ……………(1) which is true for n=1.

Step 2:
Now we suppose it is true for n = k → a - b|ak – bk ………(2)
Step 3:
Now we want to prove that for n = k + 1 is also satisfy a - b|ak+1 – bk+1
ak+1-bk+1 = aak – bbk
=aak – akb – bbk + akb +ing and –ing akb
=ak(a – b ) + b( ak – bk )
From eq (1) a – b | a – b and a – b | ak – bk by hypothesis
and we know that, If a|b and a|c then a|bx + cy ∀ x,y Є Z
Hence a – b |ak(a - b) + b(ak – bk) = ak+1 – bk+1
→a - b | ak+1 – bk+1
So a - b | an – bn ∀ a,b Є Z, by mathematical induction.

4 Prof. Asghar Ali


Question : if n is odd , prove that a + b | an + bn ∀ a,b Є Z.
Proof :
We will prove above result by induction method.
Let n = 1 then a + b|a1 + b1 ………..(1) which is true for n=1.
Now suppose that above result is true for n = k (k is odd)
→ a + b|ak + bk …………..(2)
Now we have to prove that the result is true for n = k + 2(k is odd) → a + b|ak+2 + bk+2
ak+2 + bk+2 = aka2 + bkb2 + akb2 - akb2 +ing and –ing akb2
k 2 k 2 k 2 k 2
=a a -a b +b b +a b
= ak(a2 – b2) + b2(ak + bk)
Since a + b|a2 – b2 also a + b|ak + bk by hypothesis.
And we know that if a|b , a|c then a|bx + cy ∀ x,y Є Z
Hence a + b | ak+2 + bk+2 = ak(a2 – b2) + b2(ak + bk)
→ the result is true for n = k + 2 & ∀ n by mathematical induction.

Question : Prove that the product of any three consecutive integers is divisible by 6.
Proof:
Let n, n+1, n+2 be three consecutive integers. Then product of three consecutive integer is
n (n + 1) (n + 2)
Now we have to prove that 6|n (n + 1) (n + 2) ……………(1).We prove it by induction method.

Step 1:
Put n=1
Then 6|1 (1 + 1) (1 + 2) = 6 → 6|6 so it is true for n=1.

Step 2:
Now we suppose that the result is true for n=k
→ 6|k (k + 1) (k + 2)…………….. (2)
Now we prove it that the result is true for n = k + 1
n (n + 1) (n + 2) = (k + 1) (k + 2) (k + 3) = k (k + 1) (k + 2) + 3 (k + 1) (k + 2)
By hypothesis factor k (k + 1) (k + 2) is divisible by 6 i.e 6| k (k + 1) (k + 2) .
Now we show that 6|3 (k + 1) (k + 2)
Here we have two cases.
1st : If k is even say k = 2m, m is integer then
6|3 (2m + 1) (2m + 2)
6|6 (2m + 1) (m + 1) which is true
2nd: If k is odd say k = 2m + 1, m is integer then
6|3 (2m + 1 + 1) (2m + 1 + 2) = 3 (2m + 2) (2m + 3)
6|6 (m+1) (2m+3) which is true.
We know that if a|b and a|c then a|bx + cy ∀ x , y Є Z
So 6|k (k + 1) (k + 2) + 3 (k + 2) (k + 3) = (k + 1) (k + 2) (k + 3) = n (n + 1) (n + 2)
→ 6|k (k + 1) (k + 2) (k + 3)
Hence It is proved that product of three consecutive integer is divisible by 6.

5 Prof. Asghar Ali


Question : Prove that if n is +ve even integer then a + b|an – bn.
Proof:
We prove it by mathematical induction.

Step 1:
Put n=2 because n is +ve even .
→ a + b | a2 – b2 ……….. (1)
→ a + b | (a + b) (a - b) which is tue for n=2.

Step 2:
Now we suppose that the result is true for n = 2k because n is even. k is integer
→ a + b | a2k - b2k ……….(2)
Now we have to prove that the result is true for n=2k+2 because n is +ve even.
→ a + b | a2k+2 – b2k+2
an – bn = a2k+2- b2k+2
= a2ka2 - b2kb2 - a2kb2 + a2kb2 +ing and –ing a2k b2
= a2ka2-a2kb2+a2kb2-b2kb2
= a2k(a2-b2) + b2(a2k-b2k)
Fom eq (1) a + b | a2 - b2 and by hypothesis a + b| a2k - b2k
So we know that if a|b and a|c then a| bx+cy for every integers x, y
So a + b | a2k(a2 - b2) + b2(a2k - b2k) = a2k+2 - b2k+2
Hence it is prove that if n is +ve even integer then a + b |an - bn .

Example : Show that ∀ n (>0) Є Z, 24 |2.7n + 3.5n-5


Proof :
We prove it by M.I

Step 1:
Put n = 1
24 | 2.7 + 3.51 – 5 = 2.7 + 3.5 – 5 = 24
1
→24|24 which is true.

Step 2:
Now we suppose that result is true for n = k then,
24 |2.7 + 3.5k - 5 …………..(1)
k

Step 3:
Now we show that result is true for n = k + 1
2.7 k+1
+ 3.5k + 1 – 5= 2.77k + 3.55k - 5
= 14.7k+ 15.5k - 5
= 2.7k + 12.7k + 3.5k + 12.5k - 5
= (2.7k + 3.5k - 5) +12.7k + 12.5k
= (2.7k + 3.5k - 5) + 12(7k + 5k)
By hypothesis 24 | 2.7k + 3.5k – 5. Now we will prove that 24 |12(7k + 5k)
Since 7 and 5 are odd and sum of two odd numbers is even , so the sum of 5k and 7k is even number.
k k

So, 24 | 12 (5k + 7k)


Thus 24 | (2.7k + 3.5k - 5) + 12(5k + 7k)
we know that if a|b and a|c then a| bx+cy for every integers x, y
Hence, It is proved that ∀ n (>0) Є Z, 24 | 2.7n + 3.5n - 5.

6 Prof. Asghar Ali


Assignment: Show that ∀ n (>0) Є Z, 9|10 n +3.4n+2+5.
Proof: ( do yourself ).
Theorem:Every odd integer can be written in the form of 4k + 1 or 4k + 3, 4n + 1or 4n – 1.
Proof :
Let a be an odd integer . We want to write in the form of 4n+1 or 4n-1
We prove it by division algorithm method. As a is an odd integer. Let d = 4 then Ǝ unique integer “n”
and “r” s.t
a = 4n + r 0 ≤ r < d. as d=4 so r=0,1,2,3
if r = 0 , then ,
a = 4n …………..(1)
if r = 1,2,3 ,then ,
a = 4n + 1 ………(2)
a = 4n + 2 ………(3)
a = 4n + 3 ………(4)
where a=4n , a = 4n + 2 , both are even numbers .
but we given that a is odd so we take a = 4n + 1 , a = 4n + 3 ,i.e , 4n - 1
Hence , Every odd integer can be written in the form 4n + 1 or 4n - 3.

G.C.D ( Greatest Common Divisor )or (H.C.F)


Definition:
A +ve integer d is called G.C.D of „a‟ and „b‟ if the following are holds
 d≥0
 d|a and d|b
 if some other integer c exists s.t c|a and c|b , then c|d or c ≤ d
gcd of a, b is denoted such as gcd(a, b)=d or simply we can write (a, b)=d

Example: Find gcd(24 , 16) find prime factors of 24 and 16


24 = (2) (2) (2) (3)
16 = (2) (2) (2) (2)
gcd (24 , 16) = (2) (2) (2)
gcd (24 , 16) = 8

Question : if c is a common divisor of a, b then c|(a, b) .also prove that d is unique.


Proof :
Let (a, b)=d, then there exists some integers x, y s.t ax+by=d………….(1)
Since c|a and c|b
We know If a|b and a|c then a|bx+cy for every integer x or y
So c|ax+by→ c|d from (1)
Now we will prove that gcd of a, b is unique. For this suppose d1, d2 be two gcd‟s of a, b
Then d1≤ d2 as d1 is common divisor and d2 is a gcd. Similarly d2≤ d1 as d2 is common divisor and d1
is a gcd. So that d1= d2.

Theorem: If d = gcd(a , b) then „d‟ can be expressed as a linear combination of „a‟ and „b‟
i.e d = ax + by: where x, y are some integers and a, b not both of which are zero.
Proof :
Let „S‟ be set defined as S = {au+bv |au+bv > 0 ,u,v ∈ Z}
1st we will prove that „S‟ is non-empty set.
7 Prof. Asghar Ali
Let b=0 then
|a| = au+b(0) choosing u = 1
|a| = a(1) ∈ S
If u = -1 then „a‟ is (-a)
→ |a| = (-a) (-1) ∈ S So „S‟ is non-empty.
{By using well order principle WELL ORDERING PRINCIPLE that Every non – empty set S of Non –
negative integer contains a least element that is there is some integer a in S s.t a ≤ b, ∀ b ∈ S}
So S has least element say „d‟.
Then for some integer x,y we have
d = ax+by ………..(1)
we have to prove that gcd (a,b) = d.
by using division algorithm . Ǝ unique integers q & r s.t
a = qd+r ………….(2) where 0 ≤ r < d.
a = q (ax+by) + r from (1)
a = aqx + qby +r
a-aqx-qby = r
a(1-qx) + b(-qy) = r ……(3) ∵ 1,q,x,y ∈ Z ,(1-qx) , (-qy) are also integers.
Let 1-qx = t , -qy = m put in (3)
Then at+bm = r
→ at + bm ∈ S → r ∈ S.
If r is the +ve integer r ≠ 0 .Then 0 < r < d. → r ∈ S this shows r is the least element of S. But we
consider „d‟ is also least element so we take r = 0 then eq (2) becomes
a = qd+0, a = qd → d|a
similarly we can show that d|b.
now we will prove „d‟ is gcd of a and b for this let „c‟ be another common divisor of a,b
→ c|a , c|b
we know that if a|b and a|c then a| bx+cy for every integers x, y.
so c|ax+by ; x,y ∈ Z
c|d from eq (1)
→ |c| ≤ |d|
Hence „d‟ is the gcd of a,b So gcd (a,b) = ax+by.

Assignment : Find gcd also write it as linear combination

(1) gcd (49,105)


105 = 2×49+7 → 105 - 2×49 = 7
49 = 7×7 +0 → 49 - 7×7 = 0 gcd (49,105) = 7
7 = 105 - 2×49 =1×105 + (-2) ×49
Where x = 1 , y = -2 and a=49, b=105

(2) Find gcd and write it as linear combination form (321 , -86)
Take a=321, b=86 we ignore minus sign when find gcd
321= 3×86 + 63 → 321 - 3×86 = 63
86 = 1×63 + 23 → 86 - 1×63 = 23
63 = 2×23 + 17 → 63 - 2×23 = 17
23 = 1×17 + 6 → 23 - 1×17 = 6
17 = 2×6 + 5 → 17 - 2×6 = 5
6 = 1×5 + 1 → 6 - 1×5 = 1
5 = 5×1 + 0 → 5 - 5×1 = 0
8 Prof. Asghar Ali
1 = 6-1×5
1 = 6+(-1) ×5
1 = 6+(-1)(17-2×6)
1 = 1×6+(-1) ×17+2×6
1 = -1×17+3×6
1 = -1×17+3×{23-1×17}
1 = -1×17+3×23-3×17
1 = 3×23-4×17
1 = 3×23-4×{63-2×23}
1 = 3×23-4×63+8×23
1 = -4×63+11×23
1 = -4×63+11×{86-1×63}
1 = -4×63+11×86-11×63
1 = 11×86-15×63
1 = 11×86-15×{321-3×86}
1 = 11×86-15×321+45×86
1 = -15×321+56×86 x = -15 , y = 56

(3) Find gcd (420 , 531)


531 = 1×420+111 → 531-1×420 = 111
420 = 3×111+ 87 → 420-3×111 = 87
111 = 1×87 + 24 → 111-1×87 = 24
87 = 3×24 + 15 → 87-3×24 = 15
24 = 1×15 + 9 → 24-1×5 = 9
15 = 1×9 + 6 → 15-1×9 = 6
9 = 1×6 + 3 → 9-1×6 = 3
6 = 2×3+0 → 6-2×3 = 0 so
gcd (420 , 531) = 3 Now we write as a linear combination
3 = 9-1×6
3 = 9+(-1) ×6
3 = 9+(-1) ×{15-1×9}
3 = 9-1 ×15+1×9
3 = -1×15+2×9
3 = -1×15+2×{24-1×15}
3 = -1×15+2×24-2×15
3 = 2×24-3×15
3 = 2×24-3×{87-3×24}
3 = 2×24-3×87+9×24
3 = -3×87+11×24
3 = -3×87+11×{111-1×87}
3 = -3×87+11×111-11×87
3 = 11×111-14×87
3 = 11×111-14×{420-3×111}
3 = 11×111-14×420+42×111
3 = -14×420+53×111
3 = -14×420+53×{531-1×420}
3 = -14×420+53×531-53×420
3 = 53×531+(-67)×420 → x = -67 , y = 53

9 Prof. Asghar Ali


𝒂 𝒃
Theorem: If gcd (a,b) = d then prove that: ( , 𝒅) = 1
𝒅
Proof :
Since gcd (a,b) = d → d|a , d|b So Ǝ for some integer k1 , k2 repectivly s.t
a = k1d b = k2d
𝑎 𝑏
𝑑
=k1……..(1) 𝑑
=k2……..(2)
let „c‟ be the common divisor of „k1‟ and „k2‟ i.e c|k1 and c|k2 then Ǝ some integer r,s s.t
k1 = cr and k2 = cs using the values of k1 and k2 in eq (1) and (2)
𝑎
=cr→ a = d(cr) cr is integer
𝑑
𝑏
=cs→ b = d(cs) cs is integer
𝑑
→ dc |a and dc |b this shows that dc is common divisor of a,b , but gcd (a,b) = d
so dc|d which is only possible if c = ±1 but „c‟ and „d‟ both +ve. So c=1
𝑎 𝑏
→ (k1,k2) = 1 From (1) and (2) Hence prove ( 𝑑 , 𝑑 ) = 1.

Theorem: Let „a‟ and „b‟ integers , not both zero then „a‟ and „b‟ relatively prime if and
only if there exist integers „x‟ and „y‟ s.t 1 = ax+by.
Proof :
Since„a‟ and „b‟ are relatively prime so gcd (a,b) = 1Then by using the result,
Ǝ for some integer „x‟ and „y‟ s.t 1 = ax+by ∵ gcd(a, b)=d=ax+by for some integers
Conversely ,
Let 1 = ax+by ………(1)
We have to prove that gcd (a,b) = 1.For this we suppose gcd (a,b) = d.We have to prove that d = 1
As gcd (a,b) = d → d|a and d|b
Then d|ax+by ∀ x,y ∈ Z
d|1 from (1) Which is only possible if d = 1 So gcd (a,b) = 1.

Question : if a|c and b|c with gcd (a,b) = 1 then ab|c.


Proof :
Since a|c and b|c then Ǝ some integer t, r s.t
c = ta ……… (1) and c = sb ……… (2)
Since gcd (a,b) =1
ax+by = 1 ………. (3) ∀ x,y ∈ Z × ing eq (3) by „c‟
c = acx + bcy
c = a(sb)x + b(ta)y from (1) and (2)
c = absx + abty
c = ab(sx + ty)……..(4) x,y,t,s are integers. so sx + ty is also integers,
let sx + ty = v ∈ Z put in (4) c = ab.v
→ ab|c

Euclid‟s Lemma: If a|bc with gcd (a,b) = 1 then a|c.


Proof:
Since a|bc so Ǝ integer „k‟ s.t bc = ka …….(1)
since gcd (a,b) = 1 so, there exist integers „x‟ and „y‟ s.t
ax+by = 1 ……….. (2) × ing eq (2) by „c‟
acx +bcy = c
acx + aky = c fron eq (1)
c = a(cx+ky) since c,k,x,y ∈ Z so, cx + ky = t ∈ Z

10 Prof. Asghar Ali


c = at → a|c

Question : If gcd(a,b)=1 then gcd (a-b, a+b)= 1 or 2


Proof:
Let gcd(a-b, a+b)=d. We have to prove d=1 or 2
By the definition of gcd d|a-b and d|a+b
if a|b, a|c then a|a+b or a|b-c
 d|a-b + a+b & d|a-b-a-b
d|2a & d|-2b or d|2b
∴ gcd(a,b)=1 ax+by=1…….(1) for some integers x, y ×ing eq (1) by 2
2ax+2by=2……(2)
As d|2a & d|2b so there exist some integers x, y such that
d|2ax+2by from (2) d|2 so which is true for d=1, or 2

Question : Let a,b and c be integers, then ( ca, cb)=c(a, b), for any positive integers c.
Solution:
Let (a,b)=d, then ∃ some integers x,y s.t
ax+by=d....... (1) multiplying it by c
acx+bcy= dc → (ac,bc)=c(a,b)

Theorem : Let a,b an c be integers if (a,b)=1, (a,c)=1, then (a,bc)=1


Solution:
If (a,b)=1, ∃ some integers x, y s.t ax+by=1
If (a,c)=1, ∃ some integers u, v s.t au+cv=1
by=1-ax.......... (1) cv=1-av......... (2) multiplying (1) and (2)
by cv = (1-ax)(1-au)
bc(yv)=1-au-ax+a2xu
=1-a(u+x-axu) as y, v, u, x, a ∈ Z, so, y v = t ϵ Z, u+x – axu = s ∈ Z
bct=1-as → as+bct=1→ (a,bc)=1

Least Common Multiples(L.C.M)

Let a,b be two integers not both are zero. Then an integer m is called Least Common Multiple of a,b if
 a|m, b|m
 If there exist an integer c such that a|c, b|c then m ≤ c or m|c . L.C.M of a,b is denoted by
<a, b>=m
Example:Take a= 8, b=12 , m =24, 48,72,96 then <8, 12>=24
Another way to find the greatest common divisor and least common factor of two positive integers is to
use the prime factorizations of these integrs,Suppose that the prime factorizations of the positive integrs
a and b are
𝑎 𝑎 𝑎 𝑏 𝑏 𝑏
𝑎 = 𝑃1 1 . 𝑃2 2 … … . . 𝑃𝑛 𝑛 , 𝑏 = 𝑝1 1 . 𝑝2 2 … … . . 𝑝𝑛 𝑛 Where each exponent is a non negative
integers.Then gcd(a,b) is given by
min (𝑎 𝑏 ) min (𝑎 𝑏 ) min (𝑎 𝑛 , 𝑏𝑛 , )
gcd(a,b)=𝑃1 1 , 1,
. 𝑃2 2 , 2,
… … . . 𝑃𝑛
their Least Common Multiples is
max (𝑎 1 , 𝑏1, ) max (𝑎 2 , 𝑏2, ) max (𝑎 𝑛 , 𝑏𝑛 , )
lcm(a,b)= 𝑃1 . 𝑃2 … … . . 𝑃𝑛

11 Available at MathCity.org Prof. Asghar Ali


Question : Find the gcd and lcm of
a = 23.32.114.373, b=22.3.52.7.11.29.374

Theorem: Let take positive integers ‘a’ and ‘b’ then gcd (a,b).lcm (a,b)= ab.
Proof:
Let gcd(a,b)=d, lcm(a,b)=m. Now we have to prove d.m=a.b
Since gcd(a,b)=d then Ǝ x,y ϵ Z such that (linear combination) ax+by=d …… (1)
Also d|a & d|b then Ǝ r, s Such that
a= rd , b= sd
𝑎𝑏
If m= 𝑑
using Then m=as, m=br where r, s ϵ Z
 a|m and b|m now we have to prove that m is the least common multiple.
For this supose „c‟ is the multiple of a and b. Then a|c, b|c there exist integers k1, k2 we have
c= ak1 , c= bk2 ……….(2)
𝑐 𝑐 𝑎𝑏
Also = ∴𝑚=
𝑚 𝑎𝑏 /𝑑 𝑑
𝑐 𝑑𝑐 𝑐(𝑎𝑥 +𝑏𝑦 ) 𝑐𝑎𝑥 +𝑐𝑏𝑦
𝑚
= 𝑎𝑏
= 𝑎𝑏
= 𝑎𝑏 ∴ 𝑑 = 𝑎𝑥 + 𝑏𝑦 from (1)
𝑐 𝑎𝑐 𝑐𝑏 𝑐 𝑐 c c
= 𝑥+ 𝑦= 𝑥 + ( )𝑦 where k1 = and k 2 = from (2)
𝑚 𝑎𝑏 𝑎𝑏 𝑏 𝑎 a b
𝑐
= 𝑘2 𝑥 + 𝑘1 𝑦 ∴ x, y, k1 , k 2 ∈ Z xk 2 + k 2 y = t
𝑚
c
=t c = mt → m|c →m≤c
m
ab
m= → 𝑚𝑑 = 𝑎𝑏
d

Question : Show that ax+by=m iff gcd(a,b) |m.


Proof:
∴ ax+by=m……………(1)
Let gcd(a,b)=d so d|a & d|b. Then ∃ 𝑘1 𝑘2 such that
𝑎 = 𝑘1 𝑑 , 𝑏 = 𝑘2 𝑑 ; 𝑘1 𝑘2 ∈ 𝑍
Put in (1) k1dx+k2dy=m → d(k1x+k2y)=m
m=kd k1x+k2y=k ∈ Z
d|m but gcd(a, b)=d so gcd(a, b) |m
conversily
gcd(a, b) |m. Now we have to prove that ax+by=m………..(1)
Let gcd(a, b)=d, then d|m
axo+byo=d………(2) where xo, yo ∈ Z
Also d|m then there exist integer t s.t m=dt
atxo+btyo=dt multi eq (2) by t
m= a(txo)+b(tyo) Take xot=x, and yot=y
so m=ax+by proved.

12 Prof. Asghar Ali


Prime Numbers
 The numbers which are divisible by 1 and itself only is called prime numbers.
 The numbers which are greater than 1 and divisible by 1 and itself is called prime.
The set of prime is denoted by „P‟. Example : 2,3,5,7,11 …….

Composite numbers:
The number which are not prime and greater than „1‟.
OR The number which can be divide by other number .
Example : 4,6,8,9,10,12,15, ……………..
Remarks :
 2 is only even prime .
 1 is neither even nor odd prime.

Theorem: if „p‟ is prime and p|ab where a,b Є Z then either p|a or p|b.
Proof:
Since „p‟ is prime and p|ab. We have to prove that p|a or p|b.
If p|a then we have done, and nothing to prove
If „p‟ is not divides „a‟ and also „p‟ is prime so gcd (a,p) = 1
By Euclid‟s lemma If gcd (a,b) = 1 and a|bc then a|c.
Where gcd (a,p) = 1 and p|ab then p|b → p|b.
Similarly we can show p|a.

Corollary : If „p‟ is prime and p|a1.a2……an , then p|ak for some ak, Where 1 ≤ k ≤ n.
Proof :
we prove it by M.I ,

Step 1:
If n = 1 then p|a1. So the result is true for n = 1
If n = 2 then p|a1a2 → p|a1 or p|a2 by above result

Step 2:
Now we suppose that the result is true for n = k
→ p|a1.a2……ak then p|ai for some i (1 ≤ i ≤ k)
Now we will prove for n = k+1
Take p|a1.a2………ak.ak+1 → p| (a1.a2…..ak)(ak+1)
By using the statement, “ if „p‟ is prime and p|ab then p|a or p|b “
So p|a1.a2……ak or p|ak+1
If p|a1.a2…….ak then by hypothesis p|ai for some i .
and If p|ak+1 then obviously result is true for n=k+1.
Hence the result is true for all n by mathematical induction .

Corollary : If p ,q1,q2,q3,…….,qn are all primes and p|q1.q2.q3……qn. Then p = qk for some k,
where 1 ≤ k ≤ n.
Proof:
Let p,q1,q2,q3 ……. qn are prime numbers and
If p|q1.q2.q3 ……. qn we have to show that p = qk for some k (1 ≤ k ≤ n)
we know a result,

13 Prof. Asghar Ali


If p is prime and p|a1.a2.a3 ……. an, then p|ak for some ak where 1 ≤ k ≤ n.
Where p is prime so p > 1.
Also p|q1.q2.q3 ……. qn then p|qk for some k (1 ≤ k ≤ n),
Since qk is prime which is divisible by 1 or itself .
Where p|qk and p ≠ 1 so it force to take p = qk.

Question : If „p‟ is a prime s.t p|a2 + b2 and p|a then p|b .


Proof :
Since „p‟ is prime,
Where if p|a then p|a2 …….. (2) also p|a2 + b2
Let a,b,c are integers If a|b , a|c then a|b-c or a|b+c
where p|a2 + b2 , p|a2 then p|a2+b2-a2
→ p|b2 → p|b .

Theorem: Every integer n>1 has prime divisors .


Proof : Let n>1 be the integer.

Case 1: If n is prime then „n‟ divide itself so it has a prime divisor.


Case 2: If „n‟ is not prime then „n‟ will be composite . then Ǝ integer „d‟ s.t d|n. where 1 < d < n .
Among all such integers „d‟ we suppose „p1‟ is the smallest divisor of „n‟{By well ordering principle}
If p1 is prime then we have a prime divisor. And if „p1‟ is not a prime then p1 is composite, then there
exist integer „q‟ s.t q|p1 where 1 < q < p1 → q|p1 and p1|n then q|n. Which is contradiction to the choice
of the least element p1.
Therefore we can write n such as n = p1n1 where p1 is prime and 1 < n1 < n.

Fundamental theorem of arithematic


Statement : Every +ve integer n > 1 is either a prime or a product of prime and this
representation is unique , apart from the order in which the factors occur.

Proof : Let n > 1 be the integer.


Case 1: If n is prime then „n‟ divide itself so it has a prime divisor.
Case 2: If „n‟ is not prime then „n‟ will be composite. Then Ǝ integer „d‟ s.t d|n. where 1 < d < n .
among all such integers „d‟ we suppose „p1‟ is the smallest divisor of „n‟{By well ordering principle}
If p1 is prime then we have a prime divisor. And if „p1‟ is not a prime then p1 is composite, then there
exist integer „q‟ s.t q|p1 where 1 < q < p1 → q|p1 and p1|n then q|n.
Which is contradiction to the choice of the least element p1.
Therefore we can write n such as n = p1n1 where p1 is prime and 1 < n1 < n.
Next if n1 is prime , then we have our prime representation , in the contrary case , the argument is
repeated to produce a second prime p2 s.t n1 = p2n2, where 1 < n2 < n1 i.e n = p1p2n2 if n2 is prime , then
we have done otherwise n2 is composite, write as n2 = p3n3, with p3 is prime and n = p1p2 p3n3, 1 < n3 < n2
and we obtain a decreasing sequence s.t n > n1 > n2…….. > 1
Can‟t continue indefinitely , so that after a finite number of steps nk-1 is a prime , call it pk this leads to
the prime factorization n = p1.p2.p3………………. pk.

Uniqueness :
Let us suppose that the integer „n‟ can be represented as a product of primes in two ways say,
n = p1.p2.p3…….pr ………… (1)
n = q1.q2.q3……..qs …………..(2) with r ≤ s compairing (1) and (2)
p1.p2.p3…….pr = q1.q2.q3……..qs where pi‟s and qj‟s are all primes ,
14 Prof. Asghar Ali
written in increasing magnitude so that p1 ≤ p2 ≤ p3 …………… ≤ pr , q1 ≤ q2 ≤ q3 ………… qs
because p1|q1.q2.q3……..qs then p1 = qk for some k as qk ≥ q1.But then p1 ≥ q1 …………(3)
similarly if q1| p1.p2.p3……. pr, then q1 = pm for some m as pm ≥ p1 so q1 ≥ p1 ………… (4)
combine (3) and (4) p1 = q1
p1.p2.p3…….pr = q1.q2.q3……..qs we may cancel this common factor and obtain ,
p2.p3……….pr = q2.q3………..qs now repeat the procedure to get p2 = q2 , then we have
p3…….pr = q3……..qs continuing in this way , we have if r < s , then 1 = qr+1 . qr+2 ………… qs
Which is wrong because each qi > 1 hence r = s and p1 = q1 , p2 = q2 , ………… , qr = pr
Hence our proof is complete.

Corollary : Show that every odd prime number is either of the form 4n+1 or 4n-1 (4n+3)
Proof :
Suppose „m‟ be an integer. By using division algorithm , there exist unique integers
„n‟ and „r‟ s.t m = nd+r …….(1) where 0 ≤ r < d, take d = 4, so r = 0, 1, 2, 3 put in (1),
m= 4n ………..(1) if r = 0
if r = 1,2,3 ,then ,
m = 4n + 1 ………(2)
m = 4n + 2 ………(3)
m = 4n + 3 ………(4)
now 4n can‟t be prime for any integer n.
4n+2 = 2(2n+1) is prime only for n = 0 , which is even prime ,
hence every odd prime is of the form 4n+1 or 4n+3.

Theorem: Prove that there are infinte many prime numbers.


Proof :
Suppose on contrary that prime numbers are finite. i.e { p1.p2.p3…….pn } be the complete list of
prime numbers .
Let N = p1.p2.p3…….pn + 1…………. (1)
Case 1: If N is prime then we obtain a prime number greater then all those prime numbers which are
in list , which is contradiction .
Case 2 : If N is not a prime then N will be composite. Write „N‟ in prime factorization form.
N= p1.p2.p3…….pn. Let pi | p1.p2.p3…….pn for some i. Let pi|N ………… (2)
Where pi > 1 → prime number.
→ pi|N- p1.p2.p3…….pn If a|b and a|c then a|b - c
pi| p1.p2.p3…….pn + 1 – p1.p2.p3…….pn →pi|1 Which is only possible when pi = 1,
Which is contradiction because to the choice that pi > 1 . so our supposition wrong .
Hence , prime numbers are infinite .

15 Prof. Asghar Ali


Diophantine Equation
Definition:
The simplest type of diophantine equation that we shall consider is the linear Diophantine
equation in two unknown is ax + by = c , where a,b,c are constants .

Theorem: The linear Diophantine equation ax+by = c admits a solution iff d|c , where
d = gcd (a,b).
Proof :
Since gcd (a,b) = d , i.e d|a , d|b. So there exist integers „r‟ and „s‟ s.t a = dr , b = ds
if a solution of ax+by = c exist. So that axo+byo = c for suitable „xo‟ and „yo‟.Then c = axo+byo
c = drxo+dsyo = d(rxo+syo) , since r, xo, s, yo ∈ Z
then c = d(rxo+syo), rxo+syo = q ∈ Z
c = dq , d|c
Conversely
Suppose that d|c , then Ǝ integer „t‟ s.t c = dt using ( given integers „a‟ and „b‟ no both of which are
zero, then there exist integer „x‟ and „y‟ s.t d = ax+by. So we can find integer xo and yo s.t axo+byo = d
multiply this eq by „t‟ , we get atxo + btyo = t
→ a(txo) + b(tyo) = c,
Hence , the Diophantine eq, ax + by = c has a solution x = txo , y = tyo .

Theorem: The linear Diophantine eq. ax+by = c has a solution iff d|c, Where gcd (a,b) = d if
„xo‟ , „yo‟ is any particular solution of this equation , Then all other solutions are given by
𝒃 𝒂
x = xo+( )t , y = yo-(𝒅 )t .
𝒅
Proof :
Write whole solution of the previous theorem same as it is: [ The linear Diophantine equation
ax+by = c admits a solution iff d|c , where d = gcd (a,b)]
Then next:
Now, It is given that xo , yo is the solution of given equation . suppose x1,y1 is any other solution of this
equation , then since axo + byo = c = axl + byl
byo – byl = axl – axo
b ( yo – yl) = a (xl – xo)
a ( xl – xo) = b (yo- yl) ………….. (1)
there exist relatively prime integers „r‟ and „s‟ s.t
a = dr , b = ds , put in (1) d|a, d|b
we get dr ( xl – xo ) = ds (yo – yl)
where „d‟ is common factor , we get
r(xl – xo) = s(yo – yl)
→ r|s(yo – yl) , with gcd (r,s) = 1 By using Euclid lemma ,
r|yo – yl or in other words yo – yl = rt for some integers „t‟ ,we now get
r(xl – xo) = s(yo – yl)
r(xl – xo) = srt →xl – xo = st
this leads to the formula xl = xo + st , yl = yo - rt
𝑏 𝑎
xl = xo + ( )t , yl = yo-( )t
𝑑 𝑑

16 Prof. Asghar Ali


Example: Consider the linear Diophantine eq. 172x + 20y = 1000
gcd ( 172,20) = 4 So the solution of given Diophantine eq will be exist.

172 = 8×20+12 → 172 – 8×20 =12


20 = 1×12+ 8 → 20-1×12 = 8
12 = 1×8 + 4 → 12-1×8 = 4
8 = 2×4 + 0 → 8-2×4 = 0 gcd (172 , 20 ) = 4
4=12-1×8
4=12-1× {20-1× (12)}
4=12-1×20+1×12
4=-1×20+2×12
4=-1×20+2×{172-8×20}
4=-1×20+2×172-16×20
4=2×172+(-17) × 20 x = 2 , y = -17

Which of the following Diophantine eqs can’t be solved.

I. 6x + 51y = 20
II. 33x+14y = 115
III. 14x+35y = 93

Solution: 6x+51y = 22
51= 8×6+3
6 = 2×3+0
gcd (6,51) = 3
3 can‟t divided by 22 so its solution does not exist.
other questions do yourself with same method.

Question: (a) 172x + 20y = 1000 , (b) 56x + 72y = 40


Solution: (a)
172 = 8×20 + 12 → 172 – 8×20 = 12
20 = 1×12 + 8 → 20 – 1×12 = 8
12 = 1×8 + 4 → 12 – 1×8 = 4
8 = 2×4 + 0 → 8 – 2×4 = 0 gcd (172 , 20) = 4 , a=172, b=20, d=4
Also 4|1000 so its solution is possible
4=12 – 1×8
4=12 – 1×{20 – 12}
4=12 – 20 + 12
4=-20 + 2×12
4=2×12 – 20
4=2×{172 – 8(20)}-20
4=2×172 – 16×20 – 20
4=2×172 +(– 17) × 20 x = 2 , y = -17, a = 172 , b = 20
1000 = 250 ×4 since gcd (12,16) = 4
= 250×{2×172 – 17×20}
= 500×172 – 4250×20
So that xo = 500 , yo = -4250
Provide one solution to the Diophantine eq‟s. So all the other possible solutions of Diophantine equation

17 Prof. Asghar Ali


𝑏 𝑎
can be calculate by this formula x = xo + (𝑑 ) t , y = yo – ( ) t
𝑑
20 172
x = 500 + ( 4 ) t , y = -4250 – ( 4
) t
x = 500 + 5t , y = -4250 – 43t . Now we must have to choose „t‟ is inequality
5t + 500 > 0 , -4250 – 43t > 0
5t > -500 , -4250 > 43t
t >-100……… (1) , -98.83 > t → t < -98.83 ………(2)
Combine (1) and (2)
-100 < t < -98.83 → t = -99
x = 500 + 5t , y = -4250 – 43t
x = 500 + 5(-99) , y = -4250 – 43(-99)
x = 500 – 495 , y = -4250 + 4257 x=5,y=7
(b) 56x + 72y = 40 ( do yourself)

Question: Determine all solution in integers of the following Diophantine eq‟s:


A. 24x +138y=18
B. 221x + 35y=11

Solution: 24x + 138y = 18


138 = 5×24 + 18 → 138 – 5×24 = 18
24 = 1×18 + 6 → 24 – 1×18 = 6
18 = 3×6 + 0 → 18 – 3×6 = 0 gcd (24 , 138) = 6
6|18
24 – 1×18 = 6
24 – 1× [138-5(24)] = 6
24 – 138 +5×24 = 6
6×24 – 1×138 = 6
x = 6 , y = -1
6|18 so its solution is possible
18 = 3×6
= 3×{6×24 – 1×138}
= 18×24 – 3×138 a = 24 , b = 138 , xo = 18 , yo = -3
Provide one solution to the Diophantine eq‟s. So all the other possible solutions of Diophantine
𝑏 𝑎
equation can be calculate by this formula x = xo + (𝑑 ) t , y = yo – (𝑑 ) t
138 24
x = 18 + ( 6
) t , y = -3 – ( 6 ) t
x = 18 + 23t , y = -3 – 4t Now we must to choose „t‟ inequality .
18 + 23t > 0 , -3 – 4t > 0
23t > -18 , -3 > 4t
t > - 0.7826 ………. (1) , - 0.75 > t → t < - 0.75 ………… (2)
Combine (1) and (2)
-0.7826 < t < -0.75 → so its other solution is not possible.

B. 221x + 35y = 11 ( do yourself )


C. 23x - 49y= 179

18 Prof. Asghar Ali


Question : Find all solutions in integers of 15x+7y=210....... (1) also determine the number
of solutions in positive integers.
Solution :
If we put x=0, then, we get y=30 so x=0, y=30 is one solution of eq (1). Also (15,7)=1, and
1|210 so all the other solutions can be determine by
x= xo + 𝑑𝑏 t, y=yo- 𝑎𝑑 t Where xo =0, yo =30 then x=0+7t, y=30-15t
x=7t........(2) y=30-15t...... (3) , where t ranges over the integers
To find the number of solutions in positive integers. Take x > 0, y > 0 then (2) and (3) becomes
7t > 0 → t > 0 ............. (4)
30-15t > 0 → 30 >15t → 2 > t ........... (5)
Combine (4) and (5) 0 <t < 2
So t=1 → x = 7, y = 15 is only one solution in positive integers.

19 Prof. Asghar Ali


Y-Values
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13 Y-Values
12
11
10
9
8
7
6
5
4
3
2
1
0
-1
-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
-2
-3
-4
-5
-6
-7
-8
-9
-10
Question : Find the solution of 91x+ 221y=1053, are there solutions in positive integrs.
Solution :
As gcd(91,221)=13, So all divides by 13, the given equation is equivalent to 7x+17y=81....... (1)
By inspection, one solution is x=14, y= -1, also (7,17)=1, and 1| 81, so all the other solutions can be
determine by x= xo + 𝑑𝑏 t, y=yo- 𝑎𝑑 t Where xo =14, yo = -1 then
x=14+17t, y= -1-7t, Where t ranges over the integers.
To find the numbers of solution in positive integers. Take x > 0, y > 0
14+17t > 0 → 17t > -14 → t > -14/17 → t > - 0.82……..(2)
Now -1-7t > 0 → -1 > 7t → t < -1/7 → t < - 0.14……..(3)
- 0.82 < t < - 0.14 combine (2) and (3)
So now integral value exists for t. Hence there are no solutions in positive integers.

Question:Find all solutions in positive integers of 11x+7y=200..... (1)


Solution:
As a=11, b=7 First we will calculate gcd of (11, 7)
11=1 × 7+ 4 → 11-1× 7=4
7=1 × 4 +3 → 7- 1× 4 =3
4=1 × 3 +1 → 4- 1 × 3=1
3=1 × 3 +0
1= 4-1 × 3= 4-1 × [7-1 x 4]
1= 4-1 ×7+1×4 = 2×4 -1×7 = 2× [ 11-1×7] -1×7
1= 2×11-2×7-1×7 → 1= 2 ×11-3×7 x-ing by 200
200= 400 ×11 – 600×7 where one solution is xo=400, yo=600
also (11,7)=1, and 1|200, so all the other solutions are given by
x= xo + 𝑑𝑏 t, y=yo- 𝑎𝑑 t use the values of xo, and yo
x=400+7t, y= - 600 -11t, where t ranges over the integers.
To find the number of solutions in positive integers x > 0, y > 0, gives
- 400/7 < t < - 600/11→ - 57.14 < - 54.54
And hence positive solutions occurs only for t= -55,-56,-57, therefore the only positive solutions are
(x=15, y= 5), ( x=8, y=16) (x=1, y=27)

Question : Do there exist infinitly many positive integer solutions of 10x-7y= -17. Explain.
Solution :
Yes, by inspection 10(-1) -7.1= -17, so x= -1, y =1 is one solution of the equation. Hence all
solutions are given by x= -1-7t , y =1-10t, if t < -1/7 , then, x > 0 if t < 1/10, then y > 0, and therefore
any integer t ≤ -1 yes a positive solutions.

Question : Find the smallest positive integer b, s.t the linear diophantine equation
1111x+704y=15000+b has a solution.
Solution :
Since (1111,704)=11, so the solutions exist iff 11 divides 15000+b, the smallest positive value
of b is thus 4.

Available at MathCity.org
Y-Values
15
14
13
12
11
10
9
8
7
6
5
4
3 Y-Values
2
1
0
-15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-2
-3
-4
-5
-6
-7
-8
-9
-10
Y-Values
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13 Y-Values
12
11
10
9
8
7
6
5
4
3
2
1
0
-5 -4 -3 -2 -1 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
-2
-3
-4
-5

23 Prof. Asghar Ali


Remainder Theorem
a×b×c
Remainder of [ i.e a×b×c when divided by „n‟] is equal to the remainder of expression.
𝑛
ar ×br ×cr
𝑛
[ i.e ar×br×cr when divided by „n‟]
Where „ar‟ is remainder when „a‟ is divided by „n‟.
Where „br‟ is remainder when „b‟ is divided by „n‟.
Where „cr‟ is remainder when „c‟ is divided by „n‟.

Example :Find the remainder of 15×17×19 , when divided by 7.


Solution:
15×17×19 1×3×5 15 1
Remainder of 7
will be equal to 7
= 7
= 27 = 1
So we obtain remainder „1‟.

Example: Find the remainder of 19×20×21, when divided by 9.


Solution:
19×20×21 1×2×3 6
Remainder of 9
will be equal to 9
=9
So we obtain remainder „6‟.

Polynomial Theorem
This is very powerfull theorem to find the remainder according to polynomial theorem,
(x + a) = xn + c1nxn-1a+ c2nxn-2a2+……..+ cnnx0an …………. (1)
n

Dividing by „x‟
(x+a)n x n +c n 1 x n −1 a+c n 2 x n −2 a 2 +⋯…….+c n n x 0 a n
x
= x
…………….(2)
an
Remainder of expression (2) will be equal to remainder of „ ‟ because rest of the term contains „x‟
x
are completely divides by „x‟.
𝟗𝟗𝟗
Example : Find the remainder 𝟖
.
Solution:
999 (8+1)99
8
= 8 According to polynomial theorem will be equal to
(1) 99 1
8
= 8 → Remainder = 1
𝟖𝟖𝟗
Example : Find the remainder 𝟕
.
Solution:
889 (7+1)89
= According to polynomial theorem will be equal to
7 7
(1) 89 1
7
= 7 → Remainder = 1
𝟗𝟏𝟎𝟎
Example : Find the remainder of 𝟕
Solution:
9100 (7+2)100 2100 299 .2 23×33 .2 833 .2 (7+1)33 .2 (1)33 .2 2
= = = = = = = =
7 7 7 7 7 7 7 7 7
Remainder = 2
Available at MathCity.org
𝟕𝟐𝟑
Example : Find the remainder of 𝟖
Solution:
723 722 .7 (72 )11 .7 4911 .7 (48+1)11 .7 (6×8+1)11 .7 (1)11 .7 7
8
= 8
= 8
= 8
= 8
= 8
= 8
=8
→ Remainder = 7

Congruences

Congruences:
Let n be a positive integer. Two integers a and b are congruent modulo n. If n|a-b. If this is so
then we can write a ≡ b (mod n). Such a statement is called a congruence
For example, 19 and 12 are congruent modulo 7; that is, 19 ≡ 12 (mod 7), because 7|19-12
Also, −8 and 10 are congruent modulo 6; that is, −8 ≡ 10 (mod 6).

Example: 8 ≡ 2( mod 3) because 3| 8 – 2

Activity: Checking congruences. Which of the following congruences are true?

(a) 11 ≡ 26 (mod 5) (b) 9 ≡ −9 (mod 5)


(c) 28 ≡ 0 (mod 7) (d) −4 ≡ −18 (mod 7)
(e) −8 ≡ 5 (mod 13) (f) 38 ≡ 0 (mod 13)

Writing a congruence as an equation

The congruence a ≡ b (mod n) is equivalent to the statement that there is an integer k such that
a = b + nk.

Properties of congruences:
 a ≡ a (mod n)
 if a ≡ b (mod n) then b ≡ a (mod n)
 if a ≡ b (mod n) and b ≡ c (mod n), then a ≡ c (mod n)

Question : Using congruence find the remainder of “ 548 “ is divided by “24”.

Solution:
51 ≡ 5 mod(24)
52 ≡ 52 mod(24)
52 ≡ 1 mod(24)
52 ≡ 1 mod(24)
(52)24 ≡ (1)24 mod(24)
548 ≡ (1) mod(24)
“ 1 “ is remainder

Question : Using congruence find the remainder of “ 321 “ divided by “8” .

Solution:
3 ≡ 3 mod(8)
32 ≡ 9 mod(8)
25 Prof. Asghar Ali
32 ≡ 1 mod(8)
(32)10 ≡ (1)10 mod(8)
320 ≡ (1) mod(8)
3.320 ≡ (3)(1) mod(8)
321 ≡ 3 mod(8)
So „‟3‟‟ is the remainder.

Question : Find the remainder when “ 1135 “ is divided by “13” .

Solution:
11 ≡ 11 mod(13)
11 ≡ -2 mod(13)
112 ≡ (-2)2 mod(13)
112 ≡ 4 mod(13)
114 ≡ 16 mod(13)
114 ≡ 3 mod(13)
118 ≡ 9 mod(13)
1116 ≡ (-4)2 mod(13)
1116 ≡ 16 mod(13)
1116 ≡ 3 mod(13)
1132 ≡ 9 mod(13)
1132 ≡ -4 mod(13)
1135 = (11)32×(11)2×(11)1
1135 = (-4)×(4) × (-2) mod(13)
1135 = 6 mod(13)
So “ 6 “ is remainder .

Question : Find the remainder when “ 3287” is divided by “23” .

Solution:
31 ≡ 3 mod(23)
32 ≡ 9 mod(23)
34 ≡ 81 mod(23) 34 ≡ 12 mod(23)
38 ≡ 144 mod(23)
38 ≡ 6 mod(23)
316 ≡ 36 mod(23)
316 ≡ 13 mod(23)
316 ≡ 169 mod(23)
332 ≡ 8 mod(23)
364 ≡ 64 mod(23)
364 ≡ 18 mod(23)
364 ≡ -5 mod(23)
3128 ≡ 25 mod(23)
3128 ≡ 2 mod(23)
3256 ≡ 4 mod(23)
3287 = 3256× 316× 38× 34× 32× 31
≡ 4×13×6×12×9×3 mod(23)
≡ 6×6×12×9×3 mod(23)
≡ 13×12×9×3 mod(23)
26 Prof. Asghar Ali
≡ 18×9×3 mod(23)
≡ 1×3 mod(23)
≡ 3 mod(23)
Hence “3” is the remainder.

Question : Find the remainder of “2340” when divided by 341.

Solution:
341 = 11×31
340 = 68×5
25 ≡ 32 mod(11)
25 ≡ 10 mod(11)
25 ≡ -1 mod(11)
(25 )68 ≡ (-1)68 mod(11)
2340 ≡ 1 mod(11) ………. (1)
25 ≡ 32 mod(31)
25 ≡ 1 mod(31)
(25)68 ≡ (1)68 mod(31)
2340 ≡ 1 mod(31) ……….(2)
2340 ≡ (1)(1) mod(11×31)
2340 ≡ 1 mod(341)
Hence “1” is remainder.

Question : Find the remainder,when 1717 is divided by 7.


Solution :
17≡ 3(mod7), so 1717 ≡ 317(mod7) aslo
32=9≡ 2 (mod7)
(32)4≡ 24 (mod7)
38≡ 2 (mod7)
(3 ) ≡ 4 mod7)
8 2

3.316≡ 3.4 (mod7)


317≡ 12 (mod7)
317≡ 5 (mod7)
1717 ≡5 (mod7) so 5 is the remainder.

Question : Find the remainder,when 430 is divided by 23.


Solution:
43= 64 ≡ -5 (mod23)
(43)2≡ (-5)2 (mod23)
46≡ 2 (mod23)
(4 ) ≡ (2)5 (mod23)
6 5

430≡ 9 (mod23), thus the remainder is 9.

Question : Show that 237-1 is a multiple of 223.


Solution :
Since 28≡ 33 (mod223)
(28)2≡ (33)2 (mod223)
216≡ -26 (mod223) ; thus 232≡ (-26)2 (mod223)
232≡ 7 (mod223)
27 Prof. Asghar Ali
Available at MathCity.org
237= 232.25 ≡ 7.32 ≡1 (mod223)

Question : Find the least positive residue of


(a) 3500 modulo 13, (b) 12! modulo 13 ,
(c) 516 modulo 17, (d) 5500 modulo 17.
Solution :
(a) : Since 33≡ 1 (mod13), we have
(33)166≡ (1)166 (mod13) , thus
3500≡ 3498.32 ≡ 1.9≡9 (mod13)
(b) : 12!= (2.3.4)(5.6)(7.8)(9.10)(11.12)≡(-2)(4)(4)(-1)(2)≡ 12 (mod13)

(c) : 52≡ 8 (mod17)

54≡ 64 ≡ (-4) mod17)


58≡ 16 (mod17)
58≡ -1 (mod17)
516≡ 1 (mod17)

(d) : 58≡ 1 (mod17) from c part


(5 ) ≡ 1 (mod17)
8 2

516≡ 1 (mod17)
5496= (516)31 ≡ (1)31 (mod17)
Hence 5500= 5496.54 ≡ 1.54 ≡ 13 (mod17)

Question : Show that 248-1 is divisible by 97.


Solution:
28≡ 62 ≡ -35 (mod97)
216≡ (-35)2 ≡ 61≡ -36 (mod97)
232≡ (-36)2 ≡ 35 (mod97)
248= 232.216 ≡ 35(-36) = -1260 ≡ -96 ≡ 1 (mod97)
Therefore 97 divides 248-1.

Question : Show that 47 divides 523+1.


Solution:
54≡ 14 (mod47)
58≡ 8 (mod47)
516≡ 17 (mod47)
524= 516.58 ≡ 17. 8 ≡ -5 (mod47)
So 47 divides 524+5.
524+5 = 5 (523+1) 47|5(523+1) and (5, 47)=1
We conclude that 47 divides 523+1.
Residue class
Given any integer a, the collection of all integers congruent to a modulo n is known as the
residue class, or congruence class, of a modulo n.

Multiplicative inverses modulo n


A multiplicative inverse of a modulo n is an integer v such that av ≡ 1 (mod n).

Existence of multiplicative inverses modulo n

28 Prof. Asghar Ali


• If the integers a and n are coprime, then there is a multiplicative inverse of a modulo n.
• If a and n are not coprime, then there is not a multiplicative inverse of a modulo n.

Example: Finding multiplicative inverses modulo n

For each of the following values of a and n, determine whether a multiplicative inverse of a
modulo n exists and, if it does, find one.

(a) a = 5, n = 13 (b) a = 30, n = 73

Solution:
(a) To determine whether there is a multiplicative inverse, check whether 5 and 13 are coprime.
They must be coprime, as they are both prime numbers.The integers 5 and 13 are coprime, so there is a
multiplicative inverse of 5 modulo 13. Since n ≤ 13, try the values 1, 2, 3, . . . one by one until you find
the multiplicative inverse modulo 13. You needn‟t necessarily check the integer 1,
as clearly 5 × 1≢ 1 (mod 13).
5 × 1 ≡ 5 (mod 13) 5 × 2 ≡ 10 (mod 13)
5 × 3 ≡ 15 ≡ 2 (mod 13) 5 × 4 ≡ 20 ≡ 7 (mod 13)
5 × 5 ≡ 25 ≡ 12 (mod 13) 5 × 6 ≡ 30 ≡ 4 (mod 13)
5 × 7 ≡ 35 ≡ 9 (mod 13) 5 × 8 ≡ 40 ≡ 1 (mod 13)
Stop, as you have found an integer v such that 5v ≡ 1 (mod 13). So 8 is a multiplicative inverse of 5
modulo 13. You may have noticed a short cut that saves some calculations. You saw that
5 × 5 ≡ 12 ≡ −1 (mod 13), so
(−5) × 5 ≡ −12 ≡ 1 (mod 13). Since −5 ≡ 8 (mod 13), it follows that a multiplicative inverse of 5
modulo 13 is 8.

(b) To determine whether there is a multiplicative inverse, check whether 30 and 73 are coprime.
The numbers are quite large so use Euclid‟s algorithm to find the highest common factor.
Euclid‟s algorithm gives
73 = 2 × 30 + 13
30 = 2 × 13 + 4
13 = 3 × 4 + 1
4 = 4 × 1 + 0.
As gcd(30, 73)=1, so there is a multiplicative inverse of 30 modulo 73.
Rearrange all but the last equation and then apply backwards substitution to find integers v and w with
30v + 73w = 1. The integer v will be a multiplicative inverse of 30 modulo 73 since 30v = 1 − 73w.
Rearranging the equations gives
13 = 73 − 2 × 30
4 = 30 − 2 × 13
1 = 13 − 3 × 4 .
Backwards substitution gives
1 = 13 − 3 ×{30 − 2 × 13}
= 7 × 13 − 3 × 30
= 7 ×{73 − 2 × 30} − 3 × 30
= 7 × 73 − 17 × 30. (Check: 7 × 73 − 17 × 30 = 511 − 510 = 1.)
Write the equation 7 × 73 − 17 × 30 = 1 as a congruence modulo 73 to give the multiplicative inverse.
Since (−17) × 30 = 1 − 7 × 73, we obtain
(−17) × 30 ≡ 1 (mod 73).
So −17 is a multiplicative inverse of 30 modulo 73.

29 Prof. Asghar Ali


find a multiplicative inverse that is a least residue modulo 73.
Since −17 ≡ 56 (mod 73),
56 is also a multiplicative inverse of 30 modulo 73.

Linear congruences:
A linear congruence is a congruence of the form ax ≡ b (mod n),
where a and b are known, and x is unknown.

Solving the linear congruence ax ≡ b (mod n)


Let d be the highest common factor of a and n.
 If d = 1, then the linear congruence has solutions. The solutions are given by x ≡ vb (mod n),
where v is any multiplicative inverse of a modulo n.
 If b is not divisible by d, then the linear congruence has no solutions.
 If b is divisible by d, then the linear congruence has solutions and the solutions are given by the
𝑎 𝑏 𝑛
solutions of the equivalent linear congruence 𝑑 𝑥 ≡ 𝑑 (𝑚𝑜𝑑 𝑑 ).

Example: Solving a linear congruence when a and n are coprime and n ≤ 13


Solve the linear congruence 11x ≡ 7 (mod 8).

Solution:
Simplify the linear congruence by replacing 11 with the least residue of 11 modulo 8.
Since 11 ≡ 3 (mod 8), an equivalent linear congruence is 3x ≡ 7 (mod 8).
Check that this linear congruence has solutions.
As 3 and 8 are coprime, this linear congruence has solutions.
Try the values 1, 2, 3, . . . one by one until you find a solution.
Trying the values 1, 2, 3, . . . one by one, we find that
3 × 1 ≡ 3 (mod 8) 3 × 2 ≡ 6 (mod 8)
3 × 3 ≡ 9 ≡ 1 (mod 8) 3 × 4 ≡ 12 ≡ 4 (mod 8)
3 × 5 ≡ 15 ≡ 7 (mod 8).
So the solutions are given by
x ≡ 5 (mod 8).

Activity: Solving linear congruences when a and n are coprime and n ≤ 13


Solve the following linear congruences.
(a) 2x ≡ 5 (mod 7) (b) 7x ≡ 8 (mod 10) (c) 15x ≡ −13 (mod 11)

Example: Solving a linear congruence when a and n are coprime and n > 13
Solve the linear congruence 7x ≡ 13 (mod 24).

Solution:
Check that the linear congruence has solutions. As 7 and 24 are coprime, the linear congruence
has solutions. Since 24 is a large integer, use a multiplicative inverse of 7 modulo 24 to
find the solutions. The solutions are given by
x ≡ 13v (mod 24),
where v is a multiplicative inverse of 7 modulo 24.
Use Euclid‟s algorithm and backwards substitution to find v.
Euclid‟s algorithm gives
24 = 3 × 7 + 3
7 = 2 × 3 + 1.
30 Prof. Asghar Ali
Backwards substitution gives
1=7−2×3
= 7 − 2×(24 − 3 × 7)
= 7 × 7 − 2 × 24. So 7 × 7 ≡ 1 (mod 24),
and hence 7 is a multiplicative inverse of 7 modulo 24. So the
solutions are given by
x ≡ 13 × 7 ≡ 91 ≡ 19 (mod 24).
Remember to check your answer. That is, check that if
x ≡ 19 (mod 24) then 7x ≡ 13 (mod 24). To do this, it helps to use
the congruence 19 ≡ −5 (mod 24).
(Check: 7 × 19 ≡ 7 × (−5) ≡ −35 ≡ 13 (mod 24).)

Showing that some linear congruences have no solutions


Show that the following linear congruences have no solutions.
(a) 4x ≡ 5 (mod 10) (b) −12x ≡ 8 (mod 42)
(c) 48x ≡ 70 (mod 111)

Example: Solving a linear congruence when a and n are not coprime. Solve the linear congruence
12x ≡ 16 (mod 20).
Solution:
Check that the linear congruence has solutions.
The highest common factor of 12 and 20 is 4. Since 16 is divisible
by 4, the linear congruence has solutions.
Divide each of the integers 12, 16 and 20 in the linear congruence
12x ≡ 16 (mod 20) by 4 to obtain an equivalent linear congruence.
and is equivalent to
3x ≡ 4 (mod 5).
Since the numbers involved are small, try the values 1, 2, 3, . . .
one by one until you find a solution.
Trying the values 1, 2, 3, . . . one by one, we find that
3 × 1 ≡ 3 (mod 5) 3 × 2 ≡ 6 ≡ 1 (mod 5)
3 × 3 ≡ 9 ≡ 4 (mod 5).
So the solutions are given by
x ≡ 3 (mod 5).

Theorem: The linear congruence ax ≡ b (mod n) has a solution if and only if d|b, where
d=gcd(a,n). If d|b, then it has d mutually incongruent solutions modulo n.
Proof.
We already have observed that the given congruence is equivalent to the linear Diophantine equation
ax-ny=b. It is known that the latter equation can be solved if and only if d|b; moreover, if it is solvable
and xo, yo is one specific solution, then any other solution has the form
𝑛 𝑎
𝑥 = 𝑥° + 𝑡 𝑦 = 𝑦° + ( )𝑡. for some choice of t.
𝑑 𝑑

Among the various integers satisfying the first of these formulas, consider those that occur when t takes
on the succesive values t= 0,1,2, ......., d-1:
𝑛 2𝑛 (𝑑 − 1)𝑛
𝑥° , 𝑥° + , 𝑥° + … … .. 𝑥° +
𝑑 𝑑 𝑑
We claim that these integers are incongruent modulo n, and all other such intgers x are congruent to
some one of them. If it happend that

31 Prof. Asghar Ali


𝑛 𝑛
𝑥° + 𝑡1 ≡ 𝑥° + 𝑡2 ( 𝑚𝑜𝑑 𝑛)
𝑑 𝑑
Where 0 ≤ t1 < t2 ≤ d-1, then we would have
𝑛 𝑛
𝑡1 ≡ 𝑡2 ( 𝑚𝑜𝑑 𝑛)
𝑑 𝑑
Now gcd(n/d,n)= n/d, and therefore the factor n/d could be canceled to arrive at the congruence
𝑡1 ≡ 𝑡2 ( 𝑚𝑜𝑑 𝑑)
Which is to say that d|t2-t1. But this is impossible in view of the inequality 0 < t2 – t1 < d.
It remains to argue that any other solution 𝑥° + ( 𝑛 𝑑 )𝑡 is congruent modulo n to one of the d integes
listed above. The Division Algorithm permits us to write t as t = qd + r, where 0 ≤ r ≤ d-1. Hence
𝑛 𝑛
𝑥° + 𝑡 = 𝑥° + (𝑞𝑑 + 𝑟)
𝑑 𝑑
𝑛
= 𝑥° + 𝑛𝑞 + 𝑟
𝑑
𝑛
≡ 𝑥° + 𝑟 ( 𝑚𝑜𝑑 𝑛)
𝑑
With 𝑥° + ( 𝑛 𝑑 )𝑟 being one of our d selected solutions. This ends the proof.
The argument that we gave in above theorem brings out a point worth station explicity: if 𝑥° is any
solution of ax ≡ b( mod n), then the d = gcd(a, n) incongruent solutions are given by
𝑛 𝑛 𝑛
𝑥°, 𝑥° + , 𝑥 + 2( ) … … .. 𝑥° + (𝑑 − 1)( )
𝑑 ° 𝑑 𝑑

Corollary: If gcd(a,n)=1,then the linear congruence ax ≡ b(mod n) has a unique solution modulo n.

Given relatively prime intgers a and n, the congruence ax≡b(mod n) has a unique solution. This
solution is sometimes called the ( multiplicative) inverse of a modulo n.

Example: Consider the linear congruence 18x ≡30(mod 42).


Solution:
Because gcd(18, 42) = 6 and 6 surely divides 30, above theorem guarantees the existence of
exactly six solution, which are incongruent modulo 42. By inspection one solution is found to be x = 4.
Our analysis tells us that six solutions are as follows:
42
𝑥 ≡4+ 𝑡 ≡ 4 + 7𝑡(mod 2) t=0, 1,.....5
6
Or x ≡ 4, 11, 18, 25, 32, 39 (mod42)

Example : Solve the the linear congruence 9x ≡21 (mod 30).


Solution :
Because gcd(9,30)= 3 and 3|21, we know that there must be three incongruent solutions.One
way to find these solutions is to divide the given congruence through by 3, threby replacing it by the
equivalent congruence 3x ≡ 7 (mod 10). The relative primeness of 3 and 10 implies that the latter
congruence admits a unique solution modulo 10. Although it is not the most efficient method, we could
test the integers 0,1,2, . . . . . ., 9 in turn untill these solution is obtained. A better way is this: multiply
both sides of the congruence 3x ≡ 7 (mod 10) by 7 to get
21𝑥 ≡ 49 (mod 10)
Which reduces to x ≡ 9 (mod 10). ( This simplification is no accident, for the multiples 0 . 3, 1 . 3, 2 . 3,
. . . . , 9 . 3 form a complete set of residues modulo 10; hence, one of them is necessarily congruent to 1
modulo 10.) but the original congruence was given modulo 30, so that its incongruent solutions are
sought among the integers 0, 1, 2, . . . . , 29. Taking t = 0, 1, 2 in the formula
𝑥 = 9 + 10 𝑡
We obtain 9, 19, 29, whence
𝑥 ≡ 9 mod 30 𝑥 ≡ 19 mod 30 𝑥 ≡ 29 mod 30
Are the required three solutions of 9x ≡ 21 (mod 30).
2nd Method
32 Prof. Asghar Ali
A different approach to the problem is to use the method that is suggested in the proof of above
theorem. Because the congruence 9x ≡ 21 (mod 30) is equivalent to the linear Diophantine equation
9𝑥 − 30𝑦 = 21
We begin by expressing 3=gcd(9,30) as a linear combinationof 9 and 30. It is found, either by inspection
or by using the Euclidean Algorithm, that 3= 9(-3) + 30 . 1, so that
21 = 7 .3 = 9 −21 − 30 (−7)
Thus x= - 21, y = -7 satisfy the Diophantine and, in consequence, all solutions of the congruence in
question are to be found from the formula
30
𝑥 = −21 + 𝑡 = −21 + 10𝑡
3
The integers x= -21 + 10t, where t = 0,1, 2, are incongruent modulo 30 ( but all are congruent modulo
10); thus, we end up with the incongruent solutions
𝑥 ≡ −21 mod 30 𝑥 ≡ −11 mod 30 𝑥 ≡ −1 mod 30
Or, if one prefers positive numbers, x ≡ 9, 19, 29 ( mod 30).

Chinese Remainder Theorem


Let 𝒏𝟏 , 𝒏𝟐 , … … , 𝒏𝒓 be positive integers such that gcd(ni, nj) = 1 for 𝒊 ≠ 𝒋. Then the system of
linear congruences
𝑥 ≡ 𝑎1 mod 𝑛1
𝑥 ≡ 𝑎2 mod 𝑛2
. Available at MathCity.org
.
.
𝑥 ≡ 𝑎𝑟 mod 𝑟
has a simultaneous solution, which is unique modulo the integer 𝑛1 𝑛2 , … … , 𝑛𝑟 .

Proof. We start by forming the product 𝑛 = 𝑛1 𝑛2 , … … , 𝑛𝑟 . For each k =1, 2, . . . . , r, let


𝑛
𝑁𝑘 = = 𝑛1 . . . 𝑛𝑘−1 𝑛𝑘+1 … . 𝑛𝑟
𝑛𝑘
In other words, 𝑁𝑘 is the product of all the integers 𝑛𝑖 with the factor 𝑛𝑘 omitted. By hypothesis, the 𝑛𝑖
are relatively prime in pairs, so that 𝑔𝑐𝑑(𝑁𝑘 , 𝑛𝑘 ) = 1. According to the theory of single linear
congruence. It is therefore possible to solve the congruence 𝑁𝑘 𝑥 ≡ 1 ( 𝑚𝑜𝑑 𝑛𝑘 ); call the unique solution
𝑥𝑘 . our aim is to prove that the integer
𝑥 = 𝑎1 𝑁1 𝑥1 + … . . 𝑎𝑟 𝑁𝑟 𝑥𝑟
is a simultaneous solution of a given system.
First observe that 𝑁𝑖 ≡ 0 ( 𝑚𝑜𝑑 𝑛𝑘 ) for 𝑖 ≠ 𝑘, because 𝑛𝑘 |𝑁𝑖 in this case. The result is
𝑥 = 𝑎1 𝑁1 𝑥1 + … . . 𝑎𝑟 𝑁𝑟 𝑥𝑟 ≡ 𝑎𝑘 𝑁𝑘 𝑥𝑘 ( 𝑚𝑜𝑑 𝑛𝑘 )
But the integer 𝑥𝑘 was chosen to satisfy the congruence 𝑁𝑘 𝑥 ≡ 1( 𝑚𝑜𝑑 𝑛𝑘 ), which forces
𝑥 ≡ 𝑎𝑘 .1 ≡ 𝑎𝑘 ( 𝑚𝑜𝑑 𝑛𝑘 )
This shows that a solution to the given system of congruence exists.
As for the uniqueness assertion, suppose that x‟ is any other integer that satisfies these congruences.
Then
𝑥 ≡ 𝑎𝑘 ≡ 𝑥 ′ 𝑚𝑜𝑑 𝑛𝑘 𝑘 = 1, 2, … … 𝑟
And so 𝑛𝑘 | 𝑥 − 𝑥′ for each value of k. Because 𝑔𝑐𝑑(𝑛𝑖 , 𝑛𝑗 ) = 1,
Now we have 𝑛1 𝑛2 … … 𝑛𝑟 | 𝑥 − 𝑥′; hence 𝑥 ≡ 𝑥 ′ 𝑚𝑜𝑑 𝑛 . with this, the chinese remainder theorem is
proven.

Example: The problem posed by Sun-Tsu corresponds to the system of three congruences
33 Prof. Asghar Ali
𝑥 ≡ 2 (mod 3)
𝑥 ≡ 3 (mod 5)
𝑥 ≡ 2 (mod 7)
In the notation of above theorem , we have n= 3 . 5 . 7 = 105 and
𝑛 𝑛 𝑛
𝑁1 = = 35 𝑁2 = = 21 𝑁3 = = 15
3 5 7
Now the linear congruences
35𝑥 ≡ 1 mod 3 21 𝑥 ≡ 1 mod 5 15 𝑥 ≡ 1 (mod 7)
are satisfied by 𝑥1 = 2, 𝑥2 = 1, 𝑥3 = 1, respectively. Thus a solution of the system is given by
𝑥 = 2 . 35 . 2 + 3 . 21 .1 + 2 . 15 .1 = 233
Modulo 105, we get the unique solution 𝑥 = 233 ≡ 23 ( mod 105).

References:
i. Burton, D.M. Elementary Number Theory Mcgraw Hill, 2000.
ii. Adler,Andrew, Coury,John E. The Theory of Number, Jones and Barttlet publishers, Boston,
1995.
The End

Prof: Asghar Ali


Available at MathCity.org Al-Farooq Academy Din
Colony Pattoki.
Cell:0345-6350976
0332-4080492

34 Prof. Asghar Ali

You might also like