SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
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

PPTX
Modular arithmetic
PPTX
modular arithmetic
PPTX
ABSTRACT ALGEBRA
PPTX
Section 9: Equivalence Relations & Cosets
PDF
A study on number theory and its applications
PPTX
5.4 mathematical induction
PPT
Number theory
ODP
Linear cong slide 2
Modular arithmetic
modular arithmetic
ABSTRACT ALGEBRA
Section 9: Equivalence Relations & Cosets
A study on number theory and its applications
5.4 mathematical induction
Number theory
Linear cong slide 2

What's hot (20)

PPTX
Principle of mathematical induction
PPTX
Method of direct proof
PPT
Number theory
PPTX
Permutations and combinations ppt
PPTX
Mathematical induction
PPT
Predicates and Quantifiers
PPTX
Section 11: Normal Subgroups
PPTX
Chapter 4 Cyclic Groups
PPTX
Divisibility
PDF
Isomorphism
PPTX
Eucledian algorithm for gcd of integers and polynomials
PPTX
Permutation & Combination
PPTX
Mathematical Induction
PPT
Inverse functions
PDF
Number Theory - Lesson 1 - Introduction to Number Theory
PPTX
Presentation on inverse matrix
PPTX
vector space and subspace
PPTX
Basics of Counting Techniques
PDF
Dm2021 binary operations
PPT
Permutations & Combinations
Principle of mathematical induction
Method of direct proof
Number theory
Permutations and combinations ppt
Mathematical induction
Predicates and Quantifiers
Section 11: Normal Subgroups
Chapter 4 Cyclic Groups
Divisibility
Isomorphism
Eucledian algorithm for gcd of integers and polynomials
Permutation & Combination
Mathematical Induction
Inverse functions
Number Theory - Lesson 1 - Introduction to Number Theory
Presentation on inverse matrix
vector space and subspace
Basics of Counting Techniques
Dm2021 binary operations
Permutations & Combinations
Ad

Similar to Modular arithmetic (20)

PPTX
Interpreting Numerical Expressions Math Presentation in Light Blue Math Do_20...
PDF
modulo.pdf mathematics made easy for shs
PDF
03-Numbers-D.pdf
PDF
013-number-theory-properties-in-science.pdf
PPT
ModularArithmetic.pptDDDDDDDDDDDDDDDDDDDDDDDDD
DOCX
Cryptography and Network Security Principles and Practice.docx
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPT
Modular Arithmetic and congruence of integers.ppt
PPT
Modular Arithmetic concept in mathematics
PPT
cryptography for students and for learning
PPTX
Chapter4.pptx
PDF
Ch4.pdf
PDF
modul pembelajaran 4
PPT
ch04_crypotography_william_stallings slides
PPTX
dicrete_chap4.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PPT
Cryptography and Network Security chapter 4.ppt
PPTX
525330712-MODULAR-ARITHMETIC.pptx shshs hz
PPTX
Report.AbstractMod.pptxeduction file to help understand the lesson
PPT
Interpreting Numerical Expressions Math Presentation in Light Blue Math Do_20...
modulo.pdf mathematics made easy for shs
03-Numbers-D.pdf
013-number-theory-properties-in-science.pdf
ModularArithmetic.pptDDDDDDDDDDDDDDDDDDDDDDDDD
Cryptography and Network Security Principles and Practice.docx
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
Modular Arithmetic and congruence of integers.ppt
Modular Arithmetic concept in mathematics
cryptography for students and for learning
Chapter4.pptx
Ch4.pdf
modul pembelajaran 4
ch04_crypotography_william_stallings slides
dicrete_chap4.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Cryptography and Network Security chapter 4.ppt
525330712-MODULAR-ARITHMETIC.pptx shshs hz
Report.AbstractMod.pptxeduction file to help understand the lesson
Ad

Recently uploaded (20)

PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
System and Network Administration Chapter 2
PDF
Design an Analysis of Algorithms II-SECS-1021-03
wealthsignaloriginal-com-DS-text-... (1).pdf
Designing Intelligence for the Shop Floor.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PTS Company Brochure 2025 (1).pdf.......
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Operating system designcfffgfgggggggvggggggggg
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Understanding Forklifts - TECH EHS Solution
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Wondershare Filmora 15 Crack With Activation Key [2025
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Internet Downloader Manager (IDM) Crack 6.42 Build 41
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
System and Network Administration Chapter 2
Design an Analysis of Algorithms II-SECS-1021-03

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