Characteristic Function of Square-Free Integers is Multiplicative

Theorem
Let $S \subseteq \Z$ be the set of positive integers defined as:
 * $S := \left\{ {n \in \Z: \forall k \in \Z_{>1}: k^2 \nmid n}\right\}$

That is, let $S$ be the set of all square-free positive integers.

Let $\chi_S: \N \to \Z$ denote the characteristic function of $S$:
 * $\forall n \in \Z: \chi_S \left({n}\right) = \left[{n \in S}\right]$

where $\left[{n \in S}\right]$ is Iverson's convention.

Then $\chi_S$ is multiplicative.

Proof
Let $r, s \in \Z$ such that $r \perp s$.

Case 1: Either factor is not square-free
Let either $r \notin S$ or $s \notin S$ or both.

Then either:
 * $\exists k \in \Z_{>1}: k^2 \mathrel \backslash r$

or:
 * $\exists k \in \Z_{>1}: k^2 \mathrel \backslash s$

Thus either:
 * $\chi_S \left({r}\right) = 0$

or:
 * $\chi_S \left({s}\right) = 0$

and so:
 * $\chi_S \left({r}\right) \chi_S \left({s}\right) = 0$

But then:
 * $\exists k \in \Z_{>1}: k^2 \mathrel \backslash r s$

and so:
 * $\chi_S \left({r s}\right) = 0$

demonstrating that:
 * $\chi_S \left({r}\right) \chi_S \left({s}\right) = \chi_S \left({r s}\right)$

Case 1: Both factors are square-free
Let $r \in S$ and $s \in S$.

Thus:
 * $\nexists k \in \Z_{>1}: k^2 \mathrel \backslash r$

and:
 * $\nexists k \in \Z_{>1}: k^2 \mathrel \backslash s$

Hence:
 * $\chi_S \left({r}\right) = 1$

and:
 * $\chi_S \left({s}\right) = 1$

and so:
 * $\chi_S \left({r}\right) \chi_S \left({s}\right) = 1$

Because $r \perp s$:
 * $\nexists k \in \Z_{>1}: k \mathrel \backslash r, k \mathrel \backslash s$

Hence there can be no $k \in \Z_{>1}$ whose multiplicity in $r s$ is greater than $1$.

Thus:
 * $\nexists k \in \Z_{>1}: k^2 \mathrel \backslash {r s}$

and so:
 * $\chi_S \left({r s}\right) = 1$

once more demonstrating that:
 * $\chi_S \left({r}\right) \chi_S \left({s}\right) = \chi_S \left({r s}\right)$

In both cases:
 * $\chi_S \left({r}\right) \chi_S \left({s}\right) = \chi_S \left({r s}\right)$

Hence the result, by definition of multiplicative function.

Also see

 * Möbius Function is Multiplicative, a similar result.