In mathematics, a path in a topological space X is a continuous function f from the unit interval I = [0,1] to X
The initial point of the path is f(0) and the terminal point is f(1). One often speaks of a "path from x to y" where x and y are the initial and terminal points of the path. Note that a path is not just a subset of X which "looks like" a curve, it also includes a parameterization. For example, the maps f(x) = x and g(x) = x2 represent two different paths from 0 to 1 on the real line.
A loop in a space X based at x ∈ X is a path from x to x. A loop may be equally well regarded as a map f : I → X with f(0) = f(1) or as a continuous map from the unit circle S1 to X
This is because S1 may be regarded as a quotient of I under the identification 0 ∼ 1. The set of all loops in X forms a space called the loop space of X.
A topological space for which there exists a path connecting any two points is said to be path-connected. Any space may be broken up into a set of path-connected components. The set of path-connected components of a space X is often denoted π0(X);.
One can also define paths and loops in pointed spaces, which are important in homotopy theory. If X is a topological space with basepoint x0, then a path in X is one whose initial point is x0. Likewise, a loop in X is one that is based at x0.
Paths and loops are central subjects of study in the branch of algebraic topology called homotopy theory. A homotopy of paths makes precise the notion of continuously deforming a path while keeping its endpoints fixed.