nLab CW complex




topology (point-set topology, point-free topology)

see also differential topology, algebraic topology, functional analysis and topological homotopy theory


Basic concepts

Universal constructions

Extra stuff, structure, properties


Basic statements


Analysis Theorems

topological homotopy theory

Homotopy theory

homotopy theory, (∞,1)-category theory, homotopy type theory

flavors: stable, equivariant, rational, p-adic, proper, geometric, cohesive, directed

models: topological, simplicial, localic, …

see also algebraic topology



Paths and cylinders

Homotopy groups

Basic facts




A CW-complex is a nice topological space which is, or can be, built up inductively, by a process of attaching n-disks D nD^n along their boundary (n-1)-spheres S n1S^{n-1} for all nn \in \mathbb{N}: a cell complex built from the basic topological cells S n1D nS^{n-1} \hookrightarrow D^n.

Being, therefore, essentially combinatorial objects, CW complexes are the principal objects of interest in algebraic topology; in fact, most spaces of interest to algebraic topologists are homotopy equivalent to CW-complexes. Notably the geometric realization of every simplicial set, hence also of every groupoid, 2-groupoid, etc., is a CW complex.

Milnor has argued that the category of spaces which are homotopy equivalent to CW-complexes, also called m-cofibrant spaces, is a convenient category of spaces for algebraic topology.

Also, CW complexes are among the cofibrant objects in the classical model structure on topological spaces. In fact, every topological space is weakly homotopy equivalent to a CW-complex (but need not be strongly homotopy equivalent to one). See also at CW-approximation. Since every topological space is a fibrant object in this model category structure, this means that the full subcategory of Top on the CW-complexes is a category of “homotopically very good representatives” of homotopy types. See at homotopy theory and homotopy hypothesis for more on this.


(origin of the “CW” terminology)

The terminology “CW-complex” goes back to John Henry Constantine Whitehead (and see the discussion in Hatcher, “Topology of cell complexes”, p. 520).

To quote from the original paper, which was “an address delivered before the Princeton Meeting of the (American Mathematical) Society on November 2, 1946”, Whitehead states:

In this presentation we abandon simplicial complexes in favor of cell complexes. This first part consists of geometrical preliminaries, including some elementary propositions concerning what we call closure finite complexes with weak topology, abbreviated to CW-complexes, …

Thus the “CW” stands for the following two properties shared by any CW-complex:

  • C = “closure finiteness”: a compact subset of a CW-complex intersects the interior of only finitely many cells (prop.), hence in particular so does the closure of any cell.

  • W = “weak topology”: Since a CW-complex is a colimit in Top over its cells, and as such equipped with the final topology of the cell inclusion maps, a subset of a CW-complex is open or closed precisely if its restriction to (the closure of) each cell is open or closed, respectively.

(Whitehead called the interior of the n-disks the “cells”, so that their closure of each cell is the corresponding nn-disk.)


In the following let Top be the category of topological spaces, or any of its variants, convenient category of topological spaces.


(spheres and disks)

For nn \in \mathbb{N} write

Notice that

  • S 1=S^{-1} = \emptyset;

  • S 0=**S^0 = \ast \sqcup \ast.


(single cell attachment)

For XX any topological space and for nn \in \mathbb{N}, then an nn-cell attachment to XX is the result of gluing an n-disk to XX, along a prescribed image of its bounding (n-1)-sphere (def. ):


ϕ:S n1X \phi \;\colon\; S^{n-1} \longrightarrow X

be a continuous function, then the attaching space

X ϕD nTop X \cup_\phi D^n \,\in Top

is the topological space which is the pushout of the boundary inclusion of the nn-sphere along ϕ\phi, hence the universal space that makes the following diagram commute

S n1 ϕ X ι n (po) D n X ϕD n. \array{ S^{n-1} &\stackrel{\phi}{\longrightarrow}& X \\ {}^{\mathllap{\iota_n}}\downarrow &(po)& \downarrow \\ D^n &\longrightarrow& X \cup_\phi D^n } \,.

If we take the defining boundary inclusion ι n:S n1D n\iota_n \colon S^{n-1} \to D^n itself as an attaching map, then we are gluing two nn-disks to each other along their common boundary S n1S^{n-1}. The result is the nn-sphere:

S n1 i n D n i n (po) D n S n. \array{ S^{n-1} &\overset{i_n}{\longrightarrow}& D^n \\ {}^{\mathllap{i_n}}\downarrow &(po)& \downarrow \\ D^n &\longrightarrow& S^n } \,.

(graphics from Ueno-Shiga-Morita 95)


A single cell attachment of a 0-cell, according to def. is the same as forming the disjoint union space X*X \sqcup \ast with the point space *\ast:

