And yet despite the look on my face, you’re still talking and thinking that I care, Anonymous
Functions of two variables are natural generalizations or extensions of functions of one variable. They extend single-variable calculus into multi-dimensional space. They are mathematical functions $f: D \subseteq \mathbb{R}^2 \to \mathbb{R}$, meaning they map an ordered pair of real numbers $(x, y)$ in a domain $D$ to a unique real output $z = f(x, y)$.
They are fundamental in multivariable calculus and have numerous applications in science, engineering, and economics. Here, $x$ and $y$ are the independent variables, while $z$ is the dependent variable.
Definition. A function of two variables assigns a unique real number to each ordered pair in its domain. It allows us to model physical and mathematical quantities that depend on more than a single factor.

Partial derivatives are an extension of derivatives to functions of multiple variables. They measure how a function changes as one of its variables changes, while keeping or holding all other variables constant. This concept is fundamental in multivariable calculus and has various applications in fields like physics, engineering, and economics.
Consider a function $f(x_1, x_2, \dots, x_n)$ that depends on $n$ variables. The partial derivative of $f$ with respect to one of these variables, say $x_i$, is simply the standard derivative of $f$ while holding all other variables constant.
For a function of two variables, $f(x,y)$, the partial derivative with respect to $x$ at a point $(x_0, y_0)$ is defined using limits as: $\frac{\partial f}{\partial x}(x_0, y_0) = \lim_{\Delta x \to 0} \frac{f(x_0+\Delta x, y_0)-f(x_0, y_0)}{\Delta x}$.
Using a different notation, $\frac{\partial f}{\partial x}(x, y) = \lim_{h \to 0} \frac{f(x+h, y)-f(x, y)}{h}$
Similarly, the partial derivative with respect to $y$ at a point $(x_0, y_0)$ is defined as: $\frac{\partial f}{\partial y}(x_0, y_0) = \lim_{\Delta y \to 0} \frac{f(x_0, y_0+\Delta y)-f(x_0, y_0)}{\Delta y}$
Using a different notation, $\frac{\partial f}{\partial y}(x, y) = \lim_{h \to 0} \frac{f(x, y+h)-f(x, y)}{h}$
Notation: $\frac{\partial f}{\partial x}$ can also be written compactly as $f_x$, $f_x(x,y)$, or $\partial_x f$.
🎯 Geometrically, the partial derivative $\frac{\partial f}{\partial x}(x_0, y_0)$ at a point $(x_0, y_0)$ can be interpreted as the slope of the tangent line to the curve formed by the intersection of the 3D surface $z = f(x,y)$ and vertical plane $y = y_0$. In other words, the slope of the tangent line obtained by slicing the surface $z = f(x,y)$ with the vertical plane $y = y_0$.
This plane is parallel to the xz-plane and passes through the point $(x_0, y_0, z_0)$.
The partial derivative is: $\frac{\partial f}{\partial x}(x_0,y_0) = \left.\frac{d}{dx} f(x,y_0)\right|_{x=x_0}$.
Similarly, $\frac{\partial f}{\partial y}(x_0, y_0)$ represents the slope of the tangent line to the curve formed by the intersection of the 3D surface $z = f(x,y)$ and the plane $x = x_0$. This plane is parallel to the yz-plane and passes through the point $(x_0, y_0, z_0)$ (Figure A).
While standard derivatives give the slope of a line on a 2D plane, partial derivatives give the slope of a 3D surface moving strictly parallel to one of the axes.
To calculate these, apply your standard derivative rules (Power Rule, Chain Rule, Product Rule) but mentally lock all other variables as unchanging numbers.
Power Rule: $f(x, y) = 2x^2y^3$:
$\frac{\partial f}{\partial x} = f_x =[\text{Here, y is treated as a constant}] 4x \cdot y^3$.
$\frac{\partial f}{\partial y} = f_y =[\text{Here, x is treated as a constant}] 6x^2 \cdot y^2.$
Addition: $f(x, y) = x^3y + y^2$.
$\frac{\partial f}{\partial x} = f_x = 3x^2y$
$\frac{\partial f}{\partial y} = f_y = x^3+2y.$
Algebraic Rewrite: $z = x\sqrt{y} - \frac{y}{\sqrt{x}}$ It is easy rewritting as $z = xy^{1/2} - yx^{-1/2}$
Then, the partial derivatives are: $\frac{\partial f}{\partial x} = y^{\frac{1}{2}}-y(\frac{-1}{2})x^{-\frac{3}{2}} = \sqrt{y}+\frac{y}{2x^{\frac{3}{2}}}$.
$\frac{\partial f}{\partial y} = \frac{1}{2}xy^{\frac{-1}{2}}-x^{\frac{-1}{2}} = \frac{x}{2\sqrt{y}}-\frac{1}{\sqrt{x}}$.
Chain Rule: $f(x, y) = \sin(x^2y - 2x + 4)$.
$\frac{\partial f}{\partial x} = f_x =[\text{Chain Rule}] \cos(x^2y-2x+4) \cdot (2xy-2).$
$\frac{\partial f}{\partial y} = f_y = \cos(x^2y-2x+4)\cdot x^2$
Three Variables: $w = \cos(x^2+2y) - e^{4x-z^4y} + y^3$
$\frac{\partial w}{\partial x} =[\text{Chain Rule}]-2x \sin(x^2+2y)-4e^{4x-z^4y}$
$\frac{\partial w}{\partial y} =-2 \sin(x^2+2y) +z^4e^{4x-z^4y}+3y^2$
$\frac{\partial w}{\partial z} =4z^3y e^{4x-z^4y}$
Just as you can take a second derivative in standard calculus, you can take second partial derivatives.
For $f(x,y)$, there are four second-order partial derivatives:
Clairaut’s Theorem: If the mixed partial derivatives $f_{xy}$ and $f_{yx}$ are continuous, they are exactly equal to each other ($f_{xy} = f_{yx}$). The order of differentiation doesn’t matter.
Understanding local minimums and maximums in multivariable functions involves examining the behavior of the function’s partial derivatives.
A function f(x, y) has a relative minimum (maximum) at the point (a, b) if $f(x, y) \ge f(a, b)$ (or $f(x, y) \le f(a, b)$) for all points (x, y) in some region around (a, b), i.e., $\forall (x, y)$ in some neighborhood. ⚠ Outside of this region, it is completely possible for the function to be smaller (bigger) than f(a, b).
Fermat’s Theorem for functions of multiple variables states that at a local extremum (minimum or maximum), the first-order partial derivatives $f_x(x_0,y_0), f_y(x_0,y_0)$ must both equal zero, provided they exist. Geometrically, this condition dictates that the tangent plane at that specific point is perfectly horizontal.
The surface $z = f(x, y)$ has a tangent plane at $(x_0, y_0, f(x_0, y_0))$.
The tangent plane is given by: $z \approx f(x_0,y_0) + f_x(x_0,y_0)(x-x_0) + f_y(x_0,y_0)(y-y_0)$, Figure C.
If both partial derivatives vanish, this becomes: $z \approx f(x_0,y_0)$, a horizontal plane.
The partial derivatives represent the slopes of the surface in the x and y directions.
A horizontal tangent plane means: (i) No instantaneous change in the x-direction; (ii) No instantaneous change in the y-direction; (iii) No instantaneous change in any direction (because directional derivatives are linear combinations of $f_x$ and $f_y$).
This is the multivariable version of “the derivative is zero at a peak or a valley.”
⚠ However, it’s essential to understand that this condition is necessary for identifying local extrema (minimums and maximums), it is not sufficient on its own. Critical points can also be saddle points or points of inflection, not just local extrema.
Critical points in multivariable functions can indeed be local minimums, local maximums or saddle points where the slopes (derivatives) in orthogonal directions are all zero (a critical point), but which are not local extrema, e.g., a relative minimum along one axial direction and a relative maximum along the crossing axis, $f(x, y) = x^2 - y^2$. $\frac{\partial f}{\partial x} = 2x, \frac{\partial f}{\partial y} = -2y$ has a critical point at (0, 0) -both partial derivatives vanish at (0, 0)- that is a saddle point or point of inflection.
This point is a saddle point because f is a hyperbolic paraboloid. It curves upwards in one direction and downwards in another direction.
In single-variable calculus, critical points of a function $y = f(x)$ are the x-values within the domain D of $f$ where the first derivative is either zero ($f'(x) = 0$) or undefined. These points can indicate local minima, local maxima, or points of inflection.
🧮 Definition. Let $f(x_1, x_2, \cdots, x_n)$ be a function of n variables. A point $(x_1, x_2, \cdots, x_n)$ in the domain of f is considered a critical point if all its partial derivatives are zero or if all partial derivatives exist and are zero, or at least one partial derivative does not exist. This can be mathematically expressed as: $\frac{\partial f}{\partial x_1} = 0, \frac{\partial f}{\partial x_2} = 0, \cdots, \frac{\partial f}{\partial x_n} = 0$. This generalizes the single‑variable definition perfectly.
To find local minimums and maximums (extrema) in multivariable functions, we rely on the Gradient vector ($\nabla f$). The gradient bundles all first-order partial derivatives into a single vector: $\nabla f = \left\langle \frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \dots, \frac{\partial f}{\partial x_n} \right\rangle$
A point is a critical point if the gradient is the zero vector ($\nabla f = \mathbf{0}$) or if it does not exist. For a function $f(x,y)$ of two variables, this means: $f_x(x,y) = 0 \quad \text{and} \quad f_y(x,y) = 0$ or if these partial derivatives do not exist.
At these points, the tangent plane to the surface is perfectly horizontal —there is zero instantaneous rate of change in any direction. However, finding a critical point is only the first step. It could be a local minimum, a local maximum, or a saddle point.
Theorem (Fermat’s Theorem for Multivariable Functions). If a function $f(x, y)$ has a local (relative) extremum at the point $(x_0, y_0)$ and its first-order partial derivatives exist there, then $(x_0, y_0)$ is a critical point of $f$, meaning the gradient vector is zero: $\nabla f(x_0, y_0) = \vec{0}$.
Proof.
To prove this, we can reduce the 3D surface into two separate 2D curves (cross-sections) and apply the single-variable version of Fermat’s Theorem.
Isolate the $x$-direction. Define a new single-variable function $g(x) = f(x, y_0)$.
This function represents the cross-section of the surface $z = f(x, y)$ along the plane where $y$ is locked at $y_0$.
Because $f(x, y)$ has a local extremum at $(x_0, y_0)$, our new function $g(x)$ must inherently have a local extremum at $x = x_0$ along that specific slice.
According to Fermat’s Theorem for single-variable calculus, if $g(x)$ has a local extremum at $x_0$ and is differentiable there, its derivative must be zero: $g'(x_0) = 0$
By definition, the ordinary derivative of this cross-section $g(x)$ is exactly the partial derivative of $f$ with respect to $x$: $g'(x_0) = \frac{\partial f}{\partial x}(x_0, y_0)$. Therefore, $\frac{\partial f}{\partial x}(x_0, y_0) = 0$.
Isolate the $y$-direction. We repeat the exact same logic for the $y$-axis. Define $h(y) = f(x_0, y)$, which represents the cross-section where $x$ is locked at $x_0$.
Since $f$ has a local extremum at $(x_0, y_0)$, $h(y)$ has a local extremum at $y_0$. By Fermat’s Theorem: $h'(y_0) = 0$
The derivative of $h(y)$ is the partial derivative of $f$ with respect to $y$: $h'(y_0) = \frac{\partial f}{\partial y}(x_0, y_0)$. Therefore, $\frac{\partial f}{\partial y}(x_0, y_0) = 0$.
Conclusion.
Because both partial derivatives are zero, the gradient vector evaluates to the zero vector: $\nabla f(x_0, y_0) = \left\langle \frac{\partial f}{\partial x}(x_0, y_0), \frac{\partial f}{\partial y}(x_0, y_0) \right\rangle = \langle 0, 0 \rangle = \vec{0}$
Thus, $(x_0, y_0)$ is a critical point.
🧲 To determine the nature of a critical point at $(a,b)$, calculate the discriminant $D$ using second partial derivatives: $D = f_{xx}(a,b) \cdot f_{yy}(a,b) - [f_{xy}(a,b)]^2$
| Discriminant (D) | $f_{xx}$ value | Conclusion |
|---|---|---|
| $D > 0$ | $f_{xx} > 0$ | Local Minimum |
| $D > 0$ | $f_{xx} < 0$ | Local Maximum |
| $D < 0$ | Any | Saddle Point |
| $D = 0$ | Any | Test is inconclusive |