A,B,C are all matrix, how to calculate the gradient of $f(A)$ $$ f(A) = ABC $$ and $$ g(A) = BAC $$
I know that when the unknown matirx is at the right most the gradient of $$ f(A) = BCA $$ is $$ \nabla f(A)=(BC)^T $$ but I cannot figure out how to get the gradient of the situation I listed above.
If suppose f is differentiable then gradient of a function at a point is same as total differentiation at that point for any direction.
Here $DF(A)(H)=HBC$
and hence $\nabla f(A)(H)=HBC.$