Computing the cohomology ring of the orientable genus $g$ surface by considering a quotient map. I'm attempting to do Hatcher Chapter 3.2, Exercise 1.
Let $M_g$ be the genus $g$ orientable surface, and let $q$ be the quotient map from $M_g$ to the wedge product of $g$ tori obtained by collapsing a subspace of $M_g$ homeomorphic to a $g$-times punctured sphere to a point.
We know that $H^*(T^2) = \wedge[\alpha,\beta]$, so $H^*(\vee_i T^2) = \oplus_{i = 1}^g \wedge[\alpha_i,\beta_i]$. The map $q$ induces a ring homomorphism $q^*: H^*(\vee_i T^2) \to H^*(M_g)$. Choosing appropriate representatives for the cohomology classes $\alpha_i$ and $\beta_i$ (which I do not denote any differently), we can see that $q^*(\alpha_i)$ and $q^*(\beta_i)$ are represented by $\alpha_i \circ q$ and $\beta_i \circ q$ respectively, and the ring homomorphism preserves the exterior algebra relations.
My only problem is determining if there are other relations in $H^*(M_g)$ because I don't believe $q^*$ is an isomorphism. Is there some way to determine these without directly computing the cup product structure of $M_g$ via a gluing diagram?
 A: The comments on the previous answer express a desire for additional details, so I'll add some here for any future students looking at this question. Robin nicely explains how the only interesting multiplicative structure inside $H^*(M_g)$ comes from the cup product $H^1(M_g) \times H^1(M_g) \to H^2(M_g)$ so we focus on that. Fix the following notation: let $X := \bigvee_{i = 1}^g T_i$ with each $T_i$ a torus, let $A$ denote the subspace of $M_g$ equal to a $g$-punctured sphere, let $i : A \to M_g$ denote inclusion, and let $q: M_g \to M_g/A = X$ denote the quotient map. As Robin mentions, the strategy is use the fact (Hatcher proposition 3.10) that the square
