A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Möbius Function and Möbius Inversion

Graduate Depth 78 in the knowledge graph ☐ I know this ☆ Set as goal
369prerequisites beneath it
See this on the map →
Arithmetic Functions and Multiplicativity→
möbius-function möbius-inversion number-theoretic-functions

Core Idea

The Möbius function μ(n) is defined via prime factorization: μ(n) = 0 if n has a squared prime factor, 1 if n is a product of an even number of distinct primes, and −1 for an odd number. Möbius inversion is a powerful technique: if g(n) = Σ_{d|n} f(d), then f(n) = Σ_{d|n} μ(n/d)g(d).

How It's Best Learned

Study the Möbius function through examples and its multiplicativity. Apply Möbius inversion to derive φ(n) = Σ_{d|n} μ(n/d)·d.

Common Misconceptions

The Möbius function depends crucially on prime factorization; μ(p) = −1 only for primes. Möbius inversion requires a summing function; it doesn't apply to all function relationships.

Explainer

The Möbius function μ(n) is a number-theoretic tool that encodes information about the squarefree structure of an integer. Recall from your study of arithmetic functions and multiplicativity that a function is multiplicative if f(mn) = f(m)f(n) whenever gcd(m, n) = 1. The Möbius function is multiplicative, which makes it tractable to compute and work with. Its values are simple: μ(1) = 1; μ(n) = 0 if n has any squared prime factor (i.e., p² | n for some prime p); and if n = p₁p₂⋯pₖ is squarefree, then μ(n) = (−1)ᵏ — positive if k is even, negative if k is odd.

To build intuition, compute a few values. μ(6) = μ(2·3) = (−1)² = 1. μ(30) = μ(2·3·5) = (−1)³ = −1. μ(12) = μ(4·3) = 0 because 4 = 2² is a squared factor. The function oscillates between −1, 0, and 1, with zeroes at numbers divisible by any perfect square greater than 1. A foundational identity is Σ_{d|n} μ(d) = [n = 1], meaning the sum of μ over all divisors of n equals 1 if n = 1 and 0 otherwise. This is the key property that makes Möbius inversion work.

Möbius inversion is the technique: if you know that g(n) = Σ_{d|n} f(d) — that is, g is the "summatory" version of f over divisors — then you can recover f from g by f(n) = Σ_{d|n} μ(n/d)·g(d). Think of it as an inverse operation for the divisor-sum transform, analogous to how subtraction inverts addition. The proof uses the identity above: when you substitute the formula for g and rearrange, the μ-weighted sums collapse to [d = 1], isolating f(n).

The canonical application is deriving a formula for Euler's totient function φ(n). We know that Σ_{d|n} φ(d) = n — counting integers from 1 to n grouped by their gcd with n. This has the form g(n) = Σ_{d|n} f(d) with g(n) = n and f(n) = φ(n). Möbius inversion immediately gives φ(n) = Σ_{d|n} μ(n/d)·d, a formula that would be tedious to derive otherwise. More broadly, whenever a function in number theory is defined as a sum over divisors, Möbius inversion is the tool that peels it apart — it is the "deconvolution" operation for Dirichlet convolution, the multiplication structure that underlies all multiplicative arithmetic functions.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Divisibility and Greatest Common Divisor → The Fundamental Theorem of Arithmetic → Fundamental Theorem of Arithmetic (Rigorous) → Arithmetic Functions and Multiplicativity → Möbius Function and Möbius Inversion

Longest path: 79 steps · 369 total prerequisite topics

Prerequisites (1)

Leads To (0)

No topics depend on this one yet.