Multivariable calculus

Gradient of x^2 - y^2: The Saddle Surface Worked Out

For f(x, y) = x^2 - y^2 the gradient is (2x, -2y). At (2, 1) it equals (4, -2). The gradient is the zero vector only at the origin, and that critical point is a saddle, not a maximum or a minimum: the surface rises along the x-axis and falls along the y-axis.

f(x,y)=x2y2f(x,y) = x^2 - y^2
f(x,y)=2x, 2y\nabla f(x,y) = \left\langle 2x,\ -2y \right\rangle
fx=2x\frac{\partial f}{\partial x} = 2x
fy=2y\frac{\partial f}{\partial y} = -2y

Two partials, and the minus sign travels with the y term

Freeze yy first. Then y2-y^2 is a constant and drops out, leaving only the derivative of x2x^2.

fx=x(x2y2)=2x\frac{\partial f}{\partial x} = \frac{\partial}{\partial x}\left(x^2 - y^2\right) = 2x

Now freeze xx. The term x2x^2 is the constant this time, and the minus sign in front of y2y^2 stays attached through the differentiation.

fy=y(x2y2)=2y\frac{\partial f}{\partial y} = \frac{\partial}{\partial y}\left(x^2 - y^2\right) = -2y
f(x,y)=2x, 2y\nabla f(x,y) = \left\langle 2x,\ -2y \right\rangle

At (2,1)(2,1) the gradient is 4,2\langle 4, -2\rangle. It points to the right and downward in the plane, so from (2,1)(2,1) you gain height fastest by increasing xx while decreasing yy.

The mistake: assuming a zero gradient means a peak or a valley

Setting both components to zero gives 2x=02x = 0 and 2y=0-2y = 0, so the only critical point is the origin, where f(0,0)=0,0\nabla f(0,0) = \langle 0, 0\rangle. Students report this as a maximum or a minimum out of habit, which is wrong here.

Look along two lines through the origin. On the xx-axis, f(x,0)=x2f(x,0) = x^2, so the origin is the lowest point. On the yy-axis, f(0,y)=y2f(0,y) = -y^2, so the origin is the highest point. A single point cannot be both, so it is a saddle.

  • A zero gradient says the tangent plane is horizontal, nothing more.
  • Classifying the point needs the second derivative test or a direct look along different lines.
  • The other frequent slip is writing fy=2y\frac{\partial f}{\partial y} = 2y and losing the minus. Carry the sign through the whole line rather than attaching it at the end.

Level curves are hyperbolas, and the gradient crosses them squarely

Setting x2y2=cx^2 - y^2 = c gives a hyperbola for each nonzero cc, opening left and right when c>0c > 0 and up and down when c<0c < 0. The case c=0c = 0 degenerates into the pair of lines y=±xy = \pm x.

Check perpendicularity at (2,1)(2,1), which sits on the curve x2y2=3x^2 - y^2 = 3. Implicit differentiation gives 2x2yy=02x - 2y\,y' = 0, so y=x/y=2y' = x/y = 2 and a tangent direction is 1,2\langle 1, 2\rangle. Dotting with the gradient:

4,21,2=44=0\langle 4, -2\rangle \cdot \langle 1, 2\rangle = 4 - 4 = 0

The dot product vanishes, so the gradient meets the level hyperbola at a right angle, exactly as it does for every differentiable function.

Frequently asked questions

How do I confirm the origin is a saddle for x^2 - y^2?

Use the discriminant D=fxxfyyfxy2D = f_{xx}f_{yy} - f_{xy}^2. Here fxx=2f_{xx} = 2, fyy=2f_{yy} = -2 and fxy=0f_{xy} = 0, so D=4<0D = -4 < 0. A negative discriminant at a critical point means a saddle.

Does the gradient of x^2 - y^2 ever point straight up the page?

Yes, wherever 2x=02x = 0 and 2y>0-2y > 0, meaning x=0x = 0 and y<0y < 0. On the negative yy-axis the gradient is 0,2y\langle 0, -2y\rangle with a positive second component, so it points in the +y+y direction, back toward the origin.