1. ## Derivative wrt vector

I need to minimize
$\frac{1}{||x||^2}||ax-\mu x||^2$,
where x, a and $\mu$ are vectors in $R^n$.
My Idea was to take the derivative, set it to zero and solve for x, but I'm not good in matrix calculus. I would be extremely thankful if somebody could help me here!

2. ## Re: Derivative wrt vector

If $a$, $\mu$, and $x$ are vectors, how are you defining " $ax$" and " $\mu x$"? Is that the dot product? But then it wouldn't make sense to take the norm of $ax- \mu x$ which would be a number! Are you sure that $a$ and $\mu$ are not scalars?

3. ## Re: Derivative wrt vector

yes, the dot product is meant here and the result of the term should be a number. I need to find the optimal value of x given a and mu.

4. ## Re: Derivative wrt vector

Originally Posted by goftl
yes, the dot product is meant here and the result of the term should be a number. I need to find the optimal value of x given a and mu.
you can just combine a and $\mu$ into

$c=a-\mu$ and then find $x$ to minimize

$\dfrac {\|c\cdot x\|^2}{\|x\|^2}$

This is clearly minimized if $x$ is orthogonal to $c$

As $c\in \mathbb{R}^n$ there is an (n-1) dimensional subspace containing all these vectors orthogonal to $c$

5. ## Re: Derivative wrt vector

thanks this helped me a lot!