You cannot achieve the impossible without attempting the absurd.
A function of two variables $f: \mathbb{R} \times \mathbb{R} \to \mathbb{R}$ assigns a unique real number to each ordered pair in its domain. Common examples include geometric formulas like Area = $\frac{1}{2}bh$, linear planes like $z = f(x, y) = 2x + 3y$, or paraboloids like $f(x, y) = x^2 + y^2$.
Partial derivatives are derivatives of a function of multiple variables. They measure the rate of change of a multivariable function $f(x_1, x_2, \dots, x_n)$ with respect to one specific variable, holding all other variables constant. They measure how the function changes as one variable changes, while keeping the others constant.
A point $(x_1, x_2, \dots, x_n)$ in the domain of $f$ is a critical point if the gradient of f at that point is the zero vector or if the gradient does not exist. The gradient $\nabla f$ is simply a vector containing all the first-order partial derivatives: $\nabla f = \left( \frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \dots, \frac{\partial f}{\partial x_n} \right)$
For a two-variable function $f(x, y)$, a critical point $(x_0, y_0)$ occurs when both $\frac{\partial f}{\partial x}(x_0, y_0) = 0$ and $\frac{\partial f}{\partial y}(x_0, y_0) = 0$.
When analyzing a quadratic function $w = ax^2 + bxy + cy^2$, we examine its behavior around the origin $(0, 0)$. Because the partial derivatives are exactly zero at $(0,0)$, the origin is always a critical point.
Consider $w = x^2 + 2xy + 3y^2$.
We can rewrite this by completing the square: $w = (x+y)^2 + 2y^2$. This is the sum of two squares, which means the value of w is always non-negative. Because $w = 0$ exactly at $(0, 0)$, the origin is a minimum.
For any general quadratic $w = ax^2 + bxy + cy^2$ (assuming $a \neq 0$), we complete the square to systematically determine the nature of the critical point: $w = a\left(x^2 + \frac{b}{a}xy\right) + cy^2 = a\left(x + \frac{b}{2a}y\right)^2 + \left(c - \frac{b^2}{4a}\right)y^2$
Factoring out the denominator yields: $w = \frac{1}{4a} \left[ 4a^2\left(x + \frac{b}{2a}y\right)^2 + (4ac - b^2)y^2 \right]$
This reformulation allows us to examine the nature of the critical points depending on the sign of the discriminant $4ac - b^2$:
If $4ac - b^2 < 0 \implies 4a^2\left(x + \frac{b}{2a}y\right)^2 \ge 0, (4ac - b^2)y^2 \le 0$.
The squared terms have opposite signs, producing both positive and negative values.
It indicates a saddle point at the origin, where the function takes on both positive and negative values around the critical point.
If $4ac - b^2 = 0$ the quadratic form collapses to $w = a(x+\frac{b}{2a}y)^2$ which depends only on one linear combination of x and y. Every point where that linear combination is zero is a critical point, forming an entire line of critical points ($x = -\frac{b}{2a}y$).
🌄 Take the simplest case: $w(x, y) = x^2$
$\star$ 1. Compute the gradient: $\nabla = (2x, 0)$.
$\star$ 2. Critical points satisfy: $2x = 0 \implies x = 0$. There is no condition on y. So every point of the form (0, y) is a critical point. This is exactly the entire y-axis.
It represents a flat valley along the y-axis (the valley floor is the whole line x = 0, Figure D). Moving in x, the height changes (curved). Moving in 𝑦, the height does not change (flat).
The critical points lie along the y-axis, making it a degenerate flat valley/ridge: instead of a single minimum point, you get a whole line of them.
If $4ac - b^2 \gt 0 \implies 4a^2\left(x + \frac{b}{2a}y\right)^2 \ge 0, (4ac - b^2)y^2 \ge 0$.
Both coefficients inside the brackets are nonnegative (sum of squares). $w(x, y) = \frac{1}{4a}Q(x, y)$
$\star$ If a > 0, then $\frac{1}{4a} \gt 0$. Since $Q(x, y) \ge 0$ and only zero at the origin, we get: $w(x, y) \ge 0, w(0, 0) = 0$.
Therefore, the origin is a minimum.
$\star$ If a < 0, the origin is a maximum.
We can factor out $y^2$ to view the function as a quadratic in terms of a ratio: $w = y^2 \left[ a\left(\frac{x}{y}\right)^2 + b\left(\frac{x}{y}\right) + c \right]$
We can reformulate $a\left(\frac{x}{y}\right)^2 + b\left(\frac{x}{y}\right) + c$ so the bracket becomes the single-variable quadratic $at^2 + bt + c$ where $t = \frac{x}{y}$. This is brilliant because $y^2 \ge 0$ always and the sign of w is determined entirely by the sign of the quadratic.

