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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesSet Operations: Union, Intersection, and ComplementProof by CasesProving by Cases and ExhaustionVacuous Truth and Trivial CasesProof by Cases (Proof by Exhaustion)Mathematical InductionDivisibility and Greatest Common DivisorThe Fundamental Theorem of ArithmeticFundamental Theorem of Arithmetic (Rigorous)Arithmetic Functions and MultiplicativityMö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.