TITLE: Multivariate Gaussian Definition when Covariance matrix is singular, What's wrong?
QUESTION [8 upvotes]: Given
$$\mathbf{\Sigma} \in \mathbb R^{k \times k}$$
$$\mathbf{u} \in \mathbb R^k$$
The multivariate Gaussian pdf can be determined By definition:
$$f(\mathbf{x})=\frac{1}{2\pi^{\frac{-k}{2}}|\Sigma|^{\frac{1}{2}}}e^{\frac{1}{2}(\mathbf{x-u})^T\mathbf{\Sigma}^{-1}(\mathbf{x-u})}$$
The Covariance matrix is only limited to be positive semidefinite.
So it could be singular (Non-invertible)
This will also lead to a zero in the denumerator, and also the $\Sigma^{-1}$ doesn't exist.
What we do in that case to write the joint pdf?

REPLY [2 votes]: The multivariate normal distribution with a singular $k\times k$ variance $\Sigma$ does not have a density function with respect to the usual $k$-dimensional measure $dx_1\cdots dx_k.$
But it is still characterized by the expected value $\mu\in\mathbb R^{k\times1}$ and variance $\Sigma\in\mathbb R^{k\times k}$ in the sense that no other Gaussian distribution has those same values of $\mu$ and $\Sigma.$
The "definition" you mention is not actually the definition, but rather a consequence of the definition. Either of the following characterizations can be taken to be the definition:

$X$ has a $k$-dimensional normal distribution if for every constant (i.e. non-random) vector $a\in\mathbb R^{k\times1},$ the random variable $a^TX$ has a $1$-dimensional normal distribution.

For some matrix $A\in\mathbb R^{k\times r},$ $X=AZ,$ where $Z= (Z_1,\ldots,Z_r)^T$ and $Z_1,\ldots,Z_r\sim\operatorname N_1(0,1).$


In the latter case you have $\Sigma=AA^T.$