In the mathematical field of topology, a homeomorphism or topological isomorphism or bicontinuous function (from the Greek words ὅμοιος (homoios) = similar and μορφή (morphē) = shape, form) is a continuous function between two topological spaces that has a continuous inverse function. Homeomorphisms are the isomorphisms in the category of topological spaces — that is, they are the mappings which preserve all the topological properties of a given space. Two spaces with a homeomorphism between them are called homeomorphic, and from a topological viewpoint they are the same.
Roughly speaking, a topological space is a geometric object, and the homeomorphism is a continuous stretching and bending of the object into a new shape. Thus, a square and a circle are homeomorphic to each other, but a sphere and a doughnut are not. An oftenrepeated joke is that topologists can't tell the coffee cup from which they are drinking from the doughnut they are eating, since a sufficiently pliable doughnut could be reshaped to the form of a coffee cup by creating a dimple and progressively enlarging it, while shrinking the hole into a handle.
Topology is the study of those properties of objects that do not change when homeomorphisms are applied. As Henri Poincaré famously said, mathematics is not the study of objects, but instead, the relations (isomorphisms for instance) between them.
Contents 
A function f: X → Y between two topological spaces (X, T_{X}) and (Y, T_{Y}) is called a homeomorphism if it has the following properties:
A function with these three properties is sometimes called bicontinuous. If such a function exists, we say X and Y are homeomorphic. A selfhomeomorphism is a homeomorphism of a topological space and itself. The homeomorphisms form an equivalence relation on the class of all topological spaces. The resulting equivalence classes are called homeomorphism classes.
The third requirement, that ƒ ^{−1} be continuous, is essential. Consider for instance the function ƒ : [0, 2π) → S^{1} defined by ƒ(φ) = (cos(φ), sin(φ)). This function is bijective and continuous, but not a homeomorphism.
Homeomorphisms are the isomorphisms in the category of topological spaces. As such, the composition of two homeomorphisms is again a homeomorphism, and the set of all selfhomeomorphisms X → X forms a group, called the homeomorphism group of X, often denoted Homeo(X); this group can be given a topology, such as the compactopen topology, making it a topological group.
For some purposes, the homeomorphism group happens to be too big, but by means of the isotopy relation, one can reduce this group to the mapping class group.
Similarly, as usual in category theory, given two spaces that are homeomorphic, the space of homeomorphisms between, Homeo(X, Y) them is a torsor for the homeomorphism groups Homeo(X) and Homeo(Y), and given a specific homeomorphism between X and Y, all three sets are identified.
The intuitive criterion of stretching, bending, cutting and gluing back together takes a certain amount of practice to apply correctly — it may not be obvious from the description above that deforming a line segment to a point is impermissible, for instance. It is thus important to realize that it is the formal definition given above that counts.
This characterization of a homeomorphism often leads to confusion with the concept of homotopy, which is actually defined as a continuous deformation, but from one function to another, rather than one space to another. In the case of a homeomorphism, envisioning a continuous deformation is a mental tool for keeping track of which points on space X correspond to which points on Y — one just follows them as X deforms. In the case of homotopy, the continuous deformation from one map to the other is of the essence, and it is also less restrictive, since none of the maps involved need to be onetoone or onto. Homotopy does lead to a relation on spaces: homotopy equivalence.
There is a name for the kind of deformation involved in visualizing a homeomorphism. It is (except when cutting and regluing are required) an isotopy between the identity map on X and the homeomorphism from X to Y.
