# Matrix differentiation for Maximum Likelihood Estimator

In trying to derive the maximum likelihood estimator for the mean, $\mu$, of a p-variate normal distribution it is needed to differentiate $\sum_{i=1}^n(x_i-\mu)^T\Sigma^{-1}(x_i-\mu)$ w.r.t the vector $\mu$. After doing this I am left with the derivative $-2\sum_{i=1}^n(x_i-\mu)^T\Sigma^{-1}$. In order to solve for $\mu$ it is necessary to equate this to zero, however I will then not solve for $\mu$ but for $\mu^T$.

Also, my lecturer seems to say that the derivative of the aforementioned expression w.r.t $\mu$ is actually the transpose of my answer, which will lead to solving for $\mu$ directly.

Somewhere I have read that the derivative can be defined in terms of either a column or row vector. Is this why my answer is different than my lecturer's answer and is it still correct to solve for $\mu^T$?

If this bothers you, then simply write that "We find the MLE by computing the gradient of the likelihood and setting the gradient equal to 0. This results in the equation $\sum_{i} \Sigma^{-1} (x_{i}-\mu)=0$." The quoted sentence is correct under either convention because we've explicitly referred to the gradient (column vector) rather than the derivative.
Note that it is nearly universal in statistics to use a column vector $\mu$ for the mean of a multivariate normal distribution.