I am working on a school assignment and have been stuck on this question for some time.
Let $f : G \rightarrow G_1$ be a surjective homomorphism (also called epimorphism) from $G$ to another group $G_1$. Prove that $f(Z(G)) \subseteq Z(G_1)$
I know we start by assuming we have an element in $f(Z(G))$ then showing it is also in $Z(G_1)$. Also, $Z(G)$ is the center of $G$, so $Z(G)$ is all the elements of $G$ that commute with all elements in $G$. But how do we know that if we map the elements of $Z(G)$ to $G_1$, then their image will also commute with all the elements in $G_1$? Does it have something to do with using commutativity with the homomorphism? i.e. $f(gz) = f(g)f(z) = f(zg) = f(z)f(g)$.