(S 1=) ! X (po) (D 0=*) X*. \array{ (S^{-1} = \emptyset) &\overset{\exists !}{\longrightarrow}& X \\ \downarrow &(po)& \downarrow \\ (D^0 = \ast) &\longrightarrow& X \sqcup \ast } \,.

In particular if we start with the empty topological space X=X = \emptyset itself, then by attaching 0-cells we obtain a discrete topological space. To this then we may attach higher dimensional cells.


(attaching many cells at once)

If we have a set of attaching maps {S n i1ϕ iX} iI\{S^{n_i-1} \overset{\phi_i}{\longrightarrow} X\}_{i \in I} (as in def. ), all to the same space XX, we may think of these as one single continuous function out of the disjoint union space of their domain spheres

(ϕ i) iI:iIS n i1X. (\phi_i)_{i \in I} \;\colon\; \underset{i \in I}{\sqcup} S^{n_i-1} \longrightarrow X \,.

Then the result of attaching all the corresponding nn-cells to XX is the pushout of the corresponding disjoint union of boundary inclusions:

iIS n i1 (ϕ i) iI X (po) iID n i X (ϕ i) iI(iID n i). \array{ \underset{i \in I}{\sqcup} S^{n_i - 1} &\overset{(\phi_i)_{i \in I}}{\longrightarrow}& X \\ \downarrow &(po)& \downarrow \\ \underset{i \in I}{\sqcup} D^{n_i} &\longrightarrow& X \cup_{(\phi_i)_{i \in I}} \left(\underset{i \in I}{\sqcup} D^{n_i}\right) } \,.

Apart from attaching a set of cells all at once to a fixed base space, we may “attach cells to cells” in that after forming a given cell attachment, then we further attach cells to the resulting attaching space, and ever so on:


(relative cell complexes)

Let XX be a topological space, then a topological relative cell complex of countable height based on XX is a continuous function

f:XY f \colon X \longrightarrow Y

and a sequential diagram of topological space of the form

X=X 1X 0X 1X 2 X = X_{-1} \hookrightarrow X_0 \hookrightarrow X_1 \hookrightarrow X_2 \hookrightarrow \cdots

such that

  1. each X kX k+1X_k \hookrightarrow X_{k+1} is exhibited as a cell attachment according to def. , hence presented by a pushout diagram of the form

    iIS n i1 (ϕ i) iI X k (po) iID n i X k+1. \array{ \underset{i \in I}{\sqcup} S^{n_i - 1} &\overset{(\phi_i)_{i \in I}}{\longrightarrow}& X_k \\ \downarrow &(po)& \downarrow \\ \underset{i \in I}{\sqcup} D^{n_i} &\longrightarrow& X_{k+1} } \,.
  2. Y=kX kY = \underset{k\in \mathbb{N}}{\cup} X_k is the union of all these cell attachments, and f:XYf \colon X \to Y is the canonical inclusion; or stated more abstractly: the map f:XYf \colon X \to Y is the inclusion of the first component of the diagram into its colimiting cocone lim kX k\underset{\longrightarrow}{\lim}_k X_k:

    X=X 0 X 1 X 2 f Y=limX \array{ X = X_0 &\longrightarrow& X_1 &\longrightarrow& X_2 &\longrightarrow& \cdots \\ & {}_{\mathllap{f}}\searrow & \downarrow & \swarrow && \cdots \\ && Y = \underset{\longrightarrow}{\lim} X_\bullet }

If here X=X = \emptyset is the empty space then the result is a map Y\emptyset \hookrightarrow Y, which is equivalently just a space YY built form “attaching cells to nothing”. This is then called just a topological cell complex of countable hight.

Finally, a topological (relative) cell complex of countable hight is called a CW-complex if the (k+1)(k+1)-st cell attachment X kX k+1X_k \to X_{k+1} is entirely by (k+1)(k+1)-cells, hence exhibited specifically by a pushout of the following form:

iIS k (ϕ i) iI X k (po) iID k+1 X k+1. \array{ \underset{i \in I}{\sqcup} S^{k} &\overset{(\phi_i)_{i \in I}}{\longrightarrow}& X_k \\ \downarrow &(po)& \downarrow \\ \underset{i \in I}{\sqcup} D^{k+1} &\longrightarrow& X_{k+1} } \,.

A finite CW-complex is one which admits a presentation in which there are only finitely many attaching maps, and similarly a countable CW-complex is one which admits a presentation with countably many attaching maps.

Given a CW-complex, then X nX_n is also called its nn-skeleton.

A cellular map between CW-complexes XX and YY is a continuous function f:XYf\colon X \to Y such that f(X n)Y nf(X_n) \subset Y_n.


Topological properties


Every CW-complex is a locally contractible topological space.

