I want to calculate $vec{x}$ such that the expression

$$

lVerthat{A} vec{x} – vec{B}rVertĀ²

$$

shall be minimized under the constraint, that each component $x_i$ of the vector $vec{x}$ shall be positive.

I tried it with Lagrange-multipliers, but I didn’t know how to formulate the constraint, since I only came up with $x_i = vert x_ivert$, which isn’t a function $mathbb{R}^n to mathbb{R}$, which I would need (as far as I understood).

It would be great, if you could help me.