We can also see this as an optimization problem:

Then:

We can reformulate the problem as searching for:

Being vectors and we can write:

And also we rewrite the constraint: , () as:

Then the problem becomes:

Lagrangian Approach:

Using the HCR - Lagrangian Theorem we can rewrite the problem as:

and search for its minimum, so:

Then we have:

So, with a bit of substitutions we obtain: