I have 3 given matrices $A,B$ and $C$ and an unknown scalar $\alpha$. I would like to find the derivative $\frac{\partial f(\alpha)}{\partial\alpha}$ of the following function: $f(\alpha)=\mathrm{trace}\big((A-\alpha BC)^T(A-\alpha BC)\big)$.
When I derived I found that it should be the sum of all the entries in the matrix $-C^TB^T(A-\alpha BC)-(A-\alpha BC)^TBC$ but it doesn't look correct to me.
Hint : you can expand $(A-\alpha BC)^T(A-\alpha BC)$ and then you may see $f$ as a polynomial in $\alpha$ (don't forget that the trace is linear!).