What is wrong with my computation of the boundary map of the $2$-cell in the torus's CW structure, $d_2(e^2_1)$ I'm a bit confused with the computation of the boundary in cell complexes. I'm trying to compute the boundary of $e^2$ in the torus (as in this post), which, by merely looking at the leftmost picture, should turn out to be $b+a-b-a$ (starting from the bottom left corner, counter-clockwise). Doing this formally (using Hatcher's formula on p. 140 in Algebraic Topology:  $d_n(e_n) = \sum_\beta d_{\alpha\beta} e^{n-1}_\beta$, I've come up with the following):
Denote by:
$$ \phi^1_1 : \partial D^1 \to S^0 $$
$$ \phi^1_2 : \partial D^1 \to S^0 $$
$$ \phi^2_1 : \partial D^2 \to S^1 $$
the attaching maps for: the $1$-cell $e^1_{\phi_a}$ that forms the loop $a$ in the torus (see right-hand-side image in aforementioned post), the $1$-cell that forms the loop $b$ in the torus and the attaching map for the only $2$-cell. (NOTE: perhaps my confusion lies here, since (according to the definition of CW complexes in Hatcher's book, p. 14) I've constructed only one map $\phi^2_1$ from the $2$-cell to $S^1$, but there is one for each edge..?).
And now I get:
$d_2(e^2_1)=d_{11}e^1_1 d_{12}e^1_2 = 1a+1b = a+b$
Where did I go wrong that I'm missing the $-a -b$ part? There are only two attaching maps in dimension $1$ (i.e., we should only have two indices for $\beta$). Does $d_{11}$ perhaps split into two parts? Or did I get the CW complex definition wrong, and I'm allowed to have multiple 'sub-attaching-maps' per map (i.e. $\phi^2_1$ can actually turn into $4$ maps)?
Also - just to make sure I got this, in reality we're taking the boundary of a singular $2$-simplex here, right? (Hatcher writes: "we are identifying the cells $e^n$ and $e^{n−1}$
with generators of the corresponding summands of the cellular chain groups." (Although a clarification on what these summands are exactly would be great).
Thanks.
 A: Let me first suggest that to get a fuller picture of the notation and mathematical details of CW complexes you should also read Hatcher's Appendix entitled Topology of Cell Complexes.
There is indeed only one attaching map per cell, and your notation for those maps is fine.
But your formula for $d_2$ is wrong. What would greatly help in deriving the correct formula are the following:

*

*Good notation for the characteristic maps of $e^1_1$ and $e^1_2$.

*Application of those characteristic maps to write down a good formula for $\phi^2_1$.

*Application of that formula to derive the correct formula for $d_2$.

For item 1, following the notation from Hatcher's appendix let me use $\Phi^1_1, \Phi^1_2 : D^1 \to X^2$ to denote the characteristic maps for $e^1_1$ and $e^1_2$.
For item 2, using $D^1 = [0,1]$ and thinking of $\Phi^1_1$ and $\Phi^1_2$ as paths, one can write a concatenation formula for the attaching map $\phi^2_1$:
$$\phi^2_1 = \Phi^1_2 * \Phi^1_1 * \overline{\Phi^1_2} * \overline{\Phi^1_1}
$$
where $*$ is the path concatenation operator, and $\overline\Phi$ is the path inversion operator, $\overline\Phi(t)=\Phi(1-t)$.
By the way there is the usual abuse of notation going in this formula for $\phi^2_1$: the formula defines $\phi^2_1$ as a closed path, i.e. a function with domain $[0,1]$ such that $\phi^2_1(0)=\phi^2_2(1)$. But then one should really convert it into a formula with domain $S^1$, by using the usual parameterization for $S^1$ given by the formula $(\cos(2\pi t),\sin(2\pi t))$, $t \in [0,1]$.
Finally, for 3 one should write something like this:
\begin{align*}
d_2(e^2_1) &= \text{degree}(\Phi^2_1) + \text{degree}(\overline{\Phi^2_1}) = 1 + (-1) = 0 \\
d_2(e^2_2) &= \text{degree}(\Phi^2_2) + \text{degree}(\overline{\Phi^2_2}) = 1 + (-1) = 0
\end{align*}
