I want to show that if $M_g$ is a compact Riemann surface of genus $g$, then $$\hom_{\textrm{Grp}}(\pi_1(M_g),\mathbb{R})\cong \mathbb{R}^{2g}.$$ I already know that $$\pi_1(M_g)=\langle a_1,b_1,\dotsc,a_g,b_g\:|\:[a_1,b_1]\cdots[a_g,b_g]=e\rangle.$$
In the end this is just a group theory result. However I can't seem to prove it. It may help that this isomorphism is even a vector space isomorphism.