The Multivariate Gaussian
W03 · Part 1 — what Σ controls, and why affine maps never leave the family
Uma Satyaranjan · Soma S Dhavala
Invalid Date
Where we are
- W02 ended at maximum likelihood in one dimension
- Data is not one-dimensional: an MNIST digit is a point in
- Today: the one family that survives everything we do to it
The claim to keep in view: almost every operation in this course is linear — adding noise, blending signal and noise, projecting, marginalising. The Gaussian is closed under all of them, with parameters you can compute in closed form.
The density
For in , with symmetric positive definite,
- The exponent is a quadratic form — so level sets are ellipsoids, always
- moves the centre; sets the shape, spread and tilt
- in the constant is the volume factor that makes it integrate to 1
What it costs to go multivariate
A full has free entries, plus for the mean:
| 2 |
5 |
| 10 |
65 |
| 784 (MNIST) |
308,504 |
This is the first honest sign of trouble in high dimension — and the reason structure (diagonal, low-rank, factorised) is not laziness but necessity.
Identity covariance: the joint is a product
Set , . The exponent becomes a sum of squares, and a sum in the exponent is a product outside it:
So is exactly independent standard normals.
Diagonal independent coordinates — but only because it is Gaussian. In general, uncorrelated does not imply independent.
The results, in one table
throughout.
| Affine map |
|
| Projection |
|
| Marginal |
— delete the other rows and columns |
| Independent sum |
|
| Whitening |
|
| MGF |
|
The first line is the engine. Everything above it is a special case — and we prove it now.
The claim
Theorem. Let in , and let , . Then
Two separate things to establish, and it is worth not conflating them:
- the mean and covariance are what the formula says — true for any distribution with two moments, no normality involved;
- the result is still Gaussian — this is the part with content.
Step 1 — mean and covariance need no normality
Linearity of expectation:
And straight from the definition of covariance, using :
is constant, so it comes outside the expectation:
Note has vanished — shifting cannot change a covariance.
Detour: the moment generating function
For a random vector in ,
Why “moment generating”. Expand and differentiate at the origin — each derivative pulls down one moment:
One function of , carrying every moment of .
Why the MGF is enough
Uniqueness theorem. If for all in some open neighbourhood of the origin, then and have the same distribution.
The MGF does not merely summarise a law — it determines it. That is what licenses the whole strategy: compute an MGF, recognise its shape, conclude.
The honest caveat. Not every distribution has an MGF — is infinite for a Cauchy at every . The repair is the characteristic function , which always exists () and obeys the same theorem. For the Gaussian the MGF exists everywhere, so we use the simpler object.
The MGF of a Gaussian — scalar case
. Everything lives in the exponent:
Complete the square in the exponent:
The first part leaves the integral; the rest is a Gaussian density with mean , which integrates to :
…and in dimensions
For the coordinates are independent, so the expectation factorises:
For , substitute with . The Jacobian cancels the in the constant, leaving the standard case at :
Remember the shape: the exponent is a quadratic in . Everything below follows from that alone. (This was a change of variables in an integral, not the affine theorem — so no circularity.)
Step 2 — compute the MGF of
definition of the MGF, then substitute
is constant, so leaves the expectation
since
That third line is the move. The matrix has been pushed off the random vector and onto the argument. The expectation is now just evaluated at the point — and we know .
Step 2 — recognise what comes out
Apply the Gaussian MGF at :
transpose each piece
collect the linear terms
Now read it. The result has the form — linear plus quadratic, exactly a Gaussian MGF, with and . By uniqueness, is that Gaussian.
What actually did the work
- The Gaussian MGF has a quadratic exponent, and substituted into a quadratic is still a quadratic. That is the whole mechanism
- Push almost any other family through a linear map and the functional form changes — you leave the family and lose the closed form
- Equivalently, by change of variables: has and a constant Jacobian , so a quadratic exponent stays quadratic. The MGF route is shorter and does not need invertible
This closure is the entire reason diffusion models are analytically tractable: has a closed form at every because every step is affine.
Read it in both directions
Factor (Cholesky, or ).
Forward — sampling. Take and set , :
Backward — whitening. Take , :
One theorem, applied twice. This is why you may always assume without loss of generality — and how a sampler turns standard noise into any Gaussian you like.
The degenerate case
If , then is singular: , and the density formula breaks down.
- The law is still Gaussian, but it lives on a lower-dimensional subspace
- It has no density with respect to Lebesgue measure on
- The theorem survives; only the density formula fails
This is the same singularity as the manifold hypothesis, reached deliberately rather than by accident. Real image data is believed to sit on exactly such a thin set.
See it move
Act II drags and watches the ellipse follow ; the singular preset collapses the cloud onto a line.
Where this lands
| closure |
in closed form at every noise level |
|
how every Gaussian sample is drawn, from standard noise |
| Whitening |
why costs no generality |
| Independent sum |
variances add — the envelope of the forward process |
| Singular |
data on a manifold; why densities are the wrong object there |
Affine maps move a Gaussian’s mean and reshape its covariance — but never take it out of the family.
Reference: 05 · The Multivariate Gaussian. Tutorial: Inequalities Worth Knowing. Demo: The Gaussian Lab.