Linear optimization problem of $argmin$ Consider a vector $a \in R^n$.

I want to know how I can find analytically the solution of the following optimization problem: $x^* = argmin_{x \in R^n} f(x)$, where  


$f(x) = ||x-a||_{2}^2 + \lambda ||x||_1$
$\lambda &gt; 0$ and
$||.||_p$ is the p-norm in $R^n$.


Thanks in advance.
In response to the comments suggesting subgradient descent methods: the problem in the question does not contain any sum or similar terms, therefore the variables are independent of each other and there is a closed-form solution:
$$ x^* = 
\begin{cases}
    a - \frac{\lambda}{2},&amp; \text{if } a &gt; \frac{\lambda}{2}\\
    a + \frac{\lambda}{2},&amp; \text{if } -a &gt; \frac{\lambda}{2}\\
    0,              &amp; \text{otherwise}
\end{cases}
$$