constructing a CW Complex I am looking at an example of constructing a CW complex for a space X. The example i am looking at is that for The quotient of $S^2$ obtained by identifying north and south poles. The solution is as shown below in the image

Could someone explain to me why this is the case, as i am unsure how they have arrived at this conclusion. Also what would be the general way of constructing a CW Complex for a space X as it does not seem as straight forward to me and many solutions rely on accurate constructions
thanks in advance for the help
 A: I presume you're asking how to equip a given space with a CW-structure. There is no general procedure to do it: as Ronnie Brown mentioned in the comments on the other answer, one can hand you with a complex algebraic variety and it might as well be possible that no one knows. One usually tries to express the space into smaller and simpler looking spaces, and then obtain a CW-structure on the whole space from "patching-up" the CW-structure on those smaller spaces. For example,


*

*Given a pair of CW-complexes $(X, A)$ with $A \subset X$ being a subcomplex, the quotient space $X/A$ inherits a natural CW-structure obtained from disjoint union of cells in $X - A$ and a new cell $e^0$ corresponding to the pinched $A$. The attaching maps $\widetilde{f}_i : \partial e_i^n \to X/A$ are obtained from composing the attaching maps $f_i : \partial e_i^n \to X$ with the quotient map $X \to X/A$. If image of the boundary of the cells under the attaching map lies inside $A$, then the cell gets pasted to the new cell $e^0$.

*Given CW-complex $X, Y$, the product space $X \times Y$ inherits a CW-structure obtained from disjoint union of product of cells $e_i^m \times e_j^n$, with $e_i^m$ being a cell in $X$ and $e_j^n$ being a cell in $Y$. The attaching maps $h_{ij} : \partial(e_i^m \times e_j^n) = e_i^m \times \partial e_j^n \cup \partial e_i^m \times e_j^n \to X \times Y$ are just the product maps $\text{id} \times g_i$ and $f_i \times \text{id}$ of the attaching maps $f_i : \partial(e_i^m) \to X$ and $g_j : \partial(e_j^n) \to Y$ on each component in the union. The topology of product of cell complexes may not agree with the product topology if the original CW-complexes aren't "nice", however. This is discussed in the appendix of Hatcher's textbook.
These two operations on spaces are the most important ones one commonly uses to build complicated spaces from simpler ones. It is, thus, quite a nice property that both product and quotient of (nice) CW-complexes are CW-complexes. 
For instance, your space "sphere with poles identified" is the quotient space $S^2/\{0, 1\}$. To use our first example to obtain a CW-structure on this fellow, you have to realize $(S^2, \{0, 1\})$ as a CW-pair. This is done by giving $S^2$ the following CW-structure : start from $\{0, 1\}$, then paste $1$-cell to it, and then finally a $2$-cell to it by pasting the upper half of the boundary to $[0, 1] = \{0, 1\} \cup e^1$ by the identity map and the lower half by the antipodal map. This gives your space the CW-structure $e^0 \cup e^1 \cup e^2$, where $e^2$ is pasted to the circle $e^0 \cup e^1$ via pasting the upper half of $\partial e^2$ by pinching the equatorial $S^0$ and doing the same with the lower half, but composing with the antipodal map this time (This is not equivalent to the CW-structure in the snapshot in your question, however. Also, note that as the attaching map of $e^2$ is nullhomotopic, the space is homotopy-equivalent to $S^2 \vee S^1$)
As another example, consider $S^1 \times S^1$. Using our second example, we see that the CW-structure consists of a $0$-cell $e^0 \times e^0$, a $1$-cell $e^0 \times e^1$, another $1$-cell $e^1 \times e^0$, and finally a $2$-cell $e^1 \times e^1$. The $1$-skeleton is then disjoint union of a $0$-cell and two $1$-cells attached to the $0$-cell by the constant map. It's a bit hard to see what happens to the $2$-cell $e^1 \times e^1$, but it is a nice exercise to show that the attaching map is indeed the one obtained from the word $aba^{-1}b^{-1}$.
