MLE using multivariate normal distribution I am reading econometrics lecture notes of a Japanese professor. To explain MLE estimation he uses multivariate normal distribution.  

As you can see, the first line is the loglikelihood function and the second line is proportional to the first line equation. I cannot get my head around this. How and why the first equation can be written as the second one using trace of a matrix. I heard about "trace trick" and this must be the application of this trick, but I need help to understand it and possibly use it.
Thanks
The "trick" you are referring to is a property of the trace of a product of matrices, namely

$${\rm tr}(ABC) = {\rm tr}(BCA)$$

assuming the dimensions are conformable of course.  

Now, note that the dimension of $(x_n-\mu)^T\Sigma^{-1} (x_n-\mu)$, for each observation, is $1 \times 1$. So trivially,

$${\rm tr}\Big[(x_n-\mu)^T\Sigma^{-1} (x_n-\mu)\Big] = (x_n-\mu)^T\Sigma^{-1} (x_n-\mu) $$

But since also, from the mentioned property of the trace,

$${\rm tr}\Big[(x_n-\mu)^T\Sigma^{-1} (x_n-\mu)\Big] = {\rm tr}\Big[\Sigma^{-1} (x_n-\mu)(x_n-\mu)^T\Big]$$

combining one gets the alternative expression for the mutlivariate normal log-likelihood.