# What is the dimension of the Gaussian log-likelihood function?

I am having trouble comprehending the log-likelihood of a multivariate normal distribution.

For an n-dimensional vector $\mathbf{r}$ of N i.i.d. data points $\mathbf{r}=(r_1,...,r_N)$, the log-likelihood of the Gaussian pdf should be

$$-2 \ln L = \mathbf{r}^{T} C^{-1} \mathbf{r} + \ln\det C + N\ln(2\pi)$$

where $C$ is an $N\times N$ dimensional covariance matrix which includes the model parameters.

The likelihood function describes the probability density of the data (i.e. the observations) given the parameters (i.e. the model).

Question: what is the dimension of this expression for the log-likelihood?

$N\ln(2\pi)$ is a constant, i.e. it is just a number.

$\ln\det C$ also sums to a single number

The vector $\mathbf{r}$ should be a vector of the dimension (rows, columns) = (N, 1), and the tranpose should be a vector of the dimension (1,N).

If I multiply $\mathbf{r}^{T} C^{-1} \mathbf{r}$, I get (1,N)(N,N)(N,1) = a single number.

So, it seems to me that this function is a constant....but it's a function. A function of fixed data to the parameters.

What is my mistake in comprehension?

Might be easier to interpret if you think of $r$ as $$r = (x - \mu)$$ where mu is a fixed vector and $x$ is a vector for which you are asking the question, "how likely is $x$, given a fixed $\mu$ (and $C$)?"
For example, if you label some pixels (vectors in 3D) in a picture as being skin or not-skin, then you can construct 2 multivariate normals for each label. Each of these distributions will have their own $\mu$ (3D) and covariance (3x3). Then, you can evaluate unlabeled pixels under each state. When combined with prior information about skin/non-skin, you can use a Bayesian approach to determine the posterior probability that an unlabeled pixel is skin.
The log likelihood is a function of $C$, which is the parameter that you're estimating.