Why This Matters
Number theory forms the mathematical backbone of modern computing and cryptography—and discrete math exams know it. You're being tested on your ability to understand divisibility relationships, modular systems, and the elegant theorems that connect them. These concepts don't exist in isolation; they build on each other, from basic divisibility all the way up to the cryptographic applications that secure your online transactions.
Don't just memorize definitions and formulas. For each concept, know why it works, how it connects to other ideas, and when you'd apply it. Can you explain why the Euclidean algorithm is efficient? Do you see how Euler's Theorem generalizes Fermat's Little Theorem? These connections are exactly what FRQ prompts target. Master the underlying logic, and the individual facts will stick.
Foundations: Divisibility and Division
These concepts establish the ground rules for how integers relate to each other. Every theorem that follows depends on understanding what it means for one number to divide another.
Divisibility and Division Algorithm
- Divisibility definition—a number a is divisible by b if there exists an integer k such that a=b⋅k
- Division algorithm guarantees that for integers a and b (with b>0), unique integers q and r exist where a=bq+r and 0≤r<b
- Divisibility rules provide shortcuts for checking factors without full computation—essential for quick work on timed exams
Greatest Common Divisor (GCD) and Euclidean Algorithm
- GCD is the largest positive integer that divides both numbers without remainder—the foundation for simplifying fractions and solving equations
- Euclidean algorithm computes GCD efficiently by repeatedly applying the division algorithm: gcd(a,b)=gcd(b,amodb)
- Extended Euclidean algorithm finds integers x and y such that ax+by=gcd(a,b)—critical for solving Diophantine equations
Least Common Multiple (LCM)
- LCM is the smallest positive integer divisible by both numbers—think synchronization problems and cycle alignment
- GCD-LCM relationship connects these concepts: LCM(a,b)=gcd(a,b)∣a⋅b∣
- Applications include scheduling problems, finding common denominators, and any scenario requiring simultaneous divisibility
Compare: GCD vs. LCM—both measure divisibility relationships, but GCD finds the largest shared factor while LCM finds the smallest shared multiple. If an FRQ gives you one, you can always compute the other using gcd(a,b)⋅lcm(a,b)=∣a⋅b∣.
Prime Numbers: The Building Blocks
Primes are the atoms of number theory. Every integer greater than 1 is either prime or can be broken down into prime factors—and this decomposition is unique.
Prime Numbers and Prime Factorization
- Prime definition—a natural number greater than 1 with no positive divisors other than 1 and itself
- Fundamental Theorem of Arithmetic states every integer greater than 1 has a unique prime factorization, up to ordering of factors
- Prime factorization enables GCD/LCM computation by comparing prime power components—exam questions love this approach
Linear Diophantine Equations
- Form and definition—equations ax+by=c where a,b,c are integers and we seek integer solutions for x,y
- Existence criterion is elegant: solutions exist if and only if gcd(a,b) divides c
- General solution builds from one particular solution, generating infinitely many solutions parameterized by integers—connects directly to the Extended Euclidean Algorithm
Compare: Prime factorization vs. Euclidean algorithm for finding GCD—factorization gives conceptual insight but is computationally expensive for large numbers; the Euclidean algorithm is efficient even for massive integers. Know when to use each approach.
Modular Arithmetic: Computing with Remainders
Modular arithmetic transforms infinite integer problems into finite, cyclic systems. This is where number theory meets practical computation.
Modular Arithmetic Basics
- Core concept—work with remainders when dividing by a fixed modulus m, reducing infinite integers to a finite set {0,1,...,m−1}
- Congruence notation a≡b(modm) means a and b have the same remainder when divided by m—equivalently, m divides (a−b)
- Applications span cryptography, hash functions, computer science, and clock arithmetic—expect real-world context in exam problems
Congruences and Their Properties
- Equivalence relation properties—congruence is reflexive, symmetric, and transitive, allowing algebraic manipulation
- Arithmetic preservation—if a≡b(modm), then a+c≡b+c(modm) and a⋅c≡b⋅c(modm)
- Division caveat—you can only divide both sides by c if gcd(c,m)=1; this trips up many students
Compare: Modular addition/multiplication vs. modular division—the first two always work, but division requires the divisor to be coprime with the modulus. This distinction is crucial for solving congruence equations.
Power Theorems: Fermat and Euler
These theorems reveal deep structure in modular exponentiation. They're not just theoretical—they power modern cryptography.
Fermat's Little Theorem
- Statement—if p is prime and gcd(a,p)=1, then ap−1≡1(modp)
- Corollary form—for any integer a, we have ap≡a(modp), even when p divides a
- Applications include primality testing, reducing large exponents, and RSA cryptography foundations
Euler's Theorem and Euler's Totient Function
- Euler's Theorem generalizes Fermat: if gcd(a,n)=1, then aϕ(n)≡1(modn)
- Totient function ϕ(n) counts integers from 1 to n that are coprime to n—for prime p, ϕ(p)=p−1
- Totient formulas for prime powers: ϕ(pk)=pk−pk−1; for coprimes: ϕ(mn)=ϕ(m)ϕ(n)
Compare: Fermat's Little Theorem vs. Euler's Theorem—Fermat works only for prime moduli, while Euler handles any modulus (with coprimality). When n=p is prime, ϕ(p)=p−1, so Euler's reduces to Fermat's. Exam questions often ask you to identify which theorem applies.
Systems of Congruences: The Chinese Remainder Theorem
When you need to solve multiple congruences simultaneously, CRT provides the key. It's the bridge between local (mod each prime) and global (mod the product) perspectives.
Chinese Remainder Theorem
- Statement—for pairwise coprime moduli m1,m2,...,mk, a system of congruences x≡ai(modmi) has a unique solution modulo M=m1⋅m2⋯mk
- Coprimality requirement is essential—the moduli must share no common factors for the theorem to guarantee existence and uniqueness
- Applications include simplifying computations by breaking large moduli into smaller coprime pieces, then reconstructing—used extensively in computer algebra systems
Compare: Solving single congruences vs. systems via CRT—single congruences use basic modular arithmetic or the Extended Euclidean Algorithm, while systems require CRT's decomposition approach. FRQs may ask you to verify coprimality before applying CRT.
Quick Reference Table
|
| Divisibility foundations | Division algorithm, GCD, LCM |
| Efficient computation | Euclidean algorithm, Extended Euclidean algorithm |
| Unique factorization | Fundamental Theorem of Arithmetic, prime factorization |
| Integer equations | Linear Diophantine equations, existence via GCD |
| Modular systems | Congruences, modular arithmetic properties |
| Prime modulus theorems | Fermat's Little Theorem |
| General modulus theorems | Euler's Theorem, totient function |
| Simultaneous congruences | Chinese Remainder Theorem |
Self-Check Questions
-
What condition must be satisfied for the linear Diophantine equation ax+by=c to have integer solutions, and how does this connect to the Euclidean algorithm?
-
Compare Fermat's Little Theorem and Euler's Theorem: under what conditions does each apply, and how is Fermat's theorem a special case of Euler's?
-
If you need to find gcd(252,198), which method would be more efficient—prime factorization or the Euclidean algorithm? Trace through the steps of your chosen method.
-
Why does the Chinese Remainder Theorem require the moduli to be pairwise coprime? What would go wrong if gcd(m1,m2)>1?
-
Given that a≡b(modm) and c≡d(modm), explain why you can conclude ac≡bd(modm) but cannot always conclude ca≡db(modm).