I am having a bit of trouble understanding how the matrix multiplication is carried out in the exponent term of the multivariate gaussian distribution.
I am going to call the covariance matrix C.
In the exponent term for the multivariate gaussian, it looks like -1/2 (x-u)^T C^-1 (x-u)
Lets assume we have x be a 600x2 dataset (2 features), and the covariance matrix be a 2x2 matrix In that case, C^-1 would be a 2x2 matrix, (x-u) would be a 600x2 matrix, thus (x-u)^T would be a 2x600 matrix.
In the matrix product order, (x-u)^T * C^-1 is dotting a 2x600 matrix to a 2x2 matrix, which does not match the dimensions. Similarly, if first doing C^-1 * (x-u)^T, this dots a 2x2 with a 600x2, which also is unfeasible dimensionally. Thus, is the proper way to always compute this to:
First compute (x-u)^T (dot) (x-u) , and then dot that with C^-1 , with C^-1 on the right?
Or am I looking past an important detail?