Solution (source code)

= Solution

Suppose $K=\ker\varphi$ for a <group homomorphism> $\varphi:G\to H$. Its identity belongs to $K$, and for $k,l\in K$ we have $\varphi(kl^{-1})=1$, so it is a <subgroup>. Moreover, for $g\in G$ and $k\in K$,
$$
\varphi(gkg^{-1})=\varphi(g)\varphi(k)\varphi(g)^{-1}=1.
$$
Hence $gKg^{-1}\subseteq K$; applying this also to $g^{-1}$ gives equality, so $K$ is a <normal subgroup>.

Conversely, if $K$ is a <normal subgroup>, multiplication of cosets in the <quotient group> $G/K$ is well-defined. The map $g\mapsto gK$ is a <group homomorphism> and has <kernel of a group homomorphism> exactly $K$. This proves both directions without requiring $\varphi$ to be injective or surjective.

For the matrix application, reduce all entries modulo $p$:
$$
\rho:SL_2(\mathbb Z)\longrightarrow SL_2(\mathbb F_p),\qquad A\longmapsto\overline A.
$$
Reduction respects <matrix multiplication> and the <determinant>, so this is a <group homomorphism>. Its <kernel of a group homomorphism> consists exactly of matrices congruent to the identity modulo $p$, which are the given matrices. Therefore \b[$K=\ker\rho$ is a <normal subgroup>], the level-$p$ <principal congruence subgroup>. Surjectivity of reduction is not needed for this argument.