$$
\require{AMScd}
\begin{CD}
H^1(X) \times H^1(X) @>{\cup}>> H^2(X) \\
@V{q^* \times q^*} VV @V{q^*}VV \\
H^1(M_g) \times H_1(M_g) @>{\cup}>> H^2(M_g)
\end{CD}
$$
commutes to get at the cup product structure on $M_g$ from (i) the (known) cup product structure on $X$ and (ii) the action of $q$ on cohomology. As (i) is addressed in the question and in Robin's answer, we focus on the details of (ii).
Disclaimer: I am still very much a student of algebraic topology, so I welcome any comments for improving my argument!
We consider a piece
$$
\cdots \rightarrow H_1(A) \xrightarrow{i_*} H_1(M_g) \xrightarrow{q_*} H_1(X) \xrightarrow{\delta} H_0(A) \xrightarrow{i_*} H_0(M_g) \to \cdots
$$
of the long exact sequence of homology induced by the pair $(M_g, A)$. Regard $H_1$ as the abelianisation of $\pi_1$ to see that the map $i_* : H_1(A) \to H_1(M_g)$ is zero (because loops in the subspace $A$ lie in the commutator subgroup of $\pi_1(M_g)$). Note also that $i_* : H_0(A) \to H_0(M_g)$ injects (by the definition of the zero-th homology) so that $\delta = 0$. Thus, $q_*$ is encased by zero maps and so induces an isomorphism on first homology. By the universal coefficient theorem for cohomology (noticing that the Ext terms vanish here), it follows that $q^*$ induces an isomorphism on first cohomology.
Understanding $q^*$ on second cohomology requires a bit more topology and in this case we'll think about $H_2$ in terms of simplicial homology. Let $q_i : X \to T_i$ denote the quotient map which collapses the wedge sum $X$ to the $i$-th torus in the sum. Then we have a commutative diagram
$$
\require{AMScd}
\begin{CD}
H_2(M_g) @>{q_*}>> H^2(X) @>{(q_i)_*}>> H^2(T_i) \\
@V{\cong} VV @V{\cong}VV @V{\cong}VV \\
\mathbb{Z} @>>> \mathbb{Z}^g @>>> \mathbb{Z}.
\end{CD}
$$
Letting $\sigma : \Delta^2 \to M_g$ represent the generating class in $H_2(M_g) \cong \mathbb{Z}$, that $\sigma$ is not a boundary in $H_2(M_g)$ implies that $q_i \circ q \circ \sigma$ is itself not a boundary in $H_2(T_i) \cong \mathbb{Z}$. In particular, $q_i \circ q \circ \sigma$ generates $H_2(T_i)$ so we see that $(q_i)_* \circ q_*$ maps 1 to 1 along the bottom row of the diagram. Now, the isomorphism $H_2(X) \cong \mathbb{Z}^g$ comes from the isomorphism $H_2(X) \cong \bigoplus_{i = 1}^g H_2(T_i)$ which is induced by the inclusions $T_i \hookrightarrow X$ (Hatcher corollary 2.25). So if $\sigma_i : \Delta^2 \to T_i$ represents a generator of $H_2(T_i)$ then the map $(q_i)_*$ sends $(0, \ldots, 0, \sigma_i, 0, \ldots, 0) \in H_2(X)$ to $\sigma_i$. Along the bottom row of the diagram, if we regard $\mathbb{Z}^g$ as generated by the standard basis vectors $\{e_1, \ldots, e_g\}$, then $(q_i)_*$ acts as $\varepsilon_i$ for $\varepsilon_i(e_j) := \delta_{ij}$. We conclude that for each $i$ we have $\varepsilon_i(q_*(1)) = 1$ from which it follows that $q_*(1) = (1, \ldots, 1) \in \mathbb{Z}^g \cong H_2(X)$. Again apply the universal coefficient theorem for cohomology (noting that the Ext terms still vanish) to see that $q^* : H^2(X) \to H^2(M_g)$ maps each of the $g$ generators of $H^2(X)$ to the same generator of $H^2(M_g)$. In terms of the isomorphisms $H^2(X) \cong \mathbb{Z}^g$ and $H^2(M_g) \cong \mathbb{Z}$, we have concluded that $q^*(e_i) = 1$ for all $i$.
With a precise understanding of the action of $q$ on cohomology, we may return to the original commuting square. We adopt the notation of the OP here: let $H^1(X)$ have generators $\{\alpha_i, \beta_i\}_{i = 1}^g$ and $H^2(X)$ have generators $\{\gamma_i\}_{i = 1}^g$ with $\alpha_i \beta_i = \gamma_i$ and all other products of generators zero (note that we use here the known cup product structure on the torus and that we adopt the convention that multiplication denotes a cup product). Then that $q^*$ induces an isomorphism on first cohomology implies that $H_1(M_g)$ has generators $\alpha_i' := q^*(\alpha_i)$ and $\beta_i' := q^*(\beta_i)$. And the action of $q^*$ on $H^2$ means that $H^2(M_g)$ has generator $\gamma' := q^*(\gamma_1) = \cdots = q^*(\gamma_g)$. By our very first commuting square, we conclude that
Theorem: The cohomology ring $\tilde{H}^*(M_g)$ is generated by $\{\alpha_i', \beta_i'\}_{i=1}^g \cup \{\gamma'\}$ with $\alpha_i'$ and $\beta_i'$ of weight one, $\gamma'$ of weight two, and nonzero cup product relations $\alpha_i' \beta_i' = \gamma'$ for all $i$ (all other cup products of generators are zero).
A: The statement $H^*(\bigvee_i T^2) = \bigoplus_i \bigwedge[\alpha_i, \beta_i]$ is actually wrong. The formula you are thinking of only works for reduced cohomology in a given dimension and unfortunately reduced cohomology doesn't work with cup products since the zeroth reduced group is  zero. We actually have that $H^*(\bigvee_i T^2)$ is the quotient of the direct sum, identifying the various $\mathbb{Z} \cong \bigwedge^0 [\alpha_i , \beta_i]$ together. (So its kinda like a wedge sum of graded abelian groups whatever that means). I think this is easy enough to see by considering the map from the disjoint union to the wedge sum.
To compute the ring structure on $M_g$ we first compute the abelian groups $H^i(M_g)$ and then use $q^*$ to determine the ring structure. 
The cohomology groups of $M_g$ are actually the same as the homology groups by universal coefficients. Indeed the homology groups of $M_g$ are free abelian groups $H^0(M_g)=\mathbb{Z}$, $H^1(M_g)=\mathbb{Z}^{2g}$, $H^2(M_g)=\mathbb{Z}$ so the Ext terms vanish and we get isomorphisms $H^k(M_g)= \text{Hom}(H_k(M_g), \mathbb{Z}) = H_k(M_g)$. All other cohomology groups in higher dimensions are zero of course.
Because the cup product are maps  $H^k(M_g) \times H^l(M_g) \to H^{k+l}(M_g)$ and the cohomology is zero above dimension two it follows that the only nontrivial cup product will be $H^1(M_g) \times H^1(M_g)$. (We also have the trivial cup product $H^0(M_g) \times H^l(M_g) \to H^l(M_g)$. This is the usual multiplication by integers since $H^0(M_g) = \mathbb{Z}$ consists of constant integer valued functions on the points of $M_g$.)
We can use $q$ to determine the cup product here, but I'll only give a sketch. Specifically we can show that $H^1(M_g) = \mathbb{Z}^{2g}$ has generators $q^*(\alpha_i)$, $q^*(\beta_i)$, $i=1, \dots, g$ and that $H^2(M_g) = \mathbb{Z}$ is generated by $q^*(\alpha_1 \cup \beta_1) = \cdots =\pm q^*(\alpha_g \cup \beta_g)$. Then because $q^*$ is a ring homomorphism it follows that $q^*(\alpha_i)\cup q^*(\beta_i) =q^*(\alpha_i \cup \beta_i)$, $q^*(\alpha_i) \cup q^*(\alpha_i) = q^*(\alpha_i \cup \alpha_i)=0$, and likewise $q^*(\beta_i)\cup q^*(\beta_i)= 0$. 
In conclusion, $H^*(M_g)$ is the quotient of $H^*(\bigvee_i T^2)$, identifying the top $\mathbb{Z}$ summand and this has a natural ring structure (but no good notation as far as I'm aware).
