[proofplan]
We prove each algebra axiom directly from the finite divisor-sum formula defining Dirichlet convolution. Pointwise addition and scalar multiplication give the usual complex [vector space](/page/Vector%20Space) structure on functions $\mathbb{N}\to\mathbb{C}$. Commutativity follows by pairing each divisor $d$ of $n$ with the complementary divisor $n/d$, associativity follows by rewriting both iterated convolutions as the same finite sum over triples $(a,b,c)\in\mathbb{N}^3$ with $abc=n$, and the identity law follows from the defining support of $\varepsilon$ at $1$. Bilinearity is checked term by term in the finite sums.
[/proofplan]
[step:Record the pointwise complex vector space structure]
Let $\mathcal{A}=\{f:\mathbb{N}\to\mathbb{C}\}$. With pointwise addition and scalar multiplication, $\mathcal{A}$ is a complex vector space: for every vector space axiom and every $n\in\mathbb{N}$, the corresponding identity in $\mathcal{A}$ is exactly the corresponding identity in $\mathbb{C}$ after evaluation at $n$. The zero vector is the function $0_{\mathcal{A}}:\mathbb{N}\to\mathbb{C}$ defined by $0_{\mathcal{A}}(n)=0$, and the additive inverse of $f\in\mathcal{A}$ is the function $-f:\mathbb{N}\to\mathbb{C}$ defined by $(-f)(n)=-f(n)$.
[/step]
[step:Show that Dirichlet convolution is a well-defined binary operation]
Let $f,g\in\mathcal{A}$. For each fixed $n\in\mathbb{N}$, the set
\begin{align*}
D(n):=\{d\in\mathbb{N}: d\mid n\}
\end{align*}
is finite, so the sum
\begin{align*}
(f*g)(n)=\sum_{d\mid n} f(d)g(n/d)
\end{align*}
is a finite sum of complex numbers. Thus $f*g:\mathbb{N}\to\mathbb{C}$ is a well-defined arithmetic function, so Dirichlet convolution is a binary operation on $\mathcal{A}$.
[/step]
[step:Prove commutativity by replacing each divisor with its complement]
Let $f,g\in\mathcal{A}$ and fix $n\in\mathbb{N}$. Define the divisor-complement map
\begin{align*}
\theta_n:D(n)&\to D(n)\\
d&\mapsto n/d.
\end{align*}
This map is a bijection, and its inverse is itself. Reindexing the finite sum defining $(f*g)(n)$ by $e=\theta_n(d)=n/d$, we obtain
\begin{align*}
(f*g)(n)
&=\sum_{d\mid n} f(d)g(n/d)\\
&=\sum_{e\mid n} f(n/e)g(e)\\
&=\sum_{e\mid n} g(e)f(n/e)\\
&=(g*f)(n),
\end{align*}
where the third equality uses commutativity of multiplication in $\mathbb{C}$. Since this holds for every $n\in\mathbb{N}$, $f*g=g*f$.
[/step]
[step:Prove associativity by summing over factor triples]
Let $f,g,h\in\mathcal{A}$ and fix $n\in\mathbb{N}$. Expanding the left-associated convolution gives
\begin{align*}
((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((n/c)/a)\right)h(c).
\end{align*}
For each pair $(c,a)$ with $c\mid n$ and $a\mid n/c$, define
\begin{align*}
b:=\frac{n}{ac}.
\end{align*}
Then $a,b,c\in\mathbb{N}$ and $abc=n$. Conversely, if $(a,b,c)\in\mathbb{N}^3$ satisfies $abc=n$, then $c\mid n$ and $a\mid n/c$. Hence the preceding finite double sum is exactly
\begin{align*}
((f*g)*h)(n)
=\sum_{\substack{a,b,c\in\mathbb{N}\\ abc=n}} f(a)g(b)h(c).
\end{align*}
Similarly,
\begin{align*}
(f*(g*h))(n)
&=\sum_{a\mid n} f(a)(g*h)(n/a)\\
&=\sum_{a\mid n} f(a)\left(\sum_{b\mid n/a} g(b)h((n/a)/b)\right).
\end{align*}
For each pair $(a,b)$ with $a\mid n$ and $b\mid n/a$, define
\begin{align*}
c:=\frac{n}{ab}.
\end{align*}
Then $a,b,c\in\mathbb{N}$ and $abc=n$, and the same converse holds. Therefore
\begin{align*}
(f*(g*h))(n)
=\sum_{\substack{a,b,c\in\mathbb{N}\\ abc=n}} f(a)g(b)h(c).
\end{align*}
Thus $((f*g)*h)(n)=(f*(g*h))(n)$ for every $n\in\mathbb{N}$, so $(f*g)*h=f*(g*h)$.
[guided]
The key point is that every term in an iterated Dirichlet convolution corresponds to a factorisation of $n$ into three positive factors. We first expand the left-associated product. For fixed $n\in\mathbb{N}$,
\begin{align*}
((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((n/c)/a)\right)h(c).
\end{align*}
The outer divisor $c$ is the argument sent to $h$, and the inner divisor $a$ is the argument sent to $f$. Once $a$ and $c$ are chosen, the remaining argument sent to $g$ is forced to be
\begin{align*}
b:=\frac{n}{ac}.
\end{align*}
The divisibility condition $a\mid n/c$ ensures that $b\in\mathbb{N}$. Therefore every term in the double sum has the form $f(a)g(b)h(c)$ with $abc=n$.
Conversely, suppose $(a,b,c)\in\mathbb{N}^3$ satisfies $abc=n$. Then $c\mid n$, and after dividing by $c$ we have $ab=n/c$, so $a\mid n/c$. Hence this triple appears exactly once in the expansion of $((f*g)*h)(n)$. Thus
\begin{align*}
((f*g)*h)(n)
=\sum_{\substack{a,b,c\in\mathbb{N}\\ abc=n}} f(a)g(b)h(c).
\end{align*}
Now expand the right-associated product:
\begin{align*}
(f*(g*h))(n)
&=\sum_{a\mid n} f(a)(g*h)(n/a)\\
&=\sum_{a\mid n} f(a)\left(\sum_{b\mid n/a} g(b)h((n/a)/b)\right).
\end{align*}
Here the outer divisor $a$ is the argument sent to $f$, and the inner divisor $b$ is the argument sent to $g$. The remaining argument sent to $h$ is forced to be
\begin{align*}
c:=\frac{n}{ab}.
\end{align*}
Again, $b\mid n/a$ is precisely the condition that $c\in\mathbb{N}$. Conversely, every triple $(a,b,c)\in\mathbb{N}^3$ with $abc=n$ gives $a\mid n$ and $b\mid n/a$, so it appears exactly once. Therefore
\begin{align*}
(f*(g*h))(n)
=\sum_{\substack{a,b,c\in\mathbb{N}\\ abc=n}} f(a)g(b)h(c).
\end{align*}
Both iterated convolutions are the same finite sum over the same indexing set, so $((f*g)*h)(n)=(f*(g*h))(n)$. Since $n$ was arbitrary, $(f*g)*h=f*(g*h)$.
[/guided]
[/step]
[step:Verify that $\varepsilon$ is the convolution identity]
Let $f\in\mathcal{A}$ and fix $n\in\mathbb{N}$. Since $\varepsilon(m)=0$ for every $m>1$ and $\varepsilon(1)=1$, the sum defining $(f*\varepsilon)(n)$ has only the term with $n/d=1$, equivalently $d=n$, contributing:
\begin{align*}
(f*\varepsilon)(n)
&=\sum_{d\mid n} f(d)\varepsilon(n/d)\\
&=f(n)\varepsilon(1)\\
&=f(n).
\end{align*}
Similarly, the sum defining $(\varepsilon*f)(n)$ has only the term with $d=1$ contributing:
\begin{align*}
(\varepsilon*f)(n)
&=\sum_{d\mid n} \varepsilon(d)f(n/d)\\
&=\varepsilon(1)f(n)\\
&=f(n).
\end{align*}
Thus $f*\varepsilon=f=\varepsilon*f$, so $\varepsilon$ is the multiplicative identity for Dirichlet convolution.
[/step]
[step:Check distributivity and scalar compatibility term by term]
Let $f,g,h\in\mathcal{A}$, let $\lambda\in\mathbb{C}$, and fix $n\in\mathbb{N}$. Using finite additivity of sums and distributivity in $\mathbb{C}$,
\begin{align*}
(f*(g+h))(n)
&=\sum_{d\mid n} f(d)(g+h)(n/d)\\
&=\sum_{d\mid n} f(d)\bigl(g(n/d)+h(n/d)\bigr)\\
&=\sum_{d\mid n} f(d)g(n/d)+\sum_{d\mid n} f(d)h(n/d)\\
&=(f*g)(n)+(f*h)(n).
\end{align*}
Thus $f*(g+h)=f*g+f*h$. By commutativity of convolution, this also gives $(g+h)*f=g*f+h*f$.
For scalar compatibility,
\begin{align*}
((\lambda f)*g)(n)
&=\sum_{d\mid n} (\lambda f)(d)g(n/d)\\
&=\sum_{d\mid n} \lambda f(d)g(n/d)\\
&=\lambda\sum_{d\mid n} f(d)g(n/d)\\
&=(\lambda(f*g))(n).
\end{align*}
Again using commutativity, $f*(\lambda g)=\lambda(f*g)$ as well. Therefore Dirichlet convolution is bilinear over $\mathbb{C}$.
[/step]
[step:Conclude the algebra axioms]
The set $\mathcal{A}$ is a complex vector space under pointwise addition and scalar multiplication. Dirichlet convolution is a well-defined bilinear multiplication on $\mathcal{A}$; it is associative, commutative, and has identity element $\varepsilon$. Hence $\mathcal{A}$ is a commutative associative unital $\mathbb{C}$-algebra with multiplicative identity $\varepsilon$.
[/step]