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?