In mathematics, an H-space, or a topological unital magma, is a topological space X (generally assumed to be connected) together with a continuous map μ : X × X → X with an identity element e so that μ(e, x) = μ(x, e) = x for all x in X. Alternatively, the maps μ(e, x) and μ(x, e) are sometimes only required to be homotopic to the identity (in this case e is called homotopy identity), sometimes through basepoint preserving maps. These three definitions are in fact equivalent for H-spaces that are CW complexes. Every topological group is an H-space; however, in the general case, as compared to a topological group, H-spaces may lack associativity and inverses.
The multiplicative structure of an H-space adds structure to its homology and cohomology groups. For example, the cohomology ring of a path-connected H-space with finitely generated and free cohomology groups is a Hopf algebra. Also, one can define the Pontryagin product on the homology groups of an H-space.
The fundamental group of an H-space is abelian. To see this, let X be an H-space with identity e and let f and g be loops at e. Define a map F: [0,1]×[0,1] → X by F(a,b) = f(a)g(b). Then F(a,0) = F(a,1) = f(a)e is homotopic to f, and F(0,b) = F(1,b) = eg(b) is homotopic to g. It is clear how to define a homotopy from [f][g] to [g][f].