Linear Algebra
16.26 min read

Symmetry of Mixed Partials

In the calculation f(x,y)=xy3+x2yf(x, y) = xy^3 + x^2 - y, you can compute fxy=3y2f_{xy} = 3y^2 and fyx=3y2f_{yx} = 3y^2. They are equal! Is this a coincidence?

No — for well-behaved functions, mixed partials are always equal. The order you differentiate in does not matter: differentiating first by xx then yy gives the same result as first by yy then xx.

This is the Mixed Partials Theorem (sometimes called Clairaut's Theorem or Schwarz's Theorem). The proof is non-trivial and requires the D2D^2 assumption, but the conclusion is beautifully clean.

The consequence: the Hessian matrix (coming next) is symmetric. All the theory of symmetric matrices — eigenvalues, spectral decomposition, definiteness — applies to it.

Formal View

Theorem 16.1 — Mixed Partials (Clairaut's Theorem)
Let f(x)D2f(\mathbf{x}) \in D^2. Then for all i,ji, j:
2fxixj(x)=2fxjxi(x)\frac{\partial^2 f}{\partial x_i \partial x_j}(\mathbf{x}) = \frac{\partial^2 f}{\partial x_j \partial x_i}(\mathbf{x})

The order of differentiation does not matter for twice-differentiable functions.

Why This Matters

Symmetry of the Hessian is the bridge that lets us apply all our tools from symmetric matrix theory to second-order optimization.

  • Hessian symmetry means only n(n+1)/2n(n+1)/2 unique entries to compute, not n2n^2
  • Symmetric Hessian guarantees real eigenvalues — critical for classifying critical points
  • Integrability conditions in physics use mixed-partial symmetry (Maxwell's relations)
  • Conservative vector fields satisfy Fyx=Fxy\frac{\partial F_y}{\partial x} = \frac{\partial F_x}{\partial y} — same idea

Quiz

Question 1

For fD2f \in D^2, we always have fxy=fyxf_{xy} = f_{yx}.

Question 2

Why does symmetry of mixed partials matter for optimization?

Question 3

For f(x,y)=ex+yf(x,y) = e^{x+y}, are fxyf_{xy} and fyxf_{yx} equal?

Question 4

For ff on Rn\mathbb{R}^n with fD2f \in D^2, how many distinct second partial derivative values are there?

Common Mistakes

  • Assuming fxy=fyxf_{xy} = f_{yx} without checking that fD2f \in D^2 — counterexamples exist for pathological functions.
  • Confusing the theorem direction: symmetry of mixed partials follows from twice-differentiability, not the other way around.