The Ring of Arithmetic Functions

Take two functions on the positive integers, ff and gg. Ask: what is the "right" way to multiply them? Ordinary pointwise multiplication f(n)g(n)f(n)g(n) turns out to be arithmetically shallow. It does not interact well with the multiplicative structure of nn itself. There is a different multiplication, Dirichlet Convolution. It is defined by summing f(d)g(n/d)f(d)g(n/d) over divisors dd of nn. This operation quietly governs identities like ∑d∣nϕ(d)=n\sum_{d\mid n}\phi(d) = n. It also governs the relationship between d(n)d(n), σ(n)\sigma(n), and the Möbius function μ\mu. The key structural discovery is due in spirit to Dirichlet. It was made fully rigorous in the twentieth century. Arithmetic functions under addition and convolution form a genuine algebraic ring — in fact an integral domain. This is not a cosmetic observation. Once we know we are working inside a ring, we inherit a vast amount of machinery for free. This includes an identity element, invertibility criteria, and uniqueness of inverses. It also gives a clean framework in which formulas like Möbius inversion become instances of "multiply both sides by the inverse of μ\mu." They are not mysterious combinatorial tricks. The big picture is that number theory constantly produces functions n↦f(n)n \mapsto f(n) built from divisor sums. Dirichlet convolution is exactly the operation under which these sums compose. Recognizing the ring structure explains why so many classical identities have the same shape. It also isolates precisely which functions are invertible (those with f(1)≠0f(1) \neq 0). This fact will be the engine behind Möbius inversion. This article builds the ring from scratch. We define it rigorously, and prove it is a commutative ring with identity. We characterize its units, and show it has no zero divisors. Along the way we verify every claim with explicit computations. So the abstract statement "arithmetic functions form a ring" is backed by concrete, checkable arithmetic.

Key takeaways
  • Arithmetic functions are maps f:Z≥1→Cf:\mathbb{Z}_{\ge 1}\to\mathbb{C}; pointwise addition is the obvious group operation.
  • Dirichlet Convolution (f∗g)(n)=∑d∣nf(d)g(n/d)(f*g)(n)=\sum_{d\mid n}f(d)g(n/d) is the multiplication that respects divisor structure.
  • The set of arithmetic functions with (+,∗)(+,*) is a commutative ring with identity ε\varepsilon, where ε(1)=1\varepsilon(1)=1, ε(n)=0\varepsilon(n)=0 for n>1n>1.
  • A function ff is a unit (has a convolution inverse) iff f(1)≠0f(1)\neq 0; the inverse is computed by a recursive formula.
  • The ring has no zero divisors: f∗g=0f*g=0 forces f=0f=0 or g=0g=0, so it is an integral domain.
  • The Mobius Function μ\mu is the convolution inverse of the constant function 1\mathbf{1}, which is the seed for Möbius inversion.
  • Key idea: Divisor-sum identities in number theory are ring computations in disguise, and this ring's units, zero-divisor-freeness, and identity element are exactly what make inversion techniques like Möbius inversion work.

Where this lives today

The ring (A,+,∗)(A,+,*) is the algebraic backbone underlying Möbius inversion: since 1\mathbf{1} (the constant function 1(n)=1\mathbf{1}(n)=1) satisfies 1(1)=1≠0\mathbf{1}(1)=1\neq 0, it is a unit, and its inverse is exactly The Mobius Function μ\mu, satisfying 1∗μ=ε\mathbf{1} * \mu = \varepsilon. This single ring fact — that μ\mu is the convolution inverse of 1\mathbf{1} — is the entire content of Möbius inversion, foreshadowing how identities like F=1∗fF = \mathbf{1} * f can be "solved" for ff as f=μ∗Ff = \mu * F. Beyond pure number theory, this convolution structure recurs in analytic number theory via Dirichlet series, where (A,∗)(A,*) corresponds to formal multiplication of series ∑f(n)n−s\sum f(n)n^{-s}; the Riemann zeta function ζ(s)=∑n−s\zeta(s) = \sum n^{-s} corresponds to 1\mathbf{1}, and 1/ζ(s)=∑μ(n)n−s1/\zeta(s) = \sum \mu(n) n^{-s} is exactly the statement 1−1=μ\mathbf{1}^{-1} = \mu translated into analytic language. In combinatorics, the same convolution appears as the incidence algebra of the divisor poset, generalized by Rota to arbitrary locally finite posets — the arithmetic-function ring is the special case of the divisibility poset on Z≥1\mathbb{Z}_{\ge1}. In cryptography and computational number theory, fast computation of multiplicative functions (Euler's totient, sum-of-divisors) via convolution identities underlies efficient algorithms for RSA-adjacent computations and sieve methods. In algebra, the ring of arithmetic functions is a standard example of an integral domain that is not a field, useful for illustrating unit groups and zero-divisor-free rings in a concrete, computable setting, connecting to the broader theory of Dirichlet Convolution as an instance of convolution algebras.

Ask the tutor: How does the identity 1−1=μ\mathbf{1}^{-1} = \mu proved here directly yield the Möbius inversion formula?

DefinitionThe ring of arithmetic functions

An arithmetic function is a function f:Z≥1→Cf:\mathbb{Z}_{\ge 1}\to\mathbb{C}. Let AA denote the set of all arithmetic functions. Define two binary operations on AA:

Addition. For f,g∈Af,g\in A,

(f+g)(n):=f(n)+g(n)for all n≥1.(f+g)(n) := f(n) + g(n) \quad\text{for all } n\ge 1.

Dirichlet convolution. For f,g∈Af,g \in A,

(f∗g)(n):=∑d∣nf(d) g ⁣(nd)for all n≥1,(f*g)(n) := \sum_{d\mid n} f(d)\,g\!\left(\frac{n}{d}\right) \quad\text{for all } n\ge 1,

where the sum runs over all positive divisors dd of nn. Define two special elements of AA:

  • The zero function 00, with 0(n)=00(n)=0 for all nn.
  • The convolution identity ε∈A\varepsilon \in A, defined by
ε(n)={1n=10n>1.\varepsilon(n) = \begin{cases} 1 & n=1 \\ 0 & n>1.\end{cases}

The claim of this article is that (A,+,∗)(A, +, *) is a commutative ring with additive identity 00 and multiplicative identity ε\varepsilon, and moreover that it is an integral domain whose units are precisely the ff with f(1)≠0f(1)\neq 0.

Intuition

Think of an arithmetic function ff as an infinite table of numbers, one entry f(1),f(2),f(3),…f(1), f(2), f(3),\dots for each positive integer. Addition is entrywise, exactly like adding two vectors or two sequences: nothing about the multiplicative structure of the index nn is used. But Dirichlet convolution is different in a crucial way — to compute (f∗g)(n)(f*g)(n), you must know the factorization structure of nn, because you sum over pairs (d,n/d)(d, n/d) with dn/d=nd n/d = n. This is why convolution "sees" primes and divisors while pointwise multiplication does not. A good mental picture is a divisor lattice. For n=12n=12, the divisors are 1,2,3,4,6,121,2,3,4,6,12, and (f∗g)(12)(f*g)(12) pairs each divisor dd with its complementary divisor 12/d12/d: (1,12),(2,6),(3,4),(4,3),(6,2),(12,1)(1,12), (2,6), (3,4), (4,3), (6,2), (12,1). The sum ∑f(d)g(12/d)\sum f(d)g(12/d) walks across this lattice symmetrically. This is exactly why convolution is commutative — swapping ff and gg just relabels which factor in each pair is "ff's divisor" versus "gg's divisor," and the same six pairs get hit either way. The identity element ε\varepsilon works like a Kronecker delta sitting at n=1n=1: convolving with ε\varepsilon contributes only the term d=1d=1 (giving f(n)⋅ε(1)⋅f(n)\cdot\varepsilon(1)\cdot nothing else, since every other term has ε(n/d)=0\varepsilon(n/d)=0 unless n/d=1n/d=1). So ε\varepsilon silently "does nothing," just as 11 does nothing under ordinary multiplication.

Figure
Divisor pairs of n=12n=12 contributing to (f∗g)(12)(f*g)(12)
Divisor pairs (d, 12/d) of n = 12 d=1 d=2 d=3 d=4 d=6 d=12 12/d=12 12/d=6 12/d=4 12/d=3 12/d=2 12/d=1 (f*g)(12) = f(1)g(12)+f(2)g(6)+f(3)g(4)+f(4)g(3)+f(6)g(2)+f(12)g(1)

The central theorem

TheoremThe ring of arithmetic functions

Let AA be the set of arithmetic functions f:Z≥1→Cf:\mathbb{Z}_{\ge1}\to\mathbb{C}, with addition ++ and Dirichlet convolution ∗* as defined above. Then: 1. (A,+)(A,+) is an abelian group with identity 00. 2. ∗* is commutative and associative on AA, and distributes over ++. 3. ε\varepsilon is a multiplicative identity for ∗*: f∗ε=ε∗f=ff * \varepsilon = \varepsilon * f = f for all f∈Af \in A. 4. Consequently, (A,+,∗)(A, +, *) is a commutative ring with unity. 5. (A,+,∗)(A,+,*) has no zero divisors: if f,g∈Af, g \in A and f∗g=0f*g = 0, then f=0f = 0 or g=0g = 0. Hence AA is an integral domain. 6. f∈Af \in A is a unit of the ring (i.e. has a multiplicative inverse under ∗*) if and only if f(1)≠0f(1) \neq 0. When f(1)≠0f(1)\neq 0, the inverse f−1f^{-1} is the unique arithmetic function satisfying

f−1(1)=1f(1),f−1(n)=−1f(1)∑d∣nd<nf ⁣(nd)f−1(d)(n>1).f^{-1}(1) = \frac{1}{f(1)}, \qquad f^{-1}(n) = \frac{-1}{f(1)} \sum_{\substack{d\mid n \\ d < n}} f\!\left(\frac{n}{d}\right) f^{-1}(d) \quad (n>1).
Proof

We prove each part in turn. Throughout, n,d,en, d, e denote positive integers, and all sums over "d∣nd\mid n" run over the positive divisors of nn.

Part 1: (A,+)(A,+) is an abelian group. This is immediate since A=CZ≥1A = \mathbb{C}^{\mathbb{Z}_{\ge1}} as a set, and addition is defined coordinatewise. Coordinatewise addition of complex numbers is associative and commutative because addition in C\mathbb{C} is. The function 00 is the additive identity since (f+0)(n)=f(n)+0=f(n)(f+0)(n) = f(n)+0=f(n) for every nn. The additive inverse of ff is −f-f, defined by (−f)(n):=−f(n)(-f)(n) := -f(n), since (f+(−f))(n)=f(n)−f(n)=0(f+(-f))(n) = f(n) - f(n) = 0. This establishes (A,+)(A,+) as an abelian group.

Part 2: ∗* is commutative, associative, and distributes over ++. Commutativity. Fix f,g∈Af,g \in A and n≥1n \ge 1. As dd ranges over all divisors of nn, so does n/dn/d, and the map d↦n/dd \mapsto n/d is a bijection from the divisor set of nn to itself (it is its own inverse). Hence

(f∗g)(n)=∑d∣nf(d)g(n/d)=∑d∣nf(n/d)g(d)=∑d∣ng(d)f(n/d)=(g∗f)(n),(f*g)(n) = \sum_{d\mid n} f(d) g(n/d) = \sum_{d\mid n} f(n/d) g(d) = \sum_{d \mid n} g(d) f(n/d) = (g*f)(n),

where the middle equality is the substitution d↦n/dd \mapsto n/d applied to the index of summation (a relabeling of a finite sum, valid since the map is a bijection of the index set to itself). Since nn was arbitrary, f∗g=g∗ff*g = g*f. Associativity. Fix f,g,h∈Af,g,h\in A and n≥1n\ge1. We show both (f∗g)∗h(f*g)*h and f∗(g∗h)f*(g*h) evaluated at nn equal the triple sum

S(n):=∑a,b,c≥1abc=nf(a) g(b) h(c),S(n) := \sum_{\substack{a,b,c \ge 1\\ abc = n}} f(a)\,g(b)\,h(c),

where the sum is over all ordered triples of positive integers with product nn (there are finitely many, since each of a,b,ca,b,c divides nn). Compute directly:

((f∗g)∗h)(n)=∑c∣n(f∗g)(n/c) h(c)=∑c∣n(∑a∣(n/c)f(a)g ⁣(n/ca))h(c).((f*g)*h)(n) = \sum_{c \mid n} (f*g)(n/c)\, h(c) = \sum_{c\mid n} \left(\sum_{a \mid (n/c)} f(a) g\!\left(\frac{n/c}{a}\right)\right) h(c).

For fixed c∣nc \mid n, as aa ranges over divisors of n/cn/c, set b=(n/c)/ab = (n/c)/a, so abc=nabc = n and a,b,ca,b,c range exactly over the triples with abc=nabc=n and this particular cc. Hence the double sum over (a,c)(a,c) with c∣nc\mid n, a∣(n/c)a \mid (n/c) equals the sum over all triples (a,b,c)(a,b,c) with abc=nabc=n. Thus ((f∗g)∗h)(n)=S(n)((f*g)*h)(n) = S(n). By an entirely symmetric computation,

(f∗(g∗h))(n)=∑a∣nf(a)(g∗h)(n/a)=∑a∣nf(a)∑b∣(n/a)g(b)h ⁣(n/ab)=S(n),(f*(g*h))(n) = \sum_{a\mid n} f(a) (g*h)(n/a) = \sum_{a \mid n}f(a)\sum_{b \mid (n/a)} g(b) h\!\left(\frac{n/a}{b}\right) = S(n),

using the same reasoning with roles shifted. Since both equal S(n)S(n), we get (f∗g)∗h=f∗(g∗h)(f*g)*h = f*(g*h). Distributivity. For f,g,h∈Af,g,h \in A and n≥1n \ge 1,

(f∗(g+h))(n)=∑d∣nf(d)(g+h)(n/d)=∑d∣nf(d)(g(n/d)+h(n/d))(f*(g+h))(n) = \sum_{d\mid n} f(d)(g+h)(n/d) = \sum_{d\mid n} f(d)\big(g(n/d)+h(n/d)\big)
=∑d∣nf(d)g(n/d)+∑d∣nf(d)h(n/d)=(f∗g)(n)+(f∗h)(n),= \sum_{d\mid n} f(d)g(n/d) + \sum_{d\mid n} f(d) h(n/d) = (f*g)(n) + (f*h)(n),

using linearity of finite sums and distributivity in C\mathbb{C}. Hence f∗(g+h)=f∗g+f∗hf*(g+h) = f*g + f*h; by commutativity of ∗*, also (g+h)∗f=g∗f+h∗f(g+h)*f = g*f + h*f.

Part 3: ε\varepsilon is the multiplicative identity. Fix f∈Af\in A and n≥1n \ge 1. Then

(f∗ε)(n)=∑d∣nf(d) ε(n/d).(f*\varepsilon)(n) = \sum_{d\mid n} f(d)\,\varepsilon(n/d).

The term ε(n/d)\varepsilon(n/d) vanishes unless n/d=1n/d = 1, i.e. unless d=nd=n; and when d=nd=n, ε(n/d)=ε(1)=1\varepsilon(n/d) = \varepsilon(1) = 1. So the sum collapses to the single term d=nd=n:

(f∗ε)(n)=f(n)⋅1=f(n).(f*\varepsilon)(n) = f(n)\cdot 1 = f(n).

Since nn was arbitrary, f∗ε=ff * \varepsilon = f. By commutativity (Part 2), ε∗f=f∗ε=f\varepsilon * f = f*\varepsilon = f as well.

Part 4: (A,+,∗)(A,+,*) is a commutative ring with unity. By Part 1, (A,+)(A,+) is an abelian group. By Part 2, ∗* is associative, commutative, and distributes over ++ (both left and right, since ∗* is commutative and left-distributivity was shown). By Part 3, ε∈A\varepsilon \in A is a two-sided multiplicative identity. These are exactly the ring axioms, so (A,+,∗)(A,+,*) is a commutative ring with unity ε\varepsilon.

Part 5: AA has no zero divisors. Suppose f,g∈Af,g \in A with f≠0f \ne 0 and g≠0g \ne 0; we show f∗g≠0f*g \ne 0. Since f≠0f \ne 0, the set {n:f(n)≠0}\{n : f(n) \ne 0\} is nonempty; let n0n_0 be its least element. Likewise let m0m_0 be the least positive integer with g(m0)≠0g(m_0) \ne 0. Consider N:=n0m0N := n_0 m_0. We compute

(f∗g)(N)=∑d∣Nf(d) g(N/d).(f*g)(N) = \sum_{d \mid N} f(d)\, g(N/d).

We claim every term with d≠n0d \ne n_0 vanishes. Indeed, take any divisor dd of N=n0m0N = n_0 m_0 with d≠n0d \ne n_0.

  • If d<n0d < n_0: since dd is a positive integer less than n0n_0, minimality of n0n_0 gives f(d)=0f(d) = 0, so the term f(d)g(N/d)=0f(d)g(N/d) = 0.
  • If d>n0d > n_0: since d∣Nd \mid N, write N/dN/d; because d>n0d > n_0 and d∣n0m0d \mid n_0 m_0, we have N/d<m0N/d < m_0. (Indeed N/d=n0m0/d<n0m0/n0=m0N/d = n_0 m_0/d < n_0 m_0 / n_0 = m_0.) Since N/dN/d is a positive integer strictly less than m0m_0, minimality of m0m_0 gives g(N/d)=0g(N/d) = 0, so again f(d)g(N/d)=0f(d)g(N/d) = 0.

Thus every term with d≠n0d \neq n_0 vanishes, and only the term d=n0d = n_0 (for which N/d=m0N/d = m_0) can be nonzero:

(f∗g)(N)=f(n0) g(m0).(f*g)(N) = f(n_0)\, g(m_0).

By choice of n0,m0n_0, m_0, both f(n0)≠0f(n_0) \ne 0 and g(m0)≠0g(m_0) \ne 0, and since C\mathbb{C} has no zero divisors, f(n0)g(m0)≠0f(n_0)g(m_0) \ne 0. Hence (f∗g)(N)≠0(f*g)(N) \ne 0, so f∗g≠0f*g \ne 0. Contrapositively, if f∗g=0f*g = 0 then f=0f=0 or g=0g=0. Combined with Part 4 and the fact that ε≠0\varepsilon \ne 0 (since ε(1)=1≠0\varepsilon(1)=1\ne0, so AA is not the zero ring), (A,+,∗)(A,+,*) is an integral domain.

Part 6: characterization of units. (⇒\Rightarrow) Suppose ff is a unit, so there exists g∈Ag \in A with f∗g=εf * g = \varepsilon. Evaluating at n=1n=1: the only divisor of 11 is d=1d=1, so

(f∗g)(1)=f(1)g(1)=ε(1)=1.(f*g)(1) = f(1) g(1) = \varepsilon(1) = 1.

Hence f(1)g(1)=1f(1) g(1) = 1 in C\mathbb{C}, which forces f(1)≠0f(1) \ne 0 (and also g(1)=1/f(1)g(1) = 1/f(1)). (⇐\Leftarrow) Suppose f(1)≠0f(1) \ne 0. We construct g=f−1∈Ag = f^{-1} \in A satisfying f∗g=εf * g = \varepsilon, by explicit recursive definition, and simultaneously prove existence, the stated formula, and (separately) uniqueness. Existence and the formula. Define g(1):=1/f(1)g(1) := 1/f(1). For n>1n > 1, suppose g(d)g(d) has already been defined for all divisors d<nd < n of nn (this is well-founded recursion on nn, since all such dd are smaller positive integers). Define

g(n):=−1f(1)∑d∣nd<nf ⁣(nd)g(d).g(n) := \frac{-1}{f(1)} \sum_{\substack{d \mid n \\ d < n}} f\!\left(\frac{n}{d}\right) g(d).

This is a valid recursive definition of g(n)g(n) for every n≥1n \ge 1: the base case n=1n=1 has empty divisor set {d:d∣1,d<1}=∅\{d : d\mid 1, d<1\} = \varnothing (consistent with treating g(1)g(1) as the separately-specified base case), and for n>1n>1 the right side only references g(d)g(d) for d<nd < n, which are already defined. By strong induction on nn, g(n)g(n) is well-defined for every n≥1n \ge 1, giving g∈Ag \in A. We now verify f∗g=εf * g = \varepsilon. For n=1n=1: (f∗g)(1)=f(1)g(1)=f(1)⋅1f(1)=1=ε(1)(f*g)(1) = f(1)g(1) = f(1)\cdot\frac{1}{f(1)} = 1 = \varepsilon(1). For n>1n > 1: split the divisor sum by isolating d=nd=n (equivalently, the term where the "other factor" is 11):

(f∗g)(n)=∑d∣nf(n/d)g(d)=f(1)g(n)+∑d∣nd<nf(n/d)g(d).(f*g)(n) = \sum_{d\mid n} f(n/d) g(d) = f(1) g(n) + \sum_{\substack{d \mid n \\ d < n}} f(n/d) g(d).

By the defining recursion, f(1)g(n)=−∑d∣n, d<nf(n/d)g(d)f(1) g(n) = -\sum_{d\mid n,\, d<n} f(n/d) g(d). Substituting,

(f∗g)(n)=−∑d∣nd<nf(n/d)g(d)+∑d∣nd<nf(n/d)g(d)=0=ε(n).(f*g)(n) = -\sum_{\substack{d\mid n\\ d<n}} f(n/d)g(d) + \sum_{\substack{d\mid n \\ d<n}} f(n/d) g(d) = 0 = \varepsilon(n).

Hence f∗g=εf * g = \varepsilon, so (by commutativity, Part 2, and Part 3) g∗f=f∗g=εg * f = f * g = \varepsilon and gg is a genuine two-sided inverse. Thus ff is a unit whenever f(1)≠0f(1) \ne 0, proving the converse direction and simultaneously exhibiting the formula. Uniqueness. Suppose g,h∈Ag, h \in A both satisfy f∗g=ε=f∗hf * g = \varepsilon = f * h. Using associativity and commutativity (Part 2) and the identity property of ε\varepsilon (Part 3):

g=g∗ε=g∗(f∗h)=(g∗f)∗h=(f∗g)∗h=ε∗h=h.g = g * \varepsilon = g * (f * h) = (g*f)*h = (f*g)*h = \varepsilon * h = h.

So the inverse is unique whenever it exists, justifying the notation f−1f^{-1}. This completes the proof of all six parts. ■\blacksquare

∎

Worked examples

Example 1: Inverting f(n)=nf(n) = n (i.e. computing Id−1\mathrm{Id}^{-1}) at n=12n = 12. Let Id(n)=n\mathrm{Id}(n) = n. Since Id(1)=1≠0\mathrm{Id}(1) = 1 \ne 0, Part 6 guarantees an inverse g:=Id−1g := \mathrm{Id}^{-1} exists and is computed recursively:

g(1)=1Id(1)=1.g(1) = \frac{1}{\mathrm{Id}(1)} = 1.

We build up gg on the divisors of 1212: 1,2,3,4,6,121,2,3,4,6,12. g(2)g(2): divisors d<2d<2 of 22 are {1}\{1\}. Recursion: g(2)=−∑d∣2,d<2Id(2/d)g(d)=−Id(2)g(1)=−2⋅1=−2g(2) = -\sum_{d\mid 2, d<2} \mathrm{Id}(2/d) g(d) = -\mathrm{Id}(2)g(1) = -2\cdot 1 = -2. g(3)g(3): divisors d<3d<3 of 33: {1}\{1\}. g(3)=−Id(3)g(1)=−3g(3) = -\mathrm{Id}(3)g(1) = -3. g(4)g(4): divisors d<4d<4 of 44: {1,2}\{1,2\}. g(4)=−[Id(4)g(1)+Id(2)g(2)]=−[4⋅1+2⋅(−2)]=−(4−4)=0g(4) = -\big[\mathrm{Id}(4)g(1) + \mathrm{Id}(2)g(2)\big] = -\big[4\cdot 1 + 2\cdot(-2)\big] = -(4-4) = 0. g(6)g(6): divisors d<6d<6 of 66: {1,2,3}\{1,2,3\}. g(6)=−[Id(6)g(1)+Id(3)g(2)+Id(2)g(3)]=−[6(1)+3(−2)+2(−3)]=−(6−6−6)=6g(6) = -\big[\mathrm{Id}(6)g(1)+\mathrm{Id}(3)g(2)+\mathrm{Id}(2)g(3)\big] = -\big[6(1) + 3(-2) + 2(-3)\big] = -(6-6-6)=6. g(12)g(12): divisors d<12d<12 of 1212: {1,2,3,4,6}\{1,2,3,4,6\}. We need Id(12/d)\mathrm{Id}(12/d) for each:

g(12)=−[Id(12)g(1)+Id(6)g(2)+Id(4)g(3)+Id(3)g(4)+Id(2)g(6)].g(12) = -\Big[\mathrm{Id}(12)g(1) + \mathrm{Id}(6)g(2) + \mathrm{Id}(4)g(3) + \mathrm{Id}(3)g(4) + \mathrm{Id}(2)g(6)\Big].

Plug in numbers: Id(12)=12, g(1)=1\mathrm{Id}(12)=12,\ g(1)=1; Id(6)=6, g(2)=−2\mathrm{Id}(6)=6,\ g(2)=-2; Id(4)=4, g(3)=−3\mathrm{Id}(4)=4,\ g(3)=-3; Id(3)=3, g(4)=0\mathrm{Id}(3)=3,\ g(4)=0; Id(2)=2, g(6)=6\mathrm{Id}(2)=2,\ g(6)=6. So:

g(12)=−[12(1)+6(−2)+4(−3)+3(0)+2(6)]=−[12−12−12+0+12]=−(0)=0.g(12) = -\big[12(1) + 6(-2) + 4(-3) + 3(0) + 2(6)\big] = -\big[12 - 12 - 12 + 0 + 12\big] = -(0) = 0.

Check. In fact one can recognize g=μ⋅Idg = \mu \cdot \mathrm{Id} pointwise — i.e. g(n)=nμ(n)g(n) = n\mu(n) — because Id=1∗ϕ\mathrm{Id} = \mathbf{1} * \phi (Euler's identity ∑d∣nϕ(d)=n\sum_{d\mid n}\phi(d) = n) is closely related to known convolution facts, but let us verify g(n)=nμ(n)g(n) = n\mu(n) directly from our computed values: g(1)=1=1⋅μ(1)g(1)=1=1\cdot\mu(1), g(2)=−2=2μ(2)=2(−1)g(2)=-2=2\mu(2)=2(-1), g(3)=−3=3μ(3)=3(−1)g(3) = -3 = 3\mu(3) = 3(-1), g(4)=0=4μ(4)=4⋅0g(4) = 0 = 4\mu(4) = 4\cdot 0 (since 4=224=2^2 is not squarefree), g(6)=6=6μ(6)=6⋅1g(6) = 6 = 6\mu(6) = 6\cdot 1 (since 6=2⋅36=2\cdot3, μ(6)=1\mu(6)=1), g(12)=0=12μ(12)=12⋅0g(12) = 0 = 12\mu(12) = 12\cdot 0 (since 12=22⋅312 = 2^2\cdot 3 is not squarefree). Every value matches, confirming Id−1(n)=nμ(n)\mathrm{Id}^{-1}(n) = n\mu(n) and giving a fully independent numerical check of our recursive computation via The Mobius Function.

Example 2: Verifying associativity numerically for f(n)=d(n)f(n) = d(n) (number of divisors), g=μg = \mu, h(n)=nh(n) = n, at n=6n = 6. We check ((f∗g)∗h)(6)=(f∗(g∗h))(6)((f*g)*h)(6) = (f*(g*h))(6) directly, to see the associativity proof "in action" rather than trust it abstractly. Data. d(1)=1,d(2)=2,d(3)=2,d(6)=4d(1)=1,d(2)=2,d(3)=2,d(6)=4. μ(1)=1,μ(2)=−1,μ(3)=−1,μ(6)=1\mu(1)=1,\mu(2)=-1,\mu(3)=-1,\mu(6)=1. Id(n)=n\mathrm{Id}(n)=n. Step A: compute (f∗g)(n)=(d∗μ)(n)(f*g)(n) = (d*\mu)(n) for n=1,2,3,6n=1,2,3,6.

(d∗μ)(1)=d(1)μ(1)=1.(d*\mu)(1) = d(1)\mu(1) = 1.
(d∗μ)(2)=d(1)μ(2)+d(2)μ(1)=(1)(−1)+(2)(1)=1.(d*\mu)(2) = d(1)\mu(2)+d(2)\mu(1) = (1)(-1)+(2)(1) = 1.
(d∗μ)(3)=d(1)μ(3)+d(3)μ(1)=(1)(−1)+(2)(1)=1.(d*\mu)(3) = d(1)\mu(3)+d(3)\mu(1) = (1)(-1)+(2)(1) = 1.
(d∗μ)(6)=∑d′∣6d(d′)μ(6/d′)=d(1)μ(6)+d(2)μ(3)+d(3)μ(2)+d(6)μ(1)(d*\mu)(6) = \sum_{d'\mid 6} d(d')\mu(6/d') = d(1)\mu(6)+d(2)\mu(3)+d(3)\mu(2)+d(6)\mu(1)
=(1)(1)+(2)(−1)+(2)(−1)+(4)(1)=1−2−2+4=1.= (1)(1)+(2)(-1)+(2)(-1)+(4)(1) = 1 - 2 - 2 + 4 = 1.

(This matches the classical identity d∗μ=1d * \mu = \mathbf{1}... actually let's not assert unproven identities; we simply use these as raw numbers.) Step B: compute ((f∗g)∗h)(6)=((d∗μ)∗Id)(6)((f*g)*h)(6) = ((d*\mu)*\mathrm{Id})(6).

((d∗μ)∗Id)(6)=∑e∣6(d∗μ)(e) Id(6/e)=(d∗μ)(1)⋅6+(d∗μ)(2)⋅3+(d∗μ)(3)⋅2+(d∗μ)(6)⋅1((d*\mu)*\mathrm{Id})(6) = \sum_{e\mid 6} (d*\mu)(e)\,\mathrm{Id}(6/e) = (d*\mu)(1)\cdot 6 + (d*\mu)(2)\cdot 3 + (d*\mu)(3)\cdot 2 + (d*\mu)(6)\cdot 1
=(1)(6)+(1)(3)+(1)(2)+(1)(1)=6+3+2+1=12.= (1)(6) + (1)(3) + (1)(2) + (1)(1) = 6+3+2+1 = 12.

Step C: compute (g∗h)(n)=(μ∗Id)(n)(g*h)(n) = (\mu * \mathrm{Id})(n) for n=1,2,3,6n = 1,2,3,6.

(μ∗Id)(1)=μ(1)Id(1)=1.(\mu*\mathrm{Id})(1) = \mu(1)\mathrm{Id}(1) = 1.
(μ∗Id)(2)=μ(1)Id(2)+μ(2)Id(1)=(1)(2)+(−1)(1)=1.(\mu*\mathrm{Id})(2) = \mu(1)\mathrm{Id}(2)+\mu(2)\mathrm{Id}(1) = (1)(2)+(-1)(1) = 1.
(μ∗Id)(3)=μ(1)Id(3)+μ(3)Id(1)=(1)(3)+(−1)(1)=2.(\mu*\mathrm{Id})(3) = \mu(1)\mathrm{Id}(3)+\mu(3)\mathrm{Id}(1) = (1)(3)+(-1)(1) = 2.
(μ∗Id)(6)=μ(1)Id(6)+μ(2)Id(3)+μ(3)Id(2)+μ(6)Id(1)(\mu*\mathrm{Id})(6) = \mu(1)\mathrm{Id}(6)+\mu(2)\mathrm{Id}(3)+\mu(3)\mathrm{Id}(2)+\mu(6)\mathrm{Id}(1)
=(1)(6)+(−1)(3)+(−1)(2)+(1)(1)=6−3−2+1=2.= (1)(6)+(-1)(3)+(-1)(2)+(1)(1) = 6-3-2+1 = 2.

Step D: compute (f∗(g∗h))(6)=(d∗(μ∗Id))(6)(f*(g*h))(6) = (d*(\mu*\mathrm{Id}))(6).

(d∗(μ∗Id))(6)=∑e∣6d(e)(μ∗Id)(6/e)=d(1)(μ∗Id)(6)+d(2)(μ∗Id)(3)+d(3)(μ∗Id)(2)+d(6)(μ∗Id)(1)(d*(\mu*\mathrm{Id}))(6) = \sum_{e\mid 6} d(e)(\mu*\mathrm{Id})(6/e) = d(1)(\mu*\mathrm{Id})(6) + d(2)(\mu*\mathrm{Id})(3) + d(3)(\mu*\mathrm{Id})(2) + d(6)(\mu*\mathrm{Id})(1)
=(1)(2)+(2)(2)+(2)(1)+(4)(1)=2+4+2+4=12.= (1)(2) + (2)(2) + (2)(1) + (4)(1) = 2+4+2+4 = 12.

Both computations give 1212, confirming ((d∗μ)∗Id)(6)=(d∗(μ∗Id))(6)=12((d*\mu)*\mathrm{Id})(6) = (d*(\mu*\mathrm{Id}))(6) = 12, exactly as the associativity theorem (Part 2) predicts — and this matches the triple-sum formula S(6)=∑abc=6d(a)μ(b)cS(6) = \sum_{abc=6} d(a)\mu(b)c, which the reader may check directly enumerates the eight ordered triples (a,b,c)(a,b,c) with abc=6abc=6 (namely permutations arising from 6=1⋅1⋅6,1⋅2⋅3,1⋅3⋅2,1⋅6⋅1,2⋅1⋅3,2⋅3⋅1,3⋅1⋅2,3⋅2⋅1,6⋅1⋅16=1\cdot1\cdot6, 1\cdot2\cdot3,1\cdot3\cdot2,1\cdot6\cdot1,2\cdot1\cdot3,2\cdot3\cdot1,3\cdot1\cdot2,3\cdot2\cdot1,6\cdot1\cdot1, ten triples in total since 66 has three distinct prime-power patterns) and sums to 1212.

CounterexampleDropping f(1)≠0f(1)\neq 0 destroys invertibility

The unit characterization (Part 6) requires f(1)≠0f(1) \ne 0. Drop this hypothesis and consider f∈Af \in A defined by

f(n)={0n=11n>1.f(n) = \begin{cases} 0 & n = 1 \\ 1 & n > 1.\end{cases}

Here f(1)=0f(1) = 0. We show no g∈Ag \in A satisfies f∗g=εf * g = \varepsilon, so ff is not a unit, exactly as Part 6 predicts. Suppose toward contradiction g∈Ag \in A satisfies f∗g=εf*g = \varepsilon. Evaluate at n=1n=1: the only divisor of 11 is 11, so

(f∗g)(1)=f(1)g(1)=0⋅g(1)=0.(f*g)(1) = f(1) g(1) = 0 \cdot g(1) = 0.

But ε(1)=1\varepsilon(1) = 1. So (f∗g)(1)=0≠1=ε(1)(f*g)(1) = 0 \ne 1 = \varepsilon(1), contradicting f∗g=εf*g=\varepsilon. Hence ff has no convolution inverse. This shows the hypothesis f(1)≠0f(1)\ne 0 in Part 6 is not a technical artifact of the proof — it is a genuine obstruction: whenever f(1)=0f(1)=0, evaluating f∗gf * g at n=1n=1 always gives f(1)g(1)=0f(1)g(1) = 0, which can never equal ε(1)=1\varepsilon(1)=1, no matter how gg is chosen. This also illustrates why the ring (A,+,∗)(A,+,*), while an integral domain, is not a field: it has plenty of nonzero non-units, e.g. this very ff.

Scope, edge cases & common traps

SituationWhat holdsWhat fails / must be checked
f(1)≠0f(1) \ne 0ff is a unit; unique inverse exists via the recursion—
f(1)=0f(1) = 0, f≠0f \ne 0ff is a nonzero non-unit (zero divisor status still fails: AA has none)ff has no convolution inverse, even though f≠0f \ne 0
f=0f = 0ff is the additive identityff trivially fails to be a unit (as ε≠0\varepsilon \ne 0)
Pointwise product f(n)g(n)f(n)g(n)Also forms a commutative ring under ++This is a different ring from (A,+,∗)(A,+,*); it is not the one appearing in Möbius-type identities
Domain of ffMust be all of Z≥1\mathbb{Z}_{\ge 1}Restricting to squarefree nn, or to a finite set, breaks associativity proofs relying on all divisors existing

The mathematician behind it

Origins · 1 minJohann Peter Gustav Lejeune Dirichlet and how this was discovered
JP
Johann Peter Gustav Lejeune Dirichlet
1805–1859 · Prussia, analytic number theory

Dirichlet is best known for introducing analytic methods — L-functions and Dirichlet series — into the study of primes in arithmetic progressions, and for the pigeonhole principle that bears his name. The convolution now named after him arose naturally from his study of Dirichlet series: if F(s)=∑f(n)n−sF(s) = \sum f(n)n^{-s} and G(s)=∑g(n)n−sG(s) = \sum g(n) n^{-s} are two such series, their product F(s)G(s)F(s)G(s) formally expands to the Dirichlet series of f∗gf*g. This analytic origin is why the convolution respects divisor structure — it is exactly the multiplication rule that makes formal power-series-like manipulation of ∑f(n)n−s\sum f(n)n^{-s} consistent.

History
- 1837: Dirichlet proves his theorem on primes in arithmetic progressions, introducing what become Dirichlet series and characters.
- 1832: Möbius introduces the function μ(n)\mu(n) in the context of inversion formulas for number-theoretic sums.
- Late 1800s: The convolution structure (f∗g)(n)=∑d∣nf(d)g(n/d)(f*g)(n) = \sum_{d\mid n} f(d) g(n/d) is systematically used by number theorists (Mertens, and later formalized) to manipulate multiplicative identities.
- 1915–1930s: The abstract ring-theoretic viewpoint (arithmetic functions as a commutative ring, unit criterion) is crystallized, notably influenced by E. T. Bell's and others' work relating arithmetic functions to formal algebraic structures.
- Mid-20th century: The ring-theoretic framework becomes standard textbook material, appearing in treatments such as Apostol's Introduction to Analytic Number Theory and Ireland–Rosen's A Classical Introduction to Modern Number Theory.
Is (A,+,∗)(A,+,*) the same ring as functions under pointwise multiplication?

No. Both (A,+,⋅pointwise)(A,+,\cdot_{\text{pointwise}}) and (A,+,∗)(A,+,*) are commutative rings on the same underlying set AA, but they are different rings with different unit groups and different identities. Under pointwise multiplication the identity is the constant function 11, and units are exactly the nowhere-vanishing functions. Under Dirichlet convolution the identity is ε\varepsilon (supported only at n=1n=1), and units are those with f(1)≠0f(1)\ne 0, a much weaker condition. The convolution ring is the one relevant to divisor-sum identities and Möbius inversion; the pointwise ring rarely appears in classical number-theoretic identities.

Why does convolution require summing over all divisor pairs (d,n/d)(d, n/d) instead of some other pairing?

Because Dirichlet convolution is designed to mirror multiplication of Dirichlet series ∑f(n)n−s\sum f(n)n^{-s}. When you multiply two such series formally, the coefficient of n−sn^{-s} in the product is exactly ∑d∣nf(d)g(n/d)\sum_{d\mid n} f(d)g(n/d), since a term f(d)d−sf(d)d^{-s} from the first series times g(e)e−sg(e)e^{-s} from the second contributes to n−sn^{-s} precisely when de=nde=n. This is the deep reason the divisor-sum structure appears: it is the unique bilinear operation compatible with multiplying formal Dirichlet series coefficientwise in the exponent.

Does the ring structure require ff and gg to be multiplicative functions?

No, not at all. The ring (A,+,∗)(A,+,*) is defined on all arithmetic functions, with no multiplicativity assumption whatsoever. Multiplicative functions (those with f(1)=1f(1)=1 and f(mn)=f(m)f(n)f(mn)=f(m)f(n) for coprime m,nm,n) form an important subset that is closed under convolution — the convolution of two multiplicative functions is again multiplicative — but this is a separate, additional fact, not a requirement for the ring axioms to hold. The ring structure itself is purely about the operations ++ and ∗* on the full set AA.

How is the inverse formula in Part 6 actually used in practice?

It gives an algorithm: to invert ff with f(1)≠0f(1)\ne0, first set f−1(1)=1/f(1)f^{-1}(1)=1/f(1), then compute f−1(n)f^{-1}(n) for increasing nn using only previously computed smaller values, exactly as in Worked Example 1. This recursive structure is also how one proves specific inverse identities, such as showing μ\mu is the inverse of 1\mathbf 1: one can verify 1∗μ=ε\mathbf{1}*\mu = \varepsilon directly (which is a standard fact about The Mobius Function), and uniqueness of inverses (proved in Part 6) then guarantees μ\mu is the inverse, with no other candidate possible.

Why is associativity of Dirichlet convolution not completely obvious?

Because unwinding (f∗g)∗h(f*g)*h and f∗(g∗h)f*(g*h) directly gives nested sums indexed differently — one groups divisors of n/cn/c inside divisors of nn, the other groups divisors of n/an/a inside divisors of nn — and it is not immediately visible that these nested sums range over the same index set. The proof resolves this by showing both nested sums are reindexations of the same triple sum ∑abc=nf(a)g(b)h(c)\sum_{abc=n} f(a)g(b)h(c), which requires an explicit bijection argument between the two ways of iterating over divisor chains, exactly as carried out in the proof of Part 2.

What role does ε≠0\varepsilon\ne 0 play in the ring being nontrivial?

If ε\varepsilon were equal to 00, the ring would be the trivial "zero ring" {0}\{0\}, in which 1=01=0 and every statement about units becomes vacuous or degenerate. We explicitly check ε(1)=1≠0\varepsilon(1)=1\ne0, so ε≠0\varepsilon\ne0 in AA, ruling this out. This small check matters because the zero ring technically satisfies the ring axioms but is excluded from being called an integral domain by convention (integral domains are required to have 1≠01\ne0), so verifying ε≠0\varepsilon\neq 0 is a genuine, necessary step in Part 5's conclusion.

Does every arithmetic function that's a unit under convolution also have an inverse under Dirichlet series /analytic continuation?

When the associated Dirichlet series F(s)=∑f(n)n−sF(s)=\sum f(n)n^{-s} converges and is nonzero at some point, the algebraic inverse f−1f^{-1} constructed here corresponds to the Dirichlet series 1/F(s)1/F(s) in regions of convergence, matching coefficients. However, this analytic correspondence requires convergence hypotheses (e.g. absolute convergence in some half-plane) that are entirely separate from the purely algebraic, always-valid construction in Part 6, which needs only f(1)≠0f(1)\ne0 and works with no reference to convergence at all.

Before this

Where this leads