Obstruction is a concept in homotopy theory where an invariant equals zero if a corresponding problem is solvable and is non-zero otherwise. Let Y be a space, and assume for convenience that Y is n-simple for every n, that is, the action of π_{1}(y) on π_{n}(y) is trivial for every n. Under this hypothesis we can forget about base points for homotopy groups, and any map ƒ: S → Y determines an element of π_{n}(Y).

Let B be a complex and A a subcomplex. Write X^{n} for A U B^{n}, where B^{n} denotes the n-skeleton of B. Let σ be an (n + I)-cell of B which is not in A. Let g = g_{σ} be the attaching map σ^{.} = S^{n} → X^{n} ⊂ B.

Given a map ƒ: X^{n} → Y, denote by c(ƒ) the cochain in C^{n+1} (B, A; π_{n}(Y)) given by c(ƒ): σ → [f º g_{σ}]. Then it is clear that ƒ may be extended over X^{n} ∪ _{gσ} σ iff f º g_{σ} is null-homotopic, that is, iff c(ƒ)(σ) = 0, and therefore that ƒ can be extended over X^{n+1} = A ∪ B^{n+1} if the cochain c(ƒ) is the zero cochain. It is a theorem of obstruction theory that c(ƒ) is a cocycle. It is called the obstruction cocycle or “the obstruction to extending ƒ over B^{n+1}“

There are two immediate applications. First, any map of an n-dimensional complex K into an n-connected space X is null-homotopic.

Take (B, A) = (K x I, K x i) and define ƒ:A → X by the given map K → X on one piece and a constant map on the other piece; then ƒ can be extended over B because the obstructions lie in the trivial groups π_{i}(X).

Second, as a particular case, a finite-dimensional complex K is contractible iff π_{i}(K) is trivial for all i < dim K.

Suppose ƒ, g are two maps X^{n} → Y which agree on X^{n-1}. Then for each n-cell of B which is not in A, we get a map S^{n} → Y by taking ƒ and g on the two hemispheres. The resulting cochain of C^{n}(B, A; π_{n}(Y)) is called the difference cochain of ƒ and g, denoted d(ƒ, g).