  Let $KX_d$ be a vector space with basis $X_d=\{x_1,\ldots,x_d\}$ 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[X_d]^{SL_2(K)}$, where $KX_d$ is a
module of the special linear group $SL_2(K)$ isomorphic to a direct sum
$V_{k_1}\oplus\cdots\oplus V_{k_r}$ and $V_k$ is the $SL_2(K)$-module of binary
forms of degree $k$. Noncommutative invariant theory deals with the algebra of
invariants $F_d({\mathfrak V})^G$ of the group $G<GL_d(K)$ acting on the
relatively free algebra $F_d({\mathfrak V})$ of a variety of $K$-algebras
$\mathfrak V$. In this paper we consider the free metabelian Lie algebra
$F_d({\mathfrak A}^2)$ which is the relatively free algebra in the variety
${\mathfrak A}^2$ of metabelian (solvable of class 2) Lie algebras. We study
the algebra $F_d({\mathfrak A}^2)^{SL_2(K)}$ of $SL_2(K)$-invariants of
$F_d({\mathfrak A}^2)$. We describe the cases when this algebra is finitely
generated. This happens if and only if $KX_d\cong V_1\oplus
V_0\oplus\cdots\oplus V_0$ or $KX_d\cong V_2$ as an $SL_2(K)$-module (and in
the trivial case $KX_d\cong V_0\oplus\cdots\oplus V_0$). For small $d$ we give
a list of generators even when $F_d({\mathfrak A}^2)^{SL_2(K)}$ is not finitely
generated. The methods for establishing that the algebra $F_d({\mathfrak
A}^2)^{SL_2(K)}$ is not finitely generated work also for other relatively free
algebras $F_d({\mathfrak V})$ and for other groups $G$.
