Is there an onto group homomorphism from $\mathbb{Z}_{20}$ to $\mathbb{Z}_5$? I think the mapping $f(r) = r\pmod 5$ for some $r\in\mathbb{Z}_{20}$ works. I know it is onto because I mapped every single element in $\Bbb{Z}_{20}$ to $\Bbb{Z}_5$, but how can one show this in general? I know that it's supposed to be $f(a)=b$ for some $a$ in $\Bbb{Z}_{20}$ for any $b$ in $\Bbb{Z}_5$, but I am having issues with modular arithmetic I guess. Like how does one show $f(ab)=f(a)f(b)$ with mod involved in this case. Is it true?
 A: 
I think the mapping $f(r)=r\pmod5$ for some $r \in \mathbb{Z}_{20}$ works.

Be careful: you're saying there exists some $r \in \mathbb{Z}_{20}$ such that $f(r) = r \pmod 5$.

I know it is onto because I mapped every single element in $\mathbb{Z}_{20}$ to $\mathbb{Z}_5$.

Saying every element of $X$ maps to some element of $Y$ just means you have a function $X \to Y$. To be onto you need every element of $\mathbb{Z}_5$ having some element of $\mathbb{Z}_{20}$ mapping onto it.

but how can one show this in general?

I don't know what you mean by "general." Normally when someone says "general" it means you are working with a variable rather with a specific number, e.g. $\mathbb{Z}_n$ instead of $\mathbb{Z}_{20}$. For example: "how do we show that $\mathbb{Z}_{kn} \to \mathbb{Z}_n$ is onto in general?"

I know that it's supposed to be $f(a)=b$ for some a in $\mathbb{Z}_{20}$ for any $b$ in $\mathbb{Z}_5$

Assuming you meant to define $f(r) = r\pmod 5$ for all $r \in \mathbb{Z}_{20}$, this is by definition. That is: $f(0) = 0, f(1) = 1, f(2) = 2,f(3) = 3, f(4) = 4$.

I am having issues with modular arithmetic I guess. Like how does one show $f(ab)=f(a)f(b)$ with mod involved in this case.

Think about it this way: a group homomorphism $f : G \to H$ induces a morphism $\bar f: G/K \to H$ if and only if $K \subseteq \ker f$.
So the map $f : \mathbb{Z} \to \mathbb{Z}/5\mathbb{Z}$ induces a map $\bar{f} : \mathbb{Z}/20\mathbb{Z} \to \mathbb{Z}/5\mathbb{Z}$ because $20\mathbb{Z} \subseteq 5\mathbb{Z}$.
If you want to avoid appealing to this theorem, what you need to show is the following:


*

*$f(r) = r \pmod 5$ is well-defined (which you need to even have a function). That means if $r \equiv r' \pmod{20}$ then $f(r) = f(r')$ (which is the same as saying $r \equiv r' \pmod 5$).

*Arithmetic in $\mathbb{Z}_5$ is well-defined. So if $a \equiv a'$ and $b \equiv b'$ then $a + b \equiv a' + b' \pmod 5$.

*Using (2.) we know that $f(a) \equiv a$ and $f(b) \equiv b$ then $f(a) + f(b) \equiv a + b = f(a + b) \pmod 5$.
I'm writing the group operation of $\mathbb{Z}_5$ as addition, not as multiplication because that is the notation I am most used to and it is also the notation you get if you view $\mathbb{Z}_n$ as the quotient group $\mathbb{Z}/n\mathbb{Z}$.
