I came across a question pertaining to finding the derivative of a particular matrix expression. How do you compute the derivative of a matrix algebra expression?
The article the question refers to can be found at: https://web.archive.org/web/20180403213813/http://jimherold.com/2012/04/20/least-squares-bezier-fit/
Anyway, I am wondering if the logic from the answer (and thus the derivative) applies to other matrix expressions of the form $$E(C_y) = (y - \mathbb{T}MC_y)^T(y - \mathbb{T}MC_y)$$ or if there is something special about the matrix M (potentially that it is lower triangular?) that causes the derivative to be $$\frac{\partial E} {\partial C} = -2\mathbb{T}^T(y-\mathbb{T}MC_y)$$
In particular, if M is not triangular, would the derivative be the same? And if not, how could one find it?