Let KXd​ be a vector space with basis Xd​={x1​,…,xd​} over a field
K of characteristic 0. One of the main topics of classical invariant theory
is the study of the algebra of invariants K[Xd​]SL2​(K), where KXd​ is a
module of the special linear group SL2​(K) isomorphic to a direct sum
Vk1​​⊕⋯⊕Vkr​​ and Vk​ is the SL2​(K)-module of binary
forms of degree k. Noncommutative invariant theory deals with the algebra of
invariants Fd​(V)G of the group G<GLd​(K) acting on the
relatively free algebra Fd​(V) of a variety of K-algebras
V. In this paper we consider the free metabelian Lie algebra
Fd​(A2) which is the relatively free algebra in the variety
A2 of metabelian (solvable of class 2) Lie algebras. We study
the algebra Fd​(A2)SL2​(K) of SL2​(K)-invariants of
Fd​(A2). We describe the cases when this algebra is finitely
generated. This happens if and only if KXd​≅V1​⊕V0​⊕⋯⊕V0​ or KXd​≅V2​ as an SL2​(K)-module (and in
the trivial case KXd​≅V0​⊕⋯⊕V0​). For small d we give
a list of generators even when Fd​(A2)SL2​(K) is not finitely
generated. The methods for establishing that the algebra Fd​(A2)SL2​(K) is not finitely generated work also for other relatively free
algebras Fd​(V) and for other groups G.Comment: Revised version of the preprint posted in Dec. 201