Let $X$ be a connected CW-complex with $\pi\_k(X)$ trivial for $k >2$. Is it known under which circumstances $X$ is an $H$-group?


I have been able only to deduce the necessary condition that $\pi\_1(X)$ has to be abelian and act trivially on $\pi\_2(X)$. Furthermore, if the necessary condition holds, vanishing of the Postnikov invariant $\beta \in H^3( \pi\_1(X), \pi\_2(X))$ is a sufficient condition. Thus the interesting case is that of $\beta$ nonzero.



Which homotopy 2-types are H-spaces?
The necessary condition is a "additivity"-type condition on the $k$-invariant.


Suppose $\pi\_1 X = G$ and $\pi\_2 X = A$. As you correctly point out, $G$ must be abelian and act trivially on $A$. Under these circumstances, the $k$-invariant is expressible as a natural map of pointed spaces
$$
\beta: K(G,1) \to K(A,3).
$$
(Normally $\beta$ can only be constructed as a map $K(G,1) \to K(A\_G, 3)$ in terms of the coinvariants.) The space $X$ is the homotopy fiber of $\beta$, and the $k$-invariant of $X \times X$ is $\beta \times \beta$.


This means that, in order to get an $H$-space, it is necessary and sufficient to get a homotopy commutative diagram of pointed spaces:
$\require{AMScd}$
$$
\begin{CD}
K(G,1) \times K(G,1) @>m>> K(G,1)\\
@V \beta \times \beta V V @VV \beta V\\
K(A,3) \times K(A,3) @>>m> K(A,3)
\end{CD}
$$
Here $m$ is the $H$-space multiplication on Eilenberg--Mac Lane spaces for abelian groups, which induces addition on cohomology. In terms of the projection maps $p\_i: K(G,1) \times K(G,1) \to K(G,1)$, homotopy commutativity of this diagram says that
$$
m^\*(\beta) = p\_1^\*(\beta) + p\_2^\*(\beta).
$$


If there is a sufficiently good Kunneth formula (e.g. if $A$ is a ring and $H\_\*(K(G,1);A)$ are finitely generated projective) then $m^\*$ is a "coproduct"
$$
m^\*: H^\*(K(G,1); A) \to H^\*(K(G,1); A) \otimes\_A H^\*(K(G,1); A)
$$
and under this identification we are asking that $\beta$ is primitive: $m^\*(\beta) = \beta \otimes 1 + 1 \otimes \beta$.


If we think of $\beta$ as representing a cohomology operation $H^1(-;G) \to H^3(-;A)$, this condition equivalently asks that $\beta$ is additive: $\beta(x + y) = \beta(x) + \beta(y)$.