A critical points of a function f in one variable is an x-value within the domain D of f where the derivative $f'(x)$ is either zero or undefined. Notice that the sign of $f'$ must stay constant between two consecutive critical points.
🌄 If the derivative of a function changes sign around a critical point, the function is said to have a local or relative extremum (maximum or minimum) at that point. Think of $f'(x)$ as telling you the slope of the graph:
In multivariable calculus, the second derivative test helps us determine the nature of critical points (whether they are local maxima, minima, or saddle points). This test involves calculating the second partial derivatives and using them to analyze the behavior of the function near the critical points.
We calculate the second partial derivatives of the function with respect to both variables x and y, i.e., $\frac{\partial^2 f}{\partial x^2} = f_{xx} = A, \frac{\partial^2 f}{\partial y^2} = f_{yy} = C, f_{xy} = \frac{\partial^2 f}{\partial x \partial y}= \frac{\partial^2 f}{\partial y \partial x} = f_{yx} = B$ (By Clairaut’s Theorem, mixed partials are equal if continuous).
These derivatives populate the Hessian Matrix $H$: $H = \begin{pmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{pmatrix}$
The test relies on the determinant of this matrix, denoted as $D$ (also known as the discriminant): $D = \det(H) = f_{xx}f_{yy} - (f_{xy})^2$
🧠 The Hessian and the quadratic approximation
Near a critical point, the function behaves like its second‑order Taylor polynomial: $f(x,y) \approx f(x_0,y_0) + \frac12\left[f_{xx}u^2 + 2f_{xy}uv + f_{yy}v^2\right], \quad u=x-x_0, v = y-y_0.$
For a smooth function $f(x,y)$ centered at a point $(x_0, y_0)$, the second-order expansion is: $f(x,y) \approx f(x_0,y_0) + \underbrace{\left[f_x(x_0,y_0)u + f_y(x_0,y_0)v\right]}_{\text{1st-Order (Linear) Terms}} + \underbrace{\frac{1}{2!}\left[f_{xx}(x_0,y_0)u^2 + 2f_{xy}(x_0,y_0)uv + f_{yy}(x_0,y_0)v^2\right]}_{\text{2nd-Order (Quadratic) Terms}}$ where $u = x - x_0$ and $v = y - y_0$.
Why the First-Order Terms Disappear?
By definition, a critical point $(x_0, y_0)$ occurs where the gradient is zero. This means the first partial derivatives vanish completely: $f_x(x_0, y_0) = 0$, $f_y(x_0, y_0) = 0$
When you plug these zeros into the general formula, the entire first-order linear bracket simplifies to zero:
$\underbrace{\left[f_x(x_0,y_0)u + f_y(x_0,y_0)v\right]}_{\text{1st-Order (Linear) Terms}} = \left[0 \cdot u + 0 \cdot v\right] = 0$
Where the “2” Comes From?
The number 2 in front of the cross-derivative term ($2f_{xy}uv$) comes from Clairaut’s Theorem (or the equality of mixed partials).
When expanding the square of the gradient operator $\left(u\frac{\partial}{\partial x} + v\frac{\partial}{\partial y}\right)^2$, you get: $u^2\frac{\partial^2}{\partial x^2} + uv\frac{\partial^2}{\partial x \partial y} + vu\frac{\partial^2}{\partial y \partial x} + v^2\frac{\partial^2}{\partial y^2}$
Since $f_{xy} = f_{yx}$ for smooth functions, the two middle terms combine: $uvf_{xy} + vuf_{yx} = 2f_{xy}uv$
$\boxed{f(x,y) \approx f(x_0,y_0) + \frac12\left[f_{xx}u^2 + 2f_{xy}uv + f_{yy}v^2\right], \quad u=x-x_0, v = y-y_0.}$ The bracketed expression is a quadratic form. The second derivative test is nothing more than classifying this quadratic form.
The quadratic approximation near the point is: $Q(u, v) = f_{xx}u^2 + 2f_{xy}uv + f_{yy}v^2, \quad u=x-x_0, v = y-y_0.$
🟢 Case 1: $D \gt 0$ and $f_{xx} \gt 0$ (Local Minimum).
When $D = \det(H) = f_{xx}f_{yy} - (f_{xy})^2 \gt 0$ the Hessian $H = \begin{pmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{pmatrix}$ has two eigenvalues with the same sign.
Recall: In linear algebra, the determinant of any matrix is equal to the product of its eigenvalues $\lambda_1 \cdot \lambda_2 = D$
If $D \gt 0 \implies \lambda_1 \cdot \lambda_2 \gt 0$. For the product of two real numbers to be positive, they must have the same sign (either both positive or both negative).
When $f_{xx} \gt 0$, $D = \det(H) = f_{xx}f_{yy} - (f_{xy})^2 \gt 0$. Because $(f_{xy})^2$ is a squared number, it is always positive. For the overall expression to subtract a positive number and still remain greater than zero, the first product must be strictly positive: $f_{xx}f_{yy} \gt 0$
Since we already know $f_{xx} \gt 0$, then $f_{yy} \gt 0$ for their product to be positive.
The trace of a matrix (the sum of its diagonal entries) is always equal to the sum of its eigenvalues: $trace(H) = f_{xx} + f_{yy} = \lambda_1 + \lambda_2$. Since we have already established that both $f_{xx} \gt 0$ and $f_{yy} \gt 0$, their sum must be positive: $\lambda_1 + \lambda_2 \gt 0$
If two numbers must have the same sign and their sum is positive, both eigenvalues must be positive.
Assuming $f_{xx} \gt 0$, we can factor it out and complete the square for u: $Q(u, v) = f_{xx}u^2 + 2f_{xy}uv + f_{yy}v^2 = f_{xx}(u^2 + \frac{2f_{xy}}{f_{xx}}uv) + f_{yy}v^2$
$Q(u, v) = f_{xx}(u + \frac{f_{xy}}{f_{xx}}v)^2 + (f_{yy} -\frac{f^2_{xy}}{f_{xx}})v^2$
$Q(u, v) = f_{xx}(u + \frac{f_{xy}}{f_{xx}}v)^2 + (\frac{f_{xx}f_{yy} -f^2_{xy}}{f_{xx}})v^2$
Notice that the numerator of the second term is exactly the discriminant D, and so the quadratic form is positive in every direction: $Q(u, v) \gt 0, \forall (u, v) \ne (0, 0)$. The surface curves upward no matter which direction you move. This is a Local Minimum, e.g., $z = x^2+y^2$.
🔴 Case 2: $D \gt 0$ and $f_{xx} \lt 0$ (Local Maximum).
When $D > 0$, the eigenvalues $\lambda_1$ and $\lambda_2$ still share the same sign because their product is positive ($\lambda_1 \cdot \lambda_2 = D > 0$).
Finding the sign of $f_{yy}$: Since $f_{xx}f_{yy} - (f_{xy})^2 > 0$, the product $f_{xx}f_{yy}$ must be strictly positive. Because we are given $f_{xx} < 0$, it forces $f_{yy} < 0$ as well.
Analyzing the Trace: The sum of the eigenvalues matches the trace: $\lambda_1 + \lambda_2 = f_{xx} + f_{yy}$. Since both diagonal terms are negative, their sum must be negative ($\lambda_1 + \lambda_2 < 0$).
Eigenvalue Sign: Two numbers with the same sign that add up to a negative number must both be negative.
The Quadratic Form:
Completing the square in the exact same manner yields: $Q(u, v) = \underbrace{f_{xx}}_{< 0} \underbrace{\left( u + \frac{f_{xy}}{f_{xx}}v \right)^2}_{\ge 0} + \underbrace{\frac{D}{f_{xx}}}_{< 0} \underbrace{v^2}_{\ge 0}$
Because both coefficients ($f_{xx}$ and $\frac{D}{f_{xx}}$) are strictly negative, the quadratic form is negative-definite: $Q(u, v) < 0, \quad \forall (u, v) \ne (0, 0)$. The surface curves downward in every direction. The critical point is a Local Maximum, e.g., $z = -x^2 - y^2$.
🟡 Case 3: $D < 0$ (Saddle Point)
When $D < 0$, the product of the eigenvalues is negative ($\lambda_1 \cdot \lambda_2 < 0$).
Eigenvalue Sign: For their product to be negative, the two eigenvalues must have opposite signs (one positive, one negative). The sign of $f_{xx}$ does not matter here.
The Quadratic Form:
Let’s look at the completed square expression again: $Q(u, v) = f_{xx}\left( u + \frac{f_{xy}}{f_{xx}}v \right)^2 + \frac{D}{f_{xx}}v^2$
Because $D < 0$, the two coefficients ($f_{xx}$ and $\frac{D}{f_{xx}}$) will always have opposite signs, regardless of whether $f_{xx}$ is positive or negative.
Because $Q(u,v)$ can be positive in some directions and negative in others, it is indefinite. The surface curves upward in one direction and downward in another, creating a Saddle Point, e.g., $z = x^2 - y^2$.