Target Audience: Anyone comfortable with single-variable calculus who wants to see what actually changes when a second variable arrives — and what does not.
Prerequisites: Limits, Continuity and Derivatives for the definition everything here generalises, and Vector Spaces and Linear Maps — because the derivative in several variables is a linear map, and the second-derivative test is a statement about a symmetric matrix.
Adding a second variable changes less than it first appears and more than it should. The rules of differentiation carry over intact, because a partial derivative is an ordinary one-variable derivative. What genuinely changes is the definition: with more than one direction to approach from, having derivatives along the axes no longer says anything about the others.
That is the thread of this page. Sections 2 to 4 show where the single-variable definitions break and what replaces them — a derivative that is a linear map rather than a number. Sections 5 to 7 build the machinery, and Sections 8 to 10 use it.
The explorer in Section 8 computes gradients and Hessians symbolically in exact arithmetic, classifies each critical point — and then checks the verdict against the surface itself, sampled around the point. That independent check is what lets the page claim honestly that \(D = 0\) cannot be resolved: two presets share \(D = 0\) and behave oppositely.
A function \(f : \mathbb{R}^n \to \mathbb{R}\) takes a point and returns a number. For \(n = 2\) the graph is a surface in three dimensions — the last case that can be drawn, after which the algebra has to carry the intuition on its own.
The level set \(\{\mathbf{x} : f(\mathbf{x}) = c\}\) is what a contour map draws. Level sets survive into higher dimensions where the graph does not, and Section 9 turns out to depend on a fact about them rather than about the surface.
In one variable a point has two sides. In two it has infinitely many approach paths, and the limit exists only if every one of them gives the same value.
Take \[ f(x, y) = \frac{xy}{x^2 + y^2} \] near the origin.
Along the \(x\)-axis \(y = 0\), so \(f = 0\). Along the \(y\)-axis, \(f = 0\) again. Two natural approaches agree perfectly.
But along \(y = x\), \(f = \dfrac{x^2}{2x^2} = \dfrac{1}{2}\) at every point. So no limit exists — and the two most obvious checks missed it entirely.
This is the first place the single-variable habit fails. One path giving a different value is enough to disprove a limit; no finite collection of paths can ever prove one. Proving a limit exists means bounding \(|f - L|\) by something depending only on \(\|\mathbf{h}\|\), so the bound holds in every direction at once.
\(f_x\) is the derivative with respect to \(x\) with \(y\) held fixed: \[ f_x(a, b) = \lim_{h \to 0} \frac{f(a + h, b) - f(a, b)}{h}. \]
That is an ordinary one-variable derivative along a line parallel to an axis, so every technique from the single-variable rules applies to computing it unchanged. Nothing new is needed for the mechanics.
The example from Section 2 has \(f_x(0,0) = f_y(0,0) = 0\) once \(f(0,0)\) is defined as \(0\) — both axes are constant. Yet \(f\) has no limit at the origin, so it is discontinuous there. Partial derivatives look along exactly two directions, and a function can misbehave on all the rest.
\(f_{xy}\) means differentiate by \(x\), then by \(y\). When the second partials are continuous, \(f_{xy} = f_{yx}\) — the order does not matter. The explorer verifies this symbolically on every preset, and the harness behind it checked it on 126 polynomials.
Since partials are not enough, the definition has to be rebuilt. The right generalisation is not “the derivative is a number” but “\(f\) is well approximated by a linear map”.
\(f\) is differentiable at \(\mathbf{a}\) when there is a linear map \(L\) with \[ \lim_{\mathbf{h} \to \mathbf{0}} \frac{f(\mathbf{a} + \mathbf{h}) - f(\mathbf{a}) - L(\mathbf{h})}{\|\mathbf{h}\|} = 0. \] That \(L\) is the derivative.
Read the one-variable case back through this: there \(L(h) = f^{\prime}(a)h\), and the “linear map” is multiplication by a number. Nothing was lost; the number was always standing in for a map. This is where linear maps stop being a separate subject and become the language calculus needs.
Verifying that limit directly is rarely practical. Instead: if the partial derivatives exist and are continuous near \(\mathbf{a}\), then \(f\) is differentiable there. Continuity of the partials is precisely what upgrades information about two directions into information about all of them.
The error is divided by \(\|\mathbf{h}\|\), so differentiability asserts the error vanishes faster than the distance — not merely that it vanishes. A surface with partial derivatives but no genuine tangent plane fails exactly this, which is what the definition is built to exclude.
Moving along a path \(\mathbf{r}(t) = (x(t), y(t))\):
The single-variable rule grows a sum because \(f\) can now be reached along several coordinates at once, and each contributes.
For \(f : \mathbb{R}^n \to \mathbb{R}^m\) the derivative is the Jacobian matrix of partials, and the chain rule reads \[ D(g \circ f) = Dg \cdot Df. \] The one-variable rule \(( f \circ g)^{\prime} = f^{\prime}(g(a))\,g^{\prime}(a)\) is the \(1 \times 1\) case — the product of two numbers is the product of two \(1 \times 1\) matrices. Section 4's reframing is what makes that literally true rather than merely analogous.
Collecting the partials into a vector is more than bookkeeping, because the rate of change along a unit vector \(\mathbf{u}\) is
\(\nabla f \cdot \mathbf{u} = \|\nabla f\|\cos\theta\), which is largest when \(\theta = 0\) — that is, when \(\mathbf{u}\) points along \(\nabla f\). So the gradient gives the direction of steepest increase, and its length is that maximum rate. It is a one-line consequence of the dot product, not a separate fact to memorise.
Feeding an unnormalised direction into the formula scales the answer by that vector's length, giving a rate that is simply wrong. This is the most frequent slip in the topic.
Moving along a level set leaves \(f\) unchanged, so the directional derivative in that direction is \(0\), so \(\nabla f\) is orthogonal to it. Two sentences — and Section 9 rests entirely on them.
The direct analogue of the tangent line, and literally the linear map from Section 4 with the value at \(\mathbf{a}\) added back. Saying \(f\) is differentiable at \(\mathbf{a}\) and saying it has a tangent plane there are the same statement.
Near \(\mathbf{a}\), \(f(\mathbf{x}) \approx f(\mathbf{a}) + \nabla f(\mathbf{a}) \cdot (\mathbf{x} - \mathbf{a})\). Almost every applied use of the gradient — error propagation, gradient descent, Newton's method in several variables — is this approximation plus a rule for choosing the next point.
A point where \(\nabla f = \mathbf{0}\), or where the gradient does not exist. Every interior extremum is critical — necessary, not sufficient, exactly as in one variable.
To classify one, look at the second derivatives. They assemble into the Hessian
which by Clairaut is symmetric — and that is precisely the hypothesis of the Spectral Theorem, so its eigenvalues are real.
With \(D = f_{xx}f_{yy} - f_{xy}^{2} = \det H\):
\(D\) is the determinant, which is the product of the eigenvalues — so its sign says only whether they agree. Both positive is a minimum, both negative a maximum, opposite signs a saddle. When they agree, \(f_{xx}\) says which sign. That is the entire test, and it is why \(D\) alone cannot be enough.
\(x^2 + y^2\) and \(-x^2 - y^2\) both have \(D = 4\) at the origin. One is a minimum and the other a maximum. A rule that stops at the discriminant calls them the same thing, and the explorer refutes it against the surface.
\(x^4 + y^4\) has a minimum at the origin. \(x^4 - y^4\) has a saddle there. Both have \(D = 0\) — in fact the whole Hessian vanishes, so there is nothing for the test to read. No refinement of it can separate them, and its silence is honest.
Choose a surface. The explorer differentiates it symbolically in exact arithmetic, confirms each listed point really is critical, computes the Hessian and the discriminant, applies the test — and then checks the verdict against the surface itself by sampling around the point. The sampler never consults the discriminant, so it is an independent witness.
Polynomials are held as exact rational coefficients, so every partial derivative, discriminant and sampled value is computed without rounding.
Maximising \(f\) subject to a constraint \(g = c\) is a different problem, and the unconstrained critical points are usually no help — they need not lie on the constraint at all.
At a constrained extremum, \[ \nabla f = \lambda \nabla g, \] solved together with \(g = c\).
At a constrained maximum, moving along the constraint cannot increase \(f\), so \(\nabla f\) has no component along the constraint curve — it is perpendicular to it. But \(\nabla g\) is perpendicular to that same curve, since the curve is a level set of \(g\). Two vectors perpendicular to the same direction in the plane are parallel, and \(\lambda\) is the ratio. That is Section 6's orthogonality fact doing all the work.
\(\nabla f = \lambda\nabla g\) is two equations in three unknowns \((x, y, \lambda)\) and cannot be solved alone. Forgetting to carry \(g = c\) alongside it is the standard error in the topic.
It is the rate at which the optimal value changes as the constraint level \(c\) is relaxed — a shadow price. It is worth reading off rather than discarding once the point is found.
\(\iint_R f \, dA\) is the limit of sums of \(f\) times small areas. For \(f \geq 0\) it is the volume under the surface, exactly as the single integral is the area under a curve.
On a rectangle with \(f\) continuous, the double integral equals either iterated integral, and the order of integration may be swapped.
Without continuity — or absolute integrability — the two orders can genuinely disagree. The discrete counterpart is already on this site: a double series whose row-first and column-first totals differ when absolute convergence fails. Same phenomenon, same fix.
The two iterated integrals are equal but rarely equally easy, and switching is often what turns an intractable inner integral into a routine one. Doing it means redrawing the region to find the new limits — which is the real work.
\[ \iint_R f \,dx\,dy = \iint_S f \,\left|\det J\right| \,du\,dv \]
\(\left|\det J\right|\) is the factor by which the substitution scales area — which is exactly the geometric reading of the determinant. For polar coordinates \(\left|\det J\right| = r\), so the familiar \(dA = r\,dr\, d\theta\) is not a convention to memorise: the \(r\) is the Jacobian.
This unit needed Unit 11 first, and the debt is visible throughout: the derivative is a linear map, the Hessian is symmetric so the Spectral Theorem applies, and the Jacobian is a determinant read as a scale factor. The proof catalog is frozen at 114 and contains no multivariable proofs, so this page cites the single-variable and linear algebra results it depends on rather than any of its own.
| One variable | Several variables | What changed |
|---|---|---|
| Two-sided limit | Every path must agree | No finite set of paths can prove a limit |
| \(f^{\prime}(a)\), a number | A linear map \(L\); the Jacobian in coordinates | The number was always a \(1 \times 1\) matrix |
| Differentiable \(\Rightarrow\) continuous | Still true — but partials existing does not imply it | Partials are weaker than differentiability |
| \((f \circ g)^{\prime} = f^{\prime}(g(a))g^{\prime}(a)\) | \(D(g \circ f) = Dg \cdot Df\) | Multiplication becomes matrix multiplication |
| Tangent line | Tangent plane \(z = f(\mathbf{a}) + \nabla f \cdot (\mathbf{x} - \mathbf{a})\) | Same statement, one dimension up |
| \(f^{\prime}(a) = 0\) | \(\nabla f = \mathbf{0}\) | Necessary for an interior extremum in both |
| Sign of \(f^{\prime\prime}(a)\) | \(D = \det H\) and the sign of \(f_{xx}\) | Two numbers needed, and \(D = 0\) is undecidable |
| \(\int_a^b f\,dx\) | \(\iint_R f\,dA\), evaluated iteratively | Fubini licenses the iteration, and the order |
| \(u\)-substitution | Change of variables with \(\left|\det J\right|\) | The derivative factor becomes a determinant |