2D Gaussian Density Visualizer

Set a mean and a positive semi-definite covariance matrix. The plot updates live as you change values. Axes are fixed so you can see the spread change.

\( \mathcal{N}(x; \mu, \Sigma) = \dfrac{1}{\sqrt{(2\pi)^d \det \Sigma}} \exp\!\left(-\tfrac{1}{2}(x-\mu)^\top \Sigma^{-1} (x-\mu)\right) \)

Mean

Covariance matrix \( \Sigma \)

\( \Sigma = \begin{pmatrix}\Sigma_{11} & \Sigma_{12} \\ \Sigma_{12} & \Sigma_{22}\end{pmatrix} \)

Samples

Samples Density level lines Mean μ First covariance eigenvector Second covariance eigenvector