Short question:
How can I calculate $\dfrac{\partial A}{\partial L}$ where $A = \|Lx\|^2_2= x^TL^TLx$?
Is it $\dfrac{\partial A}{\partial L}=2Lx^tx$?
Long question:
I want to calculate the gradient of a Mahalanobis distance. More specifically, I like to calculate the gradient of $A$ in terms of $L$, ($\frac{\partial A}{\partial L}$).
$A = \|Lx\|^2_2= x^TL^TLx$
I expand the equation and calculate the gradient element by element and it seems it should be something like $\frac{\partial A}{\partial L}=2Lx^tx$. But, it's very slow! Would you please confirm the correctness of answer? and help me find a faster approach?
Thanks