Why Quadratics Suit Polygonal Regions
A quadratic function on a polygon has a useful structure: its derivatives are simple, and its restriction to any straight edge is a one-variable quadratic. This makes it possible to organize the search for absolute extrema into two parts: check stationary points in the interior, then optimize along each edge. For convex quadratics, there is an additional shortcut for finding the maximum: it is enough to compare the vertices.
The shortcut has limits. Convexity does not, in general, make a vertex a minimum, and a quadratic can have an interior stationary point that is a saddle rather than an extremum. The Hessian classification and the edge calculations explain which candidates must be checked and why.
Quadratic Form and Interior Classification
Write a point in the plane as \(\mathbf{x}=(x,y)^{\top}\). A quadratic function has the form
where \(\mathbf{H}\) is symmetric, \(\mathbf{b}\) is a constant vector, and \(c\) is a constant. The gradient and Hessian are
An interior stationary point \(\mathbf{x}_0\) satisfies \(\nabla q(\mathbf{x}_0)=\mathbf{0}\), or equivalently \(\mathbf{H}\mathbf{x}_0=-\mathbf{b}\). Because the Hessian is constant, its definiteness classifies the behavior at every stationary point.
For a two-variable quadratic, let \(\Delta=\det(\mathbf{H})\). If \(\Delta>0\), then \(a>0\) means \(\mathbf{H}\) is positive definite, while \(a<0\) means it is negative definite. If \(\Delta<0\), the matrix is indefinite. When \(\Delta=0\), it is semidefinite or zero, and its trace determines the sign unless the matrix is zero. A positive definite Hessian gives a strict local minimum at a stationary point; a negative definite Hessian gives a strict local maximum; an indefinite Hessian gives a saddle. A nonzero semidefinite Hessian gives a global, but possibly non-strict, minimum or maximum at a stationary point. If \(\mathbf{H}=\mathbf{0}\) and a stationary point exists, then \(\mathbf{b}=\mathbf{0}\) and the function is constant.
Restricting the Function to an Edge
Let an edge run from vertex \(\mathbf{P}\) to vertex \(\mathbf{Q}\). Its points can be written as \(\mathbf{x}(t)=\mathbf{P}+t(\mathbf{Q}-\mathbf{P})\), with \(0\leq t\leq 1\). Substitution into \(q\) gives a one-variable quadratic \(g(t)=At^2+Bt+C\). The edge candidates are the endpoints \(t=0,1\) and any root of \(g'(t)=2At+B=0\) that lies in \([0,1]\). If \(A=0\), the restriction is linear or constant, so its extrema occur at endpoints unless it is constant, in which case every point on that edge has the same value.
Vertices appear as endpoints of adjoining edges, so they need only be evaluated once. If an edge restriction is constant, its value is already represented at its endpoints. This candidate procedure applies whether the polygon is convex or nonconvex.
Worked Example: A Saddle Inside a Rectangle
Worked Example: A Saddle Inside a Rectangle
Find the absolute extrema of \(q(x,y)=x^2-y^2-2x+2y\) on the rectangle \(0\leq x\leq 3,\;0\leq y\leq 2\).
The partial derivatives are \(q_x=2x-2\) and \(q_y=-2y+2\). Setting both to zero gives \(x=1,\;y=1\), which is inside the rectangle. The Hessian is \(\begin{pmatrix}2&0\\0&-2\end{pmatrix}\), with determinant \(-4<0\), so this stationary point is a saddle. Its value is \(q(1,1)=1-1-2+2=0\).
On the bottom edge \(y=0\), \(g(x)=x^2-2x\) for \(0\leq x\leq3\). Since \(g'(x)=2x-2\), the edge stationary point is \(x=1\), with value \(-1\). The endpoint values are \(g(0)=0\) and \(g(3)=3\).
On the top edge \(y=2\), substitution gives \(g(x)=x^2-2x\) again. Its stationary point \(x=1\) has value \(-1\), and its endpoints have values \(0\) and \(3\).
On the left edge \(x=0\), \(g(y)=-y^2+2y\) for \(0\leq y\leq2\). Its derivative is \(-2y+2\), so \(y=1\) gives value \(1\); its endpoints both give \(0\).
On the right edge \(x=3\), \(g(y)=3-y^2+2y\). Its derivative is \(-2y+2\), so \(y=1\) gives value \(4\). The endpoints give \(g(0)=3\) and \(g(2)=3\). Comparing all candidates, the absolute minimum is \(-1\) at \((1,0)\) and \((1,2)\), and the absolute maximum is \(4\) at \((3,1)\). These values are the original function evaluated at the reported points: \(q(1,0)=-1\), \(q(1,2)=1-4-2+4=-1\), and \(q(3,1)=9-1-6+2=4\).
Why a Convex Quadratic Has a Vertex Maximum
A quadratic is convex when its Hessian is positive semidefinite. The key fact is that its value at a weighted average of points is no greater than the corresponding weighted average of its values. This gives a direct proof of the vertex rule.
To prove the result, first consider points \(\mathbf{v}_1,\ldots,\mathbf{v}_n\) and nonnegative weights \(\lambda_i\) with \(\sum_i\lambda_i=1\). Let \(\mathbf{x}=\sum_i\lambda_i\mathbf{v}_i\). Expanding the quadratic and cancelling the linear and constant terms gives
Each term on the right is nonnegative because \(\mathbf{H}\) is positive semidefinite. Thus \(q(\mathbf{x})\leq\sum_i\lambda_iq(\mathbf{v}_i)\leq\max_i q(\mathbf{v}_i)\). Every point in a polygon lies in the convex hull of its vertices, including when the polygon is nonconvex. Therefore no point in the region has a value greater than the largest vertex value. Since the vertices belong to the region, that largest value is attained at a vertex.
Worked Example: A Convex Quadratic on a Triangle
Worked Example: A Convex Quadratic on a Triangle
Find the maximum of \(q(x,y)=x^2+xy+2y^2\) on the triangle with vertices \((0,0)\), \((2,0)\), and \((0,1)\).
The Hessian is \(\begin{pmatrix}2&1\\1&4\end{pmatrix}\). Its leading entry is \(2>0\), and its determinant is \(8-1=7>0\), so it is positive definite. The vertex theorem applies. The vertex values are \(q(0,0)=0\), \(q(2,0)=4\), and \(q(0,1)=2\). Therefore the maximum is \(4\) at \((2,0)\).
For a direct edge check, the edge from \((0,0)\) to \((2,0)\) has restriction \(4t^2\), whose maximum is \(4\). The edge from \((0,1)\) to \((0,0)\) has restriction \(2t^2\), whose maximum is \(2\). On the remaining edge, use \((x,y)=(2-2t,t)\). Substitution gives \(g(t)=4-6t+4t^2\). Its derivative vanishes at \(t=3/4\), where \(g(3/4)=4-9/2+9/4=7/4\). The other values on that edge are the endpoint values \(4\) and \(2\). Thus the largest edge value, and the largest vertex value, is \(4\), confirming the result.
Convexity Does Not Give a Vertex Minimum
The vertex theorem is specifically a maximum result. A convex function can have a minimum in the interior or on the interior of an edge. For example, \(q(x,y)=x^2+y^2\) is convex, but on the square \([-1,1]\times[-1,1]\) its minimum is \(0\) at \((0,0)\), while its vertices all have value \(2\). To find a minimum, use the full candidate procedure: inspect interior stationary points and optimize each edge. Do not replace those calculations with a vertex comparison unless a separate argument justifies it.
Worked Example: An Interior Maximum and Edge Candidates
Find the absolute maximum of \(q(x,y)=-x^2-y^2+4x+2y\) on the triangle with vertices \((0,0)\), \((4,0)\), and \((0,3)\).
The gradient is \((-2x+4,-2y+2)\), so the only stationary point is \((2,1)\). It lies inside the triangle because \(2/4+1/3=5/6<1\). The Hessian is \(-2\mathbf{I}\), which is negative definite, so this point is a strict maximum. Its value is \(q(2,1)=-4-1+8+2=5\).
On the edge \(y=0\), the restriction is \(-x^2+4x\), with stationary point \(x=2\) and value \(4\); the endpoints have value \(0\). On \(x=0\), the restriction is \(-y^2+2y\), with stationary point \(y=1\) and value \(1\); the endpoints have values \(0\) and \(-3\). On the hypotenuse, parameterize by \(x=4(1-t),\;y=3t\). Substitution gives \(g(t)=22t-25t^2\). Its stationary point is \(t=11/25\), with value \(22(11/25)-25(121/625)=121/25\). The endpoints have values \(0\) and \(-3\). Comparing all candidates, \(5>121/25\), so the absolute maximum is \(5\) at \((2,1)\). Substitution into the original function gives \(q(2,1)=5\), as required.
A Common Error: Ignoring an Edge Stationary Point
A frequent mistake is to check only polygon vertices when the quadratic is not known to be convex, or when the goal is to find a minimum. For example, on \(0\leq x\leq 3,\;y=0\), the restriction \(g(x)=x^2-2x\) has endpoint values \(g(0)=0\) and \(g(3)=3\). Concluding that the minimum is \(0\) from those endpoints is wrong: \(g'(x)=2x-2=0\) at \(x=1\), and \(g(1)=-1\). The correction is to include each edge's interior stationary points in the candidate set. The vertex-only maximum shortcut is valid for convex quadratics, but it does not remove edge candidates when finding a minimum.
Check Your Understanding
Use the Hessian test and the edge-candidate procedure to answer the following.
- What does the sign of the Hessian determinant tell you when it is negative?
- For an edge restriction \(g(t)=At^2+Bt+C\) on \(0\leq t\leq1\), which stationary points belong in the candidate set?
- Why does a positive semidefinite Hessian imply that a maximum occurs at a polygon vertex?
- Does the vertex rule for a convex quadratic also determine its minimum? Give a reason.
- Why must an interior stationary point still be classified before deciding whether it can be an absolute extremum?