Let $G$ be a group and let $N=\langle g^2\mid g \in G \rangle$.
Show that $N \lhd G$ and $G/N $ is abelian.
Well, I've come up with a simple approach:
If $ n=x^2 \in N$ for some $ x \in G$ then $n^g = gng^{-1}=(gxg^{-1})^2 \in N$ and from here it is simple to prove for a general $ n \in N$.
Now I'm trying another solution: I define a function $f:G \rightarrow \{0,1\}$ so that $f(g) = 1 $ if $g \in N$ and $f(g) = 0$ otherwise. If this is an homomorphism than $N=Kerf$ and we are done. I'm having trouble however to prove that if $x,y \notin N $ than $f(xy)=1$ (meaning that $xy \in N$). If this is true, I'd be happy for some clues.
Thanks.