Convex Functions in Several Variables
In questa pagina 5
This note builds on Hessian Matrix and Taylor FormulaThe second derivatives form the Hessian matrix H_f, symmetric by Schwarz's theorem (continuous mixed derivatives). Second-order Taylor: f(x0 + h) = f(x0) + grad f(x0)·h + (1/2) h^T H_f(x0) h + o(‖h‖^2). A symmetric matrix is positive or negative definite, semidefinite or indefinite according to the sign of the quadratic form h^T A h, recognized via eigenvalues or leading principal minors (in 2x2: determinant and first entry).Hessian Matrix and Taylor Formula →, Free Extrema in Several VariablesIf f is differentiable and has a relative extremum at an interior point x0, then grad f(x0) = 0 (Fermat): interior extrema are found among the critical points. If f is C^2, at a critical point: Hessian positive definite gives a minimum, negative definite a maximum, indefinite a saddle, semidefinite means the test is inconclusive and one studies the sign of f(x) - f(x0). In two variables: det H > 0 and f_xx > 0 minimum, det H > 0 and f_xx < 0 maximum, det H < 0 saddle.Free Extrema in Several Variables → and Differentiability and the Gradientf is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient →.
In one variable a function is convex when its graph "holds water", and it is recognized by the sign of . Here the same idea holds with the Hessian in place of , and it is useful because for convex functions the search for minima is much simpler: a critical point is already a global minimum, without studying the boundary or the behaviour at infinity.
Convex sets and definition
A set is convex if for every the segment joining them, , lies in . A disc, a half-plane, a rectangle, all of are convex; an annulus or the union of two disjoint discs are not.
Grafico interattivo: A non-convex set: in the annulus 1 ≤ r ≤ 2 the segment between (−3/2, 0) and (3/2, 0), both endpoints in the annulus, passes through the hole and leaves the set
Definition. Let be convex. is convex if for every and It is strictly convex if the inequality is strict for and .
Example. on , with , , : .
Meaning: restricted to a segment, lies below the chord joining the values at the endpoints. Examples: is strictly convex; every linear function is convex (with equality); the sum of convex functions is convex; the maximum of two convex functions is convex. A convex one-variable function composed with a linear function, , is convex.
Characterization via the gradient
Theorem. Let be differentiable on an open convex set . Then is convex if and only if for every
Example. at , where : the inequality becomes , i.e. , always true.
That is, the graph of lies above the tangent plane at every point (see the tangent plane in Differentiability and the Gradientf is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient →).
Why (the part "convex implies inequality"). For convexity gives , i.e. . Dividing by and letting , the left side tends to the directional derivative : we get .
Fundamental consequence. If is convex and , the inequality becomes for every : is a global minimum point. If is strictly convex the minimum is unique.
Characterization via the Hessian
Theorem. Let be of class on an open convex set .
- is convex if and only if the Hessian matrix is positive semidefinite at every point .
- If is positive definite at every point, is strictly convex. The converse is false: is strictly convex but .
Example. has , positive definite at every point: is strictly convex on .
Why. Restrict to a line: . Then (chain rule applied twice, Jacobian Matrix and the Chain RuleFor F from R^n to R^m, F = (f1, ..., fm), the Jacobian matrix J_F is the m x n matrix with entries d f_i / d x_j: row i is the gradient of f_i. Chain rule: J_(f∘g)(x) = J_f(g(x)) · J_g(x); frequent cases are d/dt f(gamma(t)) = grad f · gamma'(t) and f_x = f_u u_x + f_v v_x. If det J_F(x0) is nonzero, F is invertible near x0 and J_(F^-1) = (J_F)^-1. Polar coordinates: det J = rho.Jacobian Matrix and the Chain Rule →). The function is convex on every segment if and only if every is convex in one variable, i.e. , i.e. for every : this is the definition of positive semidefinite.
How to check in two variables. is positive semidefinite if and only if , and ; it is positive definite if and (Sylvester's criterion, Hessian Matrix and Taylor FormulaThe second derivatives form the Hessian matrix H_f, symmetric by Schwarz's theorem (continuous mixed derivatives). Second-order Taylor: f(x0 + h) = f(x0) + grad f(x0)·h + (1/2) h^T H_f(x0) h + o(‖h‖^2). A symmetric matrix is positive or negative definite, semidefinite or indefinite according to the sign of the quadratic form h^T A h, recognized via eigenvalues or leading principal minors (in 2x2: determinant and first entry).Hessian Matrix and Taylor Formula →).
Beware the difference from critical points. To classify a critical point the Hessian at that point suffices. For convexity we need the Hessian at all points of the domain.
Worked examples
Example 1. on . is constant, with and : positive definite everywhere, is strictly convex. The only critical point is (), so it is the unique global minimum, .
Example 2: the Hessian depends on the point. . With : , , , so and Positive definite everywhere: is strictly convex on . However it has no critical points (): a convex function may have no minimum.
Example 3: convex only on part of the plane. : , . It is positive semidefinite if and only if : is convex on the closed half-plane (which is convex) and not on all of .
Example 4: semidefinite but not definite. : , , : positive semidefinite. is convex but not strictly (it is constant along the lines ), and the critical points are all the points of the line , all global minima ().
Example 5: global minimum without convexity. has , which at equals : the Hessian is indefinite there, is not convex on . Yet it has global minimum (seen from coercivity, Absolute Extrema on Compact SetsWeierstrass theorem: a continuous function on a compact (closed and bounded) subset of R^n has an absolute maximum and minimum. They are found by comparing the values at the interior critical points, at the critical points of the restrictions to the (parametrized) pieces of the boundary, and at the vertices. On an unbounded closed set, if f tends to +infinity at infinity the minimum exists and the maximum does not.Absolute Extrema on Compact Sets →). At the points the Hessian is positive definite, but this only shows that they are local minima: for convexity it would be needed everywhere.
Common mistakes
- Checking the Hessian at a single point and concluding that is convex.
- Confusing semidefinite and definite: does not rule out convexity (example 4), but does not give strict convexity.
- Thinking positive definiteness is necessary for strict convexity ().
- Forgetting the set: convexity is stated on a convex set (example 3).
- Deducing "has a minimum" from convexity: it only guarantees that a critical point, if it exists, is a global minimum.
Versione ripasso
Convex set. is convex if it contains the segment for every .
Definition. On a convex , is convex if and strictly convex if the inequality is strict for and .
- Examples: is strictly convex; linear functions are convex; sums of convex functions and maxima of two convex functions are convex; with convex is convex.
Gradient characterization. If is differentiable on an open convex : convex for all . The graph lies above every tangent plane.
- Consequence: if is convex and , then is a global minimum, unique if is strictly convex.
- Example: at gives .
Hessian characterization. If on an open convex set:
- convex positive semidefinite at every point. Reason: has .
- positive definite everywhere strictly convex. The converse is false: is strictly convex with .
- In two variables with : semidefinite , , ; definite , .
Examples.
- : , , strictly convex. Unique critical point , global minimum.
- : , strictly convex, but with no critical points (): convexity does not guarantee a minimum.
- : , convex only on the closed half-plane .
- : , convex but not strictly. All points of the line are global minima ().
- : not convex ( at ), but with global minimum at (coercivity, Absolute Extrema on Compact SetsWeierstrass theorem: a continuous function on a compact (closed and bounded) subset of R^n has an absolute maximum and minimum. They are found by comparing the values at the interior critical points, at the critical points of the restrictions to the (parametrized) pieces of the boundary, and at the vertices. On an unbounded closed set, if f tends to +infinity at infinity the minimum exists and the maximum does not.Absolute Extrema on Compact Sets →).
Typical mistakes.
- Checking the Hessian at one point and concluding convexity: it must hold everywhere.
- Confusing semidefinite and definite: does not rule out convexity, but does not give strict convexity.
- Believing positive definiteness is necessary for strict convexity ().
- Deducing the existence of a minimum from convexity: it only says that a critical point, if it exists, is a global minimum.