Let us call a group object $G$ in a category $\mathcal C$ *rigid*, if it has the following property: For every group object $X$ in $\mathcal C$, every morphism $G\to X$ in $\mathcal C$ respecting the unit sections is already a morphism of group objects.


As a formal consequence, rigid group objects are commutative (because the inversion is a group object morphism).


This definition is motivated by the following fact: If $\mathcal C$ is the category of algebraic varieties over $\mathbb C$ (say), then the rigid group objects in $\mathcal C$ are precisely the complex abelian varieties. Indeed, that abelian varieties enjoy the rigidity property is a "standard fact", and the converse follows quickly from Chevalley's structure theorem (every algebraic group is an extension of an abelian variety by an affine group).


If $\mathcal C$ is the category of sets or of hausdorff topological spaces, there are no interesting rigid group objects. I am puzzled with the case where $\mathcal C$ is the category whose objects are the topological spaces which are homotopy equivalent to CW-complexes and morphisms are continuous maps up to homotopy. A group object in this category is commonly called $H$--group. 



> 
> Is it true that the rigid $H$--groups are exactly the products of circles?
> 
> 
> 



Which $H$--groups satisfy the rigidity property of abelian varieties?
Even the circle is not rigid in this sense! With such a weak notion of "group up to homotopy" you can make a multiplication on $G=K(\mathbb Z,1)\times K(\mathbb Z,2)$ such that there is no nontrivial homomorphism from $K(\mathbb Z,1)$.


Edit: Let me explain and generalize, showing that a point is the only example.


For $n>0$ and $F$ a field, take the product $G=K(F,n)\times K(F,2n)$ and define a multiplication $\mu:G\times G\to G$ as follows. Let $a\in H^n(G;F)$ and $b\in H^{2n}(G;F)$ be the canonical elements so that maps $f:X\to G$ correspond bijectively with pairs $(f^\*a\in H^n(X;F),f^\*b\in H^{2n}(X;F))$. Define $\mu$ by 


$\mu^\*a=a\times 1+1\times a$


$\mu^\*b=b\times 1+1\times b +a\times a$. 


This is unital. It is associative up to homotopy since both $\mu\circ (\mu\times 1)$ and $\mu\circ (1\times \mu)$ pull back $a$ to 


$a\times 1\times 1+1\times a\times 1+1\times 1\times a$


and pull back $b$ to 


$b\times 1\times 1+1\times b\times 1+1\times 1\times b+a\times a\times 1+a\times 1\times a+1\times a\times a$.


An inverse map exists because the shearing map $(x,y)\mapsto (x,\mu(x,y))$ is a homotopy equivalence. 


Now if $(X,m:X\times X\to X)$ is any group up to homotopy and $\alpha\in H^n(X;F)$ any element, then the map $f:X\to G$ given by $f^\*a=\alpha$ and $f^\*b=0$ cannot be a homomorphism unless $\alpha=0$, since $\mu\circ (f\times f)$ pulls back $b$ to $f^\*b\times 1+1\times f^\*b+f^\*a\times f^\*a=\alpha\times \alpha$ while $f\circ m$ pulls back $b$ to $0$.


So $X$ cannot have any cohomology at all in positive dimensions, for any coefficient field. Since $\pi\_1(X)$ must be abelian, this makes $X$ homotopically discrete, which as Neil pointed out makes it trivial.


