An inverse of a morphism in a category (or an element of a monoid) is another morphism which is both a left-inverse (a retraction) as well as a right-inverse (a section) of , in that
equals the identity morphism on and
equals the identity morphism on .
A morphism which has an inverse is called an isomorphism.
The inverse is unique if it exists.
The inverse of an inverse morphism is the original morphism, .
A category in which all morphisms have inverses is called a groupoid.
An amusing exercise is to show that if are morphisms such that are defined and are isomorphisms, then are all isomorphisms.
This is a special case of the 2-out-of-6-property which is satisfied by the weak equivalences in any homotopical category.
When this is applied to a homotopy category such as that of Top for the standard model structure on topological spaces it implies the construction of and formulae for certain homotopies.
These can be a little more complicated; see quasigroup for some discussion of the one-object version.