Solution (source code)

= Solution

Write $M(a,b)=\begin{pmatrix}a&b\\0&1\end{pmatrix}$. Direct <matrix multiplication> gives
$$
M(a,b)M(c,d)=M(ac,ad+b).
$$
Since $a,c\ne0$, the product is again in $G$. <Associativity> is inherited from <matrix multiplication>, the <identity element> is $M(1,0)$, and
$$
M(a,b)^{-1}=M(a^{-1},-b/a)
$$
lies in $G$. These verify all <group axioms>. This is the <Affine group of the complex line>, acting by $z\mapsto az+b$.

For the diagonal subset, $M(a,0)M(c,0)=M(ac,0)$, it contains $M(1,0)$, and $M(a,0)^{-1}=M(a^{-1},0)$. Thus $G'$ is a <subgroup>. Finally,
$$
f(M(a,b)M(c,d))=M(ac,0)
=M(a,0)M(c,0)=f(M(a,b))f(M(c,d)),
$$
so \b[$f:G\to G'$ is a surjective <group homomorphism>].