CW complex

A CW complex is a kind of a topological space that is particularly important in algebraic topology.
It was introduced by J. H. C. Whitehead to meet the needs of homotopy theory. This class of spaces is broader and has some better categorical properties than simplicial complexes, but still retains a combinatorial nature that allows for computation (often with a much smaller complex). The "C" stands for "closure-finite", and the "W" for "weak" topology.
A CW complex can be defined inductively.
In an "n"-dimensional CW complex, for every formula_4, a "k-cell" is the interior of a "k"-dimensional ball added at the "k"-th step. The "k-skeleton" of the complex is the union of all its "k"-cells.
Examples.
As mentioned above, every collection of discrete points is a CW complex (of dimension 0).
1-dimensional CW-complexes.
Some examples of 1-dimensional CW complexes are:
Multi-dimensional CW-complexes.
Some examples of multi-dimensional CW complexes are:
Formulation.
Roughly speaking, a "CW complex" is made of basic building blocks called "cells". The precise definition prescribes how the cells may be topologically "glued together".
An "n"-dimensional closed cell is the image of an "n"-dimensional closed ball under an attaching map. For example, a simplex is a closed cell, and more generally, a convex polytope is a closed cell. An "n"-dimensional open cell is a topological space that is homeomorphic to the "n"-dimensional open ball. A 0-dimensional open (and closed) cell is a singleton space. "Closure-finite" means that each closed cell is covered by a finite union of open cells (or meets only finitely many other cells).
A CW complex is a Hausdorff space "X" together with a partition of "X" into open cells (of perhaps varying dimension) that satisfies two additional properties:
The partition of "X" is also called a "cellulation".
Regular CW complexes.
A CW complex is called "regular" if for each "n"-dimensional open cell "C" in the partition of "X", the continuous map "f" from the "n"-dimensional closed ball to "X" is a homeomorphism onto the closure of the cell "C". Accordingly, the partition of "X" is also called a "regular cellulation". A loopless graph is a regular 1-dimensional CW-complex. A closed 2-cell graph embedding on a surface is a regular 2-dimensional CW-complex. Finally, the 3-sphere regular cellulation conjecture claims that every 2-connected graph is the 1-skeleton of a regular CW-complex on the 3-dimensional sphere 
(https://twiki.di.uniroma1.it/pub/Users/SergioDeAgostino/DeAgostino.pdf).
Relative CW complexes.
Roughly speaking, a "relative CW complex" differs from a CW complex in that we allow it to have one extra building block that does not necessarily possess a cellular structure. This extra-block can be treated as a (-1)-dimensional cell in the former definition.
Inductive construction of CW complexes.
If the largest dimension of any of the cells is "n", then the CW complex is said to have dimension "n". If there is no bound to the cell dimensions then it is said to be infinite-dimensional. The "n"-skeleton of a CW complex is the union of the cells whose dimension is at most "n". If the union of a set of cells is closed, then this union is itself a CW complex, called a subcomplex. Thus the "n"-skeleton is the largest subcomplex of dimension "n" or less.
A CW complex is often constructed by defining its skeleta inductively by 'attaching' cells of increasing dimension.
By an 'attachment' of an "n"-cell to a topological space "X" one means an adjunction space formula_18
where "f" is a continuous map from the boundary of a closed "n"-dimensional ball formula_19 to "X". 
To construct a CW complex, begin with a 0-dimensional CW complex, that is, a discrete space formula_20. 
Attach 1-cells to formula_21 to obtain a 1-dimensional CW complex formula_22. 
Attach 2-cells to formula_23 to obtain a 2-dimensional CW complex formula_24. 
Continuing in this way, we obtain a nested sequence of CW complexes formula_25 
of increasing dimension such that if formula_26 then formula_27 is the "i"-skeleton of formula_28.
Up to isomorphism every "n"-dimensional CW complex can be obtained from its ("n" − 1)-skeleton via attaching "n"-cells, and thus every finite-dimensional CW complex can be built up by the process above. This is true even for infinite-dimensional complexes, with the understanding that the result of the infinite process is the direct limit of the skeleta: a set is closed in "X" if and only if it meets each skeleton in a closed set.
Homology and cohomology of CW complexes.
Singular homology and cohomology of CW complexes is readily computable via cellular homology. Moreover, in the category of CW complexes and cellular maps, cellular homology can be interpreted as a homology theory. To compute an extraordinary (co)homology theory for a CW complex, the Atiyah–Hirzebruch spectral sequence is the analogue of cellular homology.
Some examples:
Both of the above examples are particularly simple because the homology is determined by the number of cells—i.e.: the cellular attaching maps have no role in these computations. This is a very special phenomenon and is not indicative of the general case.
Modification of CW structures.
There is a technique, developed by Whitehead, for replacing a CW complex with a homotopy-equivalent CW complex that has a "simpler" CW decomposition.
Consider, for example, an arbitrary CW complex. Its 1-skeleton can be fairly complicated, being an arbitrary graph. Now consider a maximal forest "F" in this graph. Since it is a collection of trees, and trees are contractible, consider the space formula_38 where the equivalence relation is generated by formula_39 if they are contained in a common tree in the maximal forest "F". The quotient map formula_40 is a homotopy equivalence. Moreover, formula_38 naturally inherits a CW structure, with cells corresponding to the cells of formula_42 that are not contained in "F". In particular, the 1-skeleton of formula_38 is a disjoint union of wedges of circles.
Another way of stating the above is that a connected CW complex can be replaced by a homotopy-equivalent CW complex whose 0-skeleton consists of a single point.
Consider climbing up the connectivity ladder—assume "X" is a simply-connected CW complex whose 0-skeleton consists of a point. Can we, through suitable modifications, replace "X" by a homotopy-equivalent CW complex where formula_44 consists of a single point? The answer is yes. The first step is to observe that formula_44 and the attaching maps to construct formula_46 from formula_44 form a group presentation. The Tietze theorem for group presentations states that there is a sequence of moves we can perform to reduce this group presentation to the trivial presentation of the trivial group. There are two Tietze moves:
If a CW complex "X" is "n"-connected one can find a homotopy-equivalent CW complex formula_49 whose "n"-skeleton formula_56 consists of a single point. The argument for formula_57 is similar to the formula_58 case, only one replaces Tietze moves for the fundamental group presentation by elementary matrix operations for the presentation matrices for formula_59 (using the presentation matrices coming from cellular homology. i.e.: one can similarly realize elementary matrix operations by a sequence of addition/removal of cells or suitable homotopies of the attaching maps.
'The' homotopy category.
The homotopy category of CW complexes is, in the opinion of some experts, the best if not the only candidate for "the" homotopy category (for technical reasons the version for pointed spaces is actually used). Auxiliary constructions that yield spaces that are not CW complexes must be used on occasion. One basic result is that the representable functors on the homotopy category have a simple characterisation (the Brown representability theorem).