Why is the Mobius function defined the way it is? \begin{align*} \mu(n) = \begin{cases} (-1)^r & \text{ if $n$ is square-free and is of the form }n=p_1p_2\ldots p_r\\ 0 & \text{ if $n$ is not square-free} \end{cases} \end{align*}
I can see that the function takes $-1$ on all primes. But why is extended in a way it is just multiplicative and not completely multiplicative?
Also, why is this particular function interesting to study? I can understand studying other arithmetic functions like the divisor function, totient function, etc. This function definition seems to be pulled out of thin air.
Thanks
If you know about the Riemann zeta function, $\zeta(s)$, then $${1\over\zeta(s)}=\sum_{n=1}^{\infty}{\mu(n)\over n^s}$$ for all complex $s$ with real part exceeding 1.
If you don't know about the Riemann zeta function, look it up --- it's the most important function in analytic number theory.