(e.g. Hatcher 2002, prop. A.4).


Every CW-complex is a compactly generated topological space.


Since a CW-complex XX is a colimit in Top over attachments of standard n-disks D n iD^{n_i} (its cells), by the characterization of colimits in TopTop (prop.) a subset of XX is open or closed precisely if its restriction to each cell is open or closed, respectively. Since the nn-disks are compact, this implies one direction: if a subset AA of XX intersected with all compact subsets is closed, then AA is closed.

For the converse direction, since a CW-complex is a Hausdorff space and since compact subspaces of Hausdorff spaces are closed, the intersection of a closed subset with a compact subset is closed.

In fact:


Every CW-complex is a Delta-generated topological space.

See there, this Prop.

Products of CW-complexes

If AXA \hookrightarrow X is an inclusion of CW-complexes, then the quotient X/AX/A is naturally itself a CW-complex, such that the quotient map XX/AX \to X/A is cellular.

If XX is a CW-complex and KK is a finite CW-complex, then the product topological space X×KX \times K is naturally itself a CW-complex (see Brooke-Taylor 2017 for more and more generality, and see Prop. below).

For example the suspension of a CW-complex itself carries the structure of a CW-complex.

Similarly for pointed CW-complexes: the smash product of a pointed CW-complex with a finite pointed CW-complex is a pointed CW-complex. For example the reduced suspension S 1XS^1 \wedge X of a pointed CW-complex XX is itself a CW-complex.


(product preserves CW-complexes in compactly generated topological spaces)
For XX and YY CW-complexes with attaching maps {ϕ α}\{\phi_\alpha\} and {Ψ β}\{\Psi_\beta\}, then the k-ification (X×Y) c(X \times Y)_c of their product topological space X×YX \times Y (hence their Cartesian product in the category of compactly generated topological spaces) is again a CW-complex with attaching maps {Φ α×Ψ β}\{\Phi_\alpha \times \Psi_\beta\}.

If either of the two CW-complexes is a locally compact topological space or if both are countable CW-complexes (have a countable set of cells) then

(X×Y) cX×Y (X\times Y)_c \simeq X \times Y

and so then the product topological space X×YX \times Y itself has CW-complex structure.

(e.g. Hatcher 2002, theorem A.6)

Up to homotopy equivalence


Every CW complex is homotopy equivalent to (the realization of) a simplicial complex.

See Gray, Corollary 16.44 (p. 149) and Corollary 21.15 (p. 206). For more see at CW approximation.


Every CW complex is homotopy equivalent to a space that admits a good open cover.


If YY has the homotopy type of a CW complex and XX is a finite CW complex, then the mapping space Y XY^X with the compact-open topology has the homotopy type of a CW complex.

(Milnor 59)



For XX a CW complex, the inclusion XXX' \hookrightarrow X of any subcomplex has an open neighbourhood in XX which is a deformation retract of XX'. In particular such an inclusion is a good pair in the sense of relative homology.

For instance (Hatcher 2002, prop. A.5).


For AXA \hookrightarrow X the inclusion of a subcomplex into a CW complex, then the pair (X,A)(X,A) is often called a CW-pair. This appears notably in the axioms for generalized (Eilenberg-Steenrod) cohomology.

e.g. (AGP 02, def. 5.1.11)

Cellular approximation theorem

The cellular approximation theorem states that every continuous map between CW complexes (with chosen CW presentations) is homotopic to a cellular map (a map induced by a morphism of cell complexes).

This is the analogue for CW-complexes of the simplicial approximation theorem (sometimes also called lemma): that every continuous map between the geometric realizations of simplicial complexes is homotopic to a map induced by a map of simplicial complexes (after subdivision).

For more see at cellular approximation theorem.


Fibrations between CW-complexes also behave particularly well: a Serre fibration between CW-complexes is a Hurewicz fibration.

Singular homology

We discuss aspects of the singular homology H n():H_n(-) \colon Top \to Ab of CW-complexes. See also at cellular homology of CW-complexes.

Let XX be a CW-complex and write

X 0X 1X 2X X_0 \hookrightarrow X_1 \hookrightarrow X_2 \hookrightarrow \cdots \hookrightarrow X

for its filtered topological space-structure with X n+1X_{n+1} the topological space obtained from X nX_n by gluing on (n+1)(n+1)-cells. For nn \in \mathbb{N} write nCellsSetnCells \in Set for the set of nn-cells of XX.


The relative singular homology of the filtering degrees is

