In topology, two continuous functions from one topological space to another are called homotopic (from Greek ὁμός homós "same, similar" and τόπος tópos "place") if one can be "continuously deformed" into the other, such a deformation being called a homotopy between the two functions. A notable use of homotopy is the definition of homotopy groups and cohomotopy groups, important invariants in algebraic topology.
In practice, there are technical difficulties in using homotopies with certain spaces. Algebraic topologists work with compactly generated spaces, CW complexes, or spectra.
Formally, a homotopy between two continuous functions f and g from a topological space X to a topological space Y is defined to be a continuous function H : X × [0,1] → Y from the product of the space X with the unit interval [0,1] to Y such that, if x ∈ X then H(x,0) = f(x) and H(x,1) = g(x).
If we think of the second parameter of H as time then H describes a continuous deformation of f into g: at time 0 we have the function f and at time 1 we have the function g. We can also think of the second parameter as a "slider control" that allows us to smoothly transition from f to g as the slider moves from 0 to 1, and vice versa.
An alternative notation is to say that a homotopy between two continuous functions f, g : X → Y is a family of continuous functions ht : X → Y for t ∈ [0,1] such that h0 = f and h1 = g, and the map (x,t) ↦ ht(x) is continuous from X × [0,1] to Y. The two versions coincide by setting ht(x) = H(x,t). It is not sufficient to require each map ht(x) to be continuous.