algebra admitting an ad-invariant metric the next equality holds $$\label{e2}
\dim \ggo=\dim C^r(\ggo) + \dim C_r(\ggo).$$ For the case $r=1$ one obtains $$\label{e1}
\dim \ggo=\dim \zz(\ggo) + \dim C^1(\ggo).$$

Let ${\mathfrak n }$ denote a $2$-step nilpotent Lie algebra equipped with an ad-invariant metric. Assume $\zz({\mathfrak n })=C^1({\mathfrak n })$, then by (\[e1\]) the metric is neutral and $\dim {\mathfrak n }= 2 \dim \zz({\mathfrak n })$. As a consequence the Heisenberg Lie algebra $\hh_n$ cannot be equipped with any ad-invariant metric.

Examples of nilpotent Lie algebras satisfying the equality (\[e2\]) above for every $r$ arise by considering the semidirect product of a nilpotent Lie algebra $\nn$ with its dual space via de coadjoint representation $\nn \ltimes \nn^*$. The natural neutral metric on $\nn \ltimes \nn^*$ is ad-invariant.

Nevertheless, condition (\[e1\]) (and hence (\[e2\])) is not sufficient for a 2-step nilpotent Lie algebra to admit an ad-invariant metric as shown for instance in [@Ov2].

\[le11\] Let ${\mathfrak g }$ denote a 2-step solvable Lie algebra provided with an ad-invariant metric, then ${\mathfrak g }$ is nilpotent and at most 3-step.

Let $\la\,,\,\ra$ denote an ad-invariant metric on ${\mathfrak g }$. Since ${\mathfrak g }$ is 2-step solvable for all $x,y 