H n(X k,X k1){[nCells] ifk=n 0 otherwise, H_n(X_k , X_{k-1}) \simeq \left\{ \array{ \mathbb{Z}[nCells] & if\; k = n \\ 0 & otherwise } \right. \,,

where [nCells]\mathbb{Z}[nCells] denotes the free abelian group on the set of nn-cells.

The proof is spelled out at Relative singular homology - Of CW complexes.


With k,nk,n \in \mathbb{N} we have

(k>n)(H k(X n)0). (k \gt n) \Rightarrow (H_k(X_n) \simeq 0) \,.

In particular if XX is a CW-complex of finite dimension of a CW-complex dimXdim X (the maximum degree of cells), then

(k>dimX)(H k(X)0). (k \gt dim X) \Rightarrow (H_k(X) \simeq 0).

Moreover, for k<nk \lt n the inclusion

H k(X n)H k(X) H_k(X_n) \stackrel{\simeq}{\to} H_k(X)

is an isomorphism and for k=nk = n we have an isomorphism

image(H n(X n)H n(X))H n(X). image(H_n(X_n) \to H_n(X)) \simeq H_n(X) \,.

This is mostly for instance in (Hatcher 2002, lemma 2.34 b),c)).


By the long exact sequence in relative homology, discussed at Relative homology – long exact sequences, we have an exact sequence

H k+1(X n,X n1)H k(X n1)H k(X n)H k(X n,X n1). H_{k+1}(X_n , X_{n-1}) \to H_k(X_{n-1}) \to H_k(X_n) \to H_k(X_n, X_{n-1}) \,.

Now by prop. the leftmost and rightmost homology groups here vanish when knk \neq n and kn1k \neq n-1 and hence exactness implies that

H k(X n1)H k(X n) H_k(X_{n-1}) \stackrel{\simeq}{\to} H_k(X_n)

is an isomorphism for kn,n1k \neq n,n-1. This implies the first claims by induction on nn.

Finally for the last claim use that the above exact sequence gives

H n1+1(X n,X n1)H n1(X n1)H n1(X n)0 H_{n-1+1}(X_n , X_{n-1}) \to H_{n-1}(X_{n-1}) \to H_{n-1}(X_n) \to 0

and hence that with the above the map H n1(X n1)H n1(X)H_{n-1}(X_{n-1}) \to H_{n-1}(X) is surjective.



Any undirected graph (loops and/or multiple edges allowed) has a geometric realization as a 1-dimensional CW complex.


The geometric realization of any simplicial set is a CW-complex (Milnor 57).

In particular, in the context of the homotopy hypothesis the Quillen equivalence between ∞-groupoids and nice topological spaces maps each ∞-groupoid to a CW-complex.


The n-spheres have a standard CW-complex structure, with exactly 2-cells in each dimension, obtained inductively by attaching two nn-dimensional hemispheres to the (n1)(n-1)-sphere regarded as the equator in the nn-sphere.

The infinite-dimensional sphere may be realized as the CW-complex which is the colimit over the resulting relative cell complex-inclusions S nS n+1S n+2S^n \hookrightarrow S^{n + 1} \hookrightarrow S^{n + 2} \hookrightarrow \cdots. \end{example}


Every projective space over the real numbers, complex numbers or quaternions has the structure of a CW-complex with a single cell i in each dimension kk, 2k2k or 4k4k, respectively. See at cell structure of K-projective space.


(smooth manifolds) Every compact smooth manifold admits a smooth triangulation (by the triangulation theorem) and hence a CW-complex structure.

In the generality of manifolds with group actions see at G-CW complex – G-manifolds.

Every noncompact smooth manifold of dimension nn is homotopy equivalent to an (n1)(n-1)-dimensional CW-complex. (Napier & Ramachandran).

examples of universal constructions of topological spaces:

\, point space\,\, empty space \,
\, product topological space \,\, disjoint union topological space \,
\, topological subspace \,\, quotient topological space \,
\, fiber space \,\, space attachment \,
\, mapping cocylinder, mapping cocone \,\, mapping cylinder, mapping cone, mapping telescope \,
\, cell complex, CW-complex \,


The introduction of the term is contained in

  • J. H. C. Whitehead, Combinatorial homotopy I , Bull. Amer. Math. Soc, 55, (1949), 213–245.

Basic textbook accounts:

Original articles include

  • John Milnor, On spaces having the homotopy type of a CW-complex, Trans. Amer. Math. Soc. 90 (2) (1959), 272-280.

  • John Milnor, The geometric realization of a semi-simplicial complex, Annals of Mathematics, 2nd Ser., 65, n. 2. (Mar., 1957), pp. 357-362; doi:10.2307/1969967, Semantic scholar pdf

On products of CW-complexes:

See also:

An inconclusive discussion here about what parts of the definition of a CW complex should be properties and what parts should be structure.

Last revised on February 5, 2024 at 03:12:51. See the history of this page for a list of all contributions to it.