# Completely multiplicative function

In number theory, functions of positive integers which respect products are important and are called completely multiplicative functions or totally multiplicative functions. A weaker condition is also important, respecting only products of coprime numbers, and such functions are called multiplicative functions. Outside of number theory, the term "multiplicative function" is often taken to be synonymous with "completely multiplicative function" as defined in this article.

## Definition

A completely multiplicative function (or totally multiplicative function) is an arithmetic function (that is, a function whose domain is the natural numbers), such that f(1) = 1 and f(ab) = f(a)f(b) holds for all positive integers a and b.
In logic notation: $f(1)=1$ and $\forall a,b\in {\text{domain}}(f),f(ab)=f(a)f(b)$.
Without the requirement that f(1) = 1, one could still have f(1) = 0, but then f(a) = 0 for all positive integers a, so this is not a very strong restriction. If one did not fix $f(1)=1$, one can see that both $0$ and $1$ are possibilities for the value of $f(1)$ in the following way: ${\begin{aligned}f(1)=f(1\cdot 1)&\iff f(1)=f(1)f(1)\\&\iff f(1)=f(1)^{2}\\&\iff f(1)^{2}-f(1)=0\\&\iff f(1)\left(f(1)-1\right)=0\\&\iff f(1)=0\lor f(1)=1.\end{aligned}}$
The definition above can be rephrased using the language of algebra: A completely multiplicative function is a homomorphism from the monoid $(\mathbb {Z} ^{+},\cdot )$ (that is, the positive integers under multiplication) to some other monoid.

## Examples

The easiest example of a completely multiplicative function is a monomial with leading coefficient 1: For any particular positive integer n, define f(a) = a$^n$. Then f(bc) = (bc)$^n$ = b$^n$c$^n$ = f(b)f(c), and f(1) = 1$^n$ = 1.
The Liouville function is a non-trivial example of a completely multiplicative function as are Dirichlet characters, the Jacobi symbol and the Legendre symbol.

## Properties

A completely multiplicative function is completely determined by its values at the prime numbers, a consequence of the fundamental theorem of arithmetic. Thus, if n is a product of powers of distinct primes, say n = p$^a$ q$^b$ ..., then f(n) = f(p)$^a$ f(q)$^b$ ...
While the Dirichlet convolution of two multiplicative functions is multiplicative, the Dirichlet convolution of two completely multiplicative functions need not be completely multiplicative. Arithmetic functions which can be written as the Dirichlet convolution of two completely multiplicative functions are said to be quadratics or specially multiplicative multiplicative functions. They are rational arithmetic functions of order (2, 0) and obey the Busche-Ramanujan identity.
There are a variety of statements about a function which are equivalent to it being completely multiplicative. For example, if a function f is multiplicative then it is completely multiplicative if and only if its Dirichlet inverse is $\mu \cdot f$ where $\mu$ is the Möbius function.
Completely multiplicative functions also satisfy a distributive law. If f is completely multiplicative then
$f\cdot (g*h)=(f\cdot g)*(f\cdot h)$
where * represents the Dirichlet product and $\cdot$ represents pointwise multiplication. One consequence of this is that for any completely multiplicative function f one has
$f*f=\tau \cdot f$
which can be deduced from the above by putting both $g=h=1$, where $1(n)=1$ is the constant function. Here $\tau$ is the divisor function.

### Proof of distributive property

    ${\begin{aligned}f\cdot \left(g*h\right)(n)&=f(n)\cdot \sum _{d|n}g(d)h\left({\frac {n}{d}}\right)=\\&=\sum _{d|n}f(n)\cdot (g(d)h\left({\frac {n}{d}}\right))=\\&=\sum _{d|n}(f(d)f\left({\frac {n}{d}}\right))\cdot (g(d)h\left({\frac {n}{d}}\right)){\text{ (since }}f{\text{ is completely multiplicative) }}=\\&=\sum _{d|n}(f(d)g(d))\cdot (f\left({\frac {n}{d}}\right)h\left({\frac {n}{d}}\right))\\&=(f\cdot g)*(f\cdot h).\end{aligned}}$

### Dirichlet series

The L-function of completely (or totally) multiplicative Dirichlet series $a(n)$ satisfies
    $L(s,a)=\sum _{n=1}^{\infty }{\frac {a(n)}{n^{s}}}=\prod _{p}{\biggl1-{\frac {a(p)}{p^{s}}}{\biggr )}^{-1},$
which means that the sum all over the natural numbers is equal to the product all over the prime numbers.