upgrade
upgrade

🧩Discrete Mathematics

Key Number Theory Concepts

Study smarter with Fiveable

Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.

Get Started

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 aa is divisible by bb if there exists an integer kk such that a=bka = b \cdot k
  • Division algorithm guarantees that for integers aa and bb (with b>0b > 0), unique integers qq and rr exist where a=bq+ra = bq + r and 0r<b0 \leq 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)\gcd(a, b) = \gcd(b, a \mod b)
  • Extended Euclidean algorithm finds integers xx and yy such that ax+by=gcd(a,b)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)=abgcd(a,b)\text{LCM}(a, b) = \frac{|a \cdot b|}{\gcd(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)=ab\gcd(a,b) \cdot \text{lcm}(a,b) = |a \cdot 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=cax + by = c where a,b,ca, b, c are integers and we seek integer solutions for x,yx, y
  • Existence criterion is elegant: solutions exist if and only if gcd(a,b)\gcd(a, b) divides cc
  • 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 mm, reducing infinite integers to a finite set {0,1,...,m1}\{0, 1, ..., m-1\}
  • Congruence notation ab(modm)a \equiv b \pmod{m} means aa and bb have the same remainder when divided by mmequivalently, mm divides (ab)(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 ab(modm)a \equiv b \pmod{m}, then a+cb+c(modm)a + c \equiv b + c \pmod{m} and acbc(modm)a \cdot c \equiv b \cdot c \pmod{m}
  • Division caveat—you can only divide both sides by cc if gcd(c,m)=1\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 pp is prime and gcd(a,p)=1\gcd(a, p) = 1, then ap11(modp)a^{p-1} \equiv 1 \pmod{p}
  • Corollary form—for any integer aa, we have apa(modp)a^p \equiv a \pmod{p}, even when pp divides aa
  • 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\gcd(a, n) = 1, then aϕ(n)1(modn)a^{\phi(n)} \equiv 1 \pmod{n}
  • Totient function ϕ(n)\phi(n) counts integers from 1 to nn that are coprime to nnfor prime pp, ϕ(p)=p1\phi(p) = p - 1
  • Totient formulas for prime powers: ϕ(pk)=pkpk1\phi(p^k) = p^k - p^{k-1}; for coprimes: ϕ(mn)=ϕ(m)ϕ(n)\phi(mn) = \phi(m)\phi(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=pn = p is prime, ϕ(p)=p1\phi(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,...,mkm_1, m_2, ..., m_k, a system of congruences xai(modmi)x \equiv a_i \pmod{m_i} has a unique solution modulo M=m1m2mkM = m_1 \cdot m_2 \cdots m_k
  • 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

ConceptBest Examples
Divisibility foundationsDivision algorithm, GCD, LCM
Efficient computationEuclidean algorithm, Extended Euclidean algorithm
Unique factorizationFundamental Theorem of Arithmetic, prime factorization
Integer equationsLinear Diophantine equations, existence via GCD
Modular systemsCongruences, modular arithmetic properties
Prime modulus theoremsFermat's Little Theorem
General modulus theoremsEuler's Theorem, totient function
Simultaneous congruencesChinese Remainder Theorem

Self-Check Questions

  1. What condition must be satisfied for the linear Diophantine equation ax+by=cax + by = c to have integer solutions, and how does this connect to the Euclidean algorithm?

  2. 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?

  3. If you need to find gcd(252,198)\gcd(252, 198), which method would be more efficient—prime factorization or the Euclidean algorithm? Trace through the steps of your chosen method.

  4. Why does the Chinese Remainder Theorem require the moduli to be pairwise coprime? What would go wrong if gcd(m1,m2)>1\gcd(m_1, m_2) > 1?

  5. Given that ab(modm)a \equiv b \pmod{m} and cd(modm)c \equiv d \pmod{m}, explain why you can conclude acbd(modm)ac \equiv bd \pmod{m} but cannot always conclude acbd(modm)\frac{a}{c} \equiv \frac{b}{d} \pmod{m}.