*Submitted Paper*

**Inserted:** 11 jan 2018

**Last Updated:** 12 jan 2018

**Year:** 2017

**Abstract:**

We study the Ricci tensor of left-invariant pseudoriemannian metrics on Lie groups. For an appropriate class of Lie groups that contains nilpotent Lie groups, we introduce a variety with a natural $\mathrm{GL}(n,\mathbb{R})$ action, whose orbits parametrize Lie groups with a left-invariant metric; we show that the Ricci operator can be identified with the moment map relative to a natural symplectic structure. From this description we deduce that the Ricci operator is the derivative of the scalar curvature $s$ under gauge transformations of the metric, and show that Lie algebra derivations with nonzero trace obstruct the existence of Einstein metrics with $s\neq0$. Using the notion of nice Lie algebra, we give the first example of a left-invariant Einstein metric with $s\neq0$ on a nilpotent Lie group. We show that nilpotent Lie groups of dimension $\leq 6$ do not admit such a metric, and a similar result holds in dimension $7$ with the extra assumption that the Lie algebra is nice.