For simply connected CW complexes X with finitely many, finitely generated homotopy groups,
1
^{1}
the path components of the function space
M
(
X
,
X
)
M(X,X)
of free self-maps of X are all of the same rational homotopy type if and only if all the k-invariants of X are of finite order. In case X is rationally a two-stage Postnikov system the space
M
0
(
X
,
X
)
{M_0}(X,X)
of inessential self-maps of X has the structure of rational H-space if and only if the k-invariants of X are of finite order.