Two topological spaces (or metric spaces) X,Y are homotopy equivalent if there exist continuous functions f:X→Y and g:Y→X such that g◦f is homotopic to the identity map on X, and f◦g is homotopic to the identity map on Y. This is an equivalence relation, weaker than homeomorphic; for example, all convex subsets (see convex set) of ℝn are homotopy equivalent to a point. Homotopy equivalent spaces have isomorphic fundamental groups.