SlideShare a Scribd company logo
1 of 7
MODULAR
ARITHMETIC
DEFINITION :
• Let a, b and n are integers and n > 0.
We write a ≡ b mod n if and only if n divides a − b.
n is called the modulus.
b is called the remainder.
For Example:
29 ≡ 15 mod 7 because 7|(29 − 15)
12 ≡ 3 mod 9 ; 3 is a valid remainder since 9 divides 12 − 3
12 ≡ 21 mod 9 ; 21 is a valid remainder since 9 divides 12 − 21
12 ≡ −6 mod 9 ; −6 is a valid remainder since 9 divides −6 − 3
1. a  b (mod n) if n|(a-b)
2. a  b (mod n) implies b  a (mod n)
3. a  b (mod n) and b  c (mod n) imply a  c (mod n)
Proof of 1.
If n|(a-b), then (a-b) = kn for some k. Thus, we can write
a = b + kn. Therefore,
(a mod n) = (remainder when b + kn is divided by n) = (remainder when b is divided by n)
(b mod n).
23  8 (mod 5) because 23 -8 =15 = 5x3
-11  5 (mod 8) because -11-5 =-16 = 8x(-2)
81  0 (mod 27) because 81-0=81 = 27x3
TYPES OF MODULAR ARITHMETIC:
• We can add and subtract congruent elements without losing congruence:
[(a mod n) + (b mod n)] mod n = (a + b) mod n
[(a mod n) - (b mod n)] mod n = (a - b) mod n
• Multiplication also works:
[(a mod n) x (b mod n)] mod n = (a x b) mod n
Proof of 1.
Let (a mod n) = Ra and (b mod n) = Rb. Then, we can write
a = Ra + jn for some integer j and b = Rb + kn for some integer k.
(a + b) mod n = (Ra + jn + Rb + kn) mod n
= [Ra + Rb + (k + j) n] mod n
= (Ra + Rb) mod n
= [(a mod n) + (b mod n)] mod n
EXAMPLES :
• [(a mod n) + (b mod n)] mod n = (a + b) mod n
11 mod 8 = 3; 15 mod 8 = 7
[(11 mod 8 ) + (15 mod 8)] mod 8 = 10 mod 8 = 2
(11 + 15) mod 8 = 26 mod 8 = 2
• [(a mod n) - (b mod n)] mod n = (a - b) mod n
[(11 mod 8 ) - (15 mod 8)] mod 8 = -4 mod 8 = 4
(11 - 15) mod 8 = -4 mod 8 = 4
• [(a mod n) x (b mod n)] mod n = (a x b) mod n
[(11 mod 8 ) x (15 mod 8)] mod 8= 21 mod 8 = 5
(11 x 15) mod 8 = 165 mod 8 = 5
Property Expression
Cummitative Laws (w + x) mod n = (x + w) mod n
(w x x) mod n = (x x w) mod n
Associative Laws [(w + x) + y] mod n = [w + (x + y)] mod n
[(w x x) x y] mod n = [w x (x x y)] mod n
Distributive Law [w x (x + y)] mod n = [(w x x) + (w x y)] mod n
Identities (0 + w) mod n = w mod n
(1 x w) mod n = w mod n
Additive Inverse (-w) For each w Zn, there exists a z such that w + z ≡ 0 mod n
THANK YOU

More Related Content

What's hot

Number theory
Number theory Number theory
Number theory tes31
 
Divisibility
DivisibilityDivisibility
Divisibilitymstf mstf
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiersblaircomp2003
 
Group abstract algebra
Group  abstract algebraGroup  abstract algebra
Group abstract algebraNaliniSPatil
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equationsswartzje
 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principlenielsoli
 
Introduction to Modular Arithmetic
Introduction to  Modular ArithmeticIntroduction to  Modular Arithmetic
Introduction to Modular ArithmeticEFREN ARCHIDE
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functionssuthi
 
21 monotone sequences x
21 monotone sequences x21 monotone sequences x
21 monotone sequences xmath266
 
A study on number theory and its applications
A study on number theory and its applicationsA study on number theory and its applications
A study on number theory and its applicationsItishree Dash
 

What's hot (20)

Number theory
Number theory Number theory
Number theory
 
Divisibility
DivisibilityDivisibility
Divisibility
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
Group abstract algebra
Group  abstract algebraGroup  abstract algebra
Group abstract algebra
 
Set Theory Presentation
Set Theory PresentationSet Theory Presentation
Set Theory Presentation
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equations
 
Radicals
RadicalsRadicals
Radicals
 
Set in discrete mathematics
Set in discrete mathematicsSet in discrete mathematics
Set in discrete mathematics
 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principle
 
Presentation binomial theorem
Presentation binomial theoremPresentation binomial theorem
Presentation binomial theorem
 
Introduction to Modular Arithmetic
Introduction to  Modular ArithmeticIntroduction to  Modular Arithmetic
Introduction to Modular Arithmetic
 
Set Theory
Set TheorySet Theory
Set Theory
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functions
 
Sample Space And Events
Sample Space And EventsSample Space And Events
Sample Space And Events
 
Proof by contradiction
Proof by contradictionProof by contradiction
Proof by contradiction
 
Number Theory - Lesson 1 - Introduction to Number Theory
Number Theory - Lesson 1 - Introduction to Number TheoryNumber Theory - Lesson 1 - Introduction to Number Theory
Number Theory - Lesson 1 - Introduction to Number Theory
 
Eulers totient
Eulers totientEulers totient
Eulers totient
 
21 monotone sequences x
21 monotone sequences x21 monotone sequences x
21 monotone sequences x
 
Graphs - Discrete Math
Graphs - Discrete MathGraphs - Discrete Math
Graphs - Discrete Math
 
A study on number theory and its applications
A study on number theory and its applicationsA study on number theory and its applications
A study on number theory and its applications
 

Similar to Modular arithmetic

Cryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxCryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxAbhinav816839
 
555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.pptSnehSinha6
 
NumberTheory.ppt
NumberTheory.pptNumberTheory.ppt
NumberTheory.pptDhandhan16
 
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
ADVANCED   ALGORITHMS-UNIT-3-Final.pptADVANCED   ALGORITHMS-UNIT-3-Final.ppt
ADVANCED ALGORITHMS-UNIT-3-Final.pptssuser702532
 
267 4 determinant and cross product-n
267 4 determinant and cross product-n267 4 determinant and cross product-n
267 4 determinant and cross product-nmath260
 
matrices and determinantes
matrices and determinantes matrices and determinantes
matrices and determinantes gandhinagar
 
Introduction of determinant
Introduction of determinantIntroduction of determinant
Introduction of determinantPankaj Das
 
"Mesh of Periodic Minimal Surfaces in CGAL."
"Mesh of Periodic Minimal Surfaces in CGAL.""Mesh of Periodic Minimal Surfaces in CGAL."
"Mesh of Periodic Minimal Surfaces in CGAL."Vissarion Fisikopoulos
 
chp-1-matrices-determinants1.ppt
chp-1-matrices-determinants1.pptchp-1-matrices-determinants1.ppt
chp-1-matrices-determinants1.pptMichealMicheal11
 
Dot product calc angle to finish!
Dot product calc angle to finish!Dot product calc angle to finish!
Dot product calc angle to finish!Shaun Wilson
 
Computer graphics
Computer graphicsComputer graphics
Computer graphicsBala Murali
 

Similar to Modular arithmetic (20)

2.ppt
2.ppt2.ppt
2.ppt
 
Matdis 3.4
Matdis 3.4Matdis 3.4
Matdis 3.4
 
new 2.ppt
new 2.pptnew 2.ppt
new 2.ppt
 
Cryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxCryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docx
 
555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.ppt
 
ikh323-05
ikh323-05ikh323-05
ikh323-05
 
Lec_4.pdf
Lec_4.pdfLec_4.pdf
Lec_4.pdf
 
NumberTheory.ppt
NumberTheory.pptNumberTheory.ppt
NumberTheory.ppt
 
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
ADVANCED   ALGORITHMS-UNIT-3-Final.pptADVANCED   ALGORITHMS-UNIT-3-Final.ppt
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
 
267 4 determinant and cross product-n
267 4 determinant and cross product-n267 4 determinant and cross product-n
267 4 determinant and cross product-n
 
Algebra
Algebra Algebra
Algebra
 
factoring
factoringfactoring
factoring
 
03-Numbers-D.pdf
03-Numbers-D.pdf03-Numbers-D.pdf
03-Numbers-D.pdf
 
matrices and determinantes
matrices and determinantes matrices and determinantes
matrices and determinantes
 
Introduction of determinant
Introduction of determinantIntroduction of determinant
Introduction of determinant
 
"Mesh of Periodic Minimal Surfaces in CGAL."
"Mesh of Periodic Minimal Surfaces in CGAL.""Mesh of Periodic Minimal Surfaces in CGAL."
"Mesh of Periodic Minimal Surfaces in CGAL."
 
chp-1-matrices-determinants1.ppt
chp-1-matrices-determinants1.pptchp-1-matrices-determinants1.ppt
chp-1-matrices-determinants1.ppt
 
Dot product calc angle to finish!
Dot product calc angle to finish!Dot product calc angle to finish!
Dot product calc angle to finish!
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Finite fields
Finite fields Finite fields
Finite fields
 

Recently uploaded

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 

Recently uploaded (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

Modular arithmetic

  • 2. DEFINITION : • Let a, b and n are integers and n > 0. We write a ≡ b mod n if and only if n divides a − b. n is called the modulus. b is called the remainder. For Example: 29 ≡ 15 mod 7 because 7|(29 − 15) 12 ≡ 3 mod 9 ; 3 is a valid remainder since 9 divides 12 − 3 12 ≡ 21 mod 9 ; 21 is a valid remainder since 9 divides 12 − 21 12 ≡ −6 mod 9 ; −6 is a valid remainder since 9 divides −6 − 3
  • 3. 1. a  b (mod n) if n|(a-b) 2. a  b (mod n) implies b  a (mod n) 3. a  b (mod n) and b  c (mod n) imply a  c (mod n) Proof of 1. If n|(a-b), then (a-b) = kn for some k. Thus, we can write a = b + kn. Therefore, (a mod n) = (remainder when b + kn is divided by n) = (remainder when b is divided by n) (b mod n). 23  8 (mod 5) because 23 -8 =15 = 5x3 -11  5 (mod 8) because -11-5 =-16 = 8x(-2) 81  0 (mod 27) because 81-0=81 = 27x3
  • 4. TYPES OF MODULAR ARITHMETIC: • We can add and subtract congruent elements without losing congruence: [(a mod n) + (b mod n)] mod n = (a + b) mod n [(a mod n) - (b mod n)] mod n = (a - b) mod n • Multiplication also works: [(a mod n) x (b mod n)] mod n = (a x b) mod n Proof of 1. Let (a mod n) = Ra and (b mod n) = Rb. Then, we can write a = Ra + jn for some integer j and b = Rb + kn for some integer k. (a + b) mod n = (Ra + jn + Rb + kn) mod n = [Ra + Rb + (k + j) n] mod n = (Ra + Rb) mod n = [(a mod n) + (b mod n)] mod n
  • 5. EXAMPLES : • [(a mod n) + (b mod n)] mod n = (a + b) mod n 11 mod 8 = 3; 15 mod 8 = 7 [(11 mod 8 ) + (15 mod 8)] mod 8 = 10 mod 8 = 2 (11 + 15) mod 8 = 26 mod 8 = 2 • [(a mod n) - (b mod n)] mod n = (a - b) mod n [(11 mod 8 ) - (15 mod 8)] mod 8 = -4 mod 8 = 4 (11 - 15) mod 8 = -4 mod 8 = 4 • [(a mod n) x (b mod n)] mod n = (a x b) mod n [(11 mod 8 ) x (15 mod 8)] mod 8= 21 mod 8 = 5 (11 x 15) mod 8 = 165 mod 8 = 5
  • 6. Property Expression Cummitative Laws (w + x) mod n = (x + w) mod n (w x x) mod n = (x x w) mod n Associative Laws [(w + x) + y] mod n = [w + (x + y)] mod n [(w x x) x y] mod n = [w x (x x y)] mod n Distributive Law [w x (x + y)] mod n = [(w x x) + (w x y)] mod n Identities (0 + w) mod n = w mod n (1 x w) mod n = w mod n Additive Inverse (-w) For each w Zn, there exists a z such that w + z ≡ 0 mod n