f is of class C1 on U when both exist and are continuous on U. The gradient is ∇f(a,b)=(∂x∂f,∂y∂f)(a,b).
Examples
Example 25.10(Level curves and gradients, on one function)
Take f(x,y)=x2−y2. Its level sets: {f=c} is a hyperbola opening left-right for c>0, up-down for c<0, and the crossed pair of lines y=±x for c=0 — the contour map of a mountain pass, with the saddle point at the origin where the two zero-level lines cross. Gradient: ∇f=(2x,−2y). At the point (2,1) (on the level c=3): ∇f=(4,−2), while the tangent vector of the level curve, parametrized near that point by (t,t2−3), is (1,t2−3t)=(1,2) at t=2 — and indeed
⟨(4,−2),(1,2)⟩=4−4=0:
gradient perpendicular to the contour, pointing toward higher values of f (here: away from the y-axis). Two more readings: the gradient vanishes exactly at the saddle, where the contour map pinches; and the tangent line to the level curve at (2,1) is 4(x−2)−2(y−1)=0, i.e. 2x−y=3 — the equation “⟨∇f,M−M0⟩=0” that generalizes the ellipse tangent of Exercise 24.11.
Critical points: if y=0, the second equation gives x∈{0,3}; if x=0, the first gives y∈{0,3}; if xy=0, solve 2x+y=3, x+2y=3: x=y=1. Four points: (0,0), (3,0), (0,3), (1,1). Second derivatives: r=−2y, s=3−2x−2y, t=−2x.
(1,1): r=−2, s=−1, t=−2: rt−s2=3>0, r<0: local maximum, f(1,1)=1.
(0,0): r=t=0, s=3: rt−s2=−9<0: saddle; likewise (3,0) (s=−3) and (0,3): three saddles.
The maximum is only local: f(−T,−T)=T2(3+2T)→+∞. Symmetry check: f(x,y)=f(y,x), and indeed the critical set and the classification are symmetric in x↔y. Interpretation: among rectangles-with-slack x,y≥0, x+y≤3, the product xy(3−x−y) of the three “parts” of 3 is largest when the parts are equal — a two-variable shadow of the AM–GM principle.