Optimization Using The Hessian
Optimization Using The Hessian
Named after Ludwig Otto Hesse (a 19th century German mathematician), the Hessian comprises
of the second-order partial derivatives of a multivariate function. The Hessian can test for second-
order condition.
Given a multivariate function Y = f(x1 , x2 , x3 ), the Hessian is
∂11 ∂12 ∂13
|H| = |∂21 ∂22 ∂23 | where the elements are the second-order partial derivatives.
∂31 ∂32 ∂33
Conditions for a minimum or maximum depend on the signs of the first, second, and third
principal minors: |H1 |, |H2 | and |H3 |.
The second-order conditions for a minimum:
∂11 ∂12
|H1 | = ∂11 > 0 |H2 | = | |>0 |H3 | = |H| > 0
∂21 ∂22
All the principal minors of |H| are positive, |H| is positive definite, which fulfills the second-order
conditions for a minimum.
The second-order conditions for a maximum:
∂11 ∂12
|H1 | = ∂11 < 0 |H2 | = | |>0 |H3 | = |H| < 0
∂21 ∂22
All the principal minors of |H| alternate in sign between negative and positive. |H| is negative
definite, which fulfills the second-order conditions for maximum.
EXAMPLE 1.
Optimize the function y = −3x12 + 17x1 + x1 x3 − x22 + 2x2 + 2x2 x3 − 4x32 + x3 using the
Hessian to test the second-order conditions.
SOLUTION
The first-order conditions:
∂y ∂y
= −6x1 + 17 + x3 = 0 = −2x2 + 2 + 2x3 = 0
∂x1 ∂x2
∂y
= x1 + 2x2 − 8x3 + 1 = 0
∂x3
−6 0 1 x1 −17
In matrix form, [ 0 −2 2 ] [x2 ] = [ −2 ]
1 2 −8 x3 −1
Use Cramer’s rule,
|A1 | −210 |A2 | −140 |A3 | −70
x̅1 = = =3 x̅2 = =2 x̅3 = = =1
|A| −70 |A| −70 |A| −70
To test the second-order conditions, take the second partial derivatives from the first-order
conditions to form the Hessian.
−6 0 1
Thus, |H| = | 0 −2 2|
1 2 −8
|H| has the same elements as |A| since the first-order partials are linear. To apply the Hessian
test, check the signs of the first, second and third principal minors,
−6 0
|H1 | = −6 < 0 |H2 | = | | = 12 > 0 |H3 | = |H| = |A| = −70 < 0
0 −2
The principal minors of |H| alternate in sign between negative and positive. |H| is negative
definite, which fulfills the second-order conditions for maximum.
So, H is maximized at 𝐱̅ 𝟏 = 𝟑, 𝐱̅ 𝟐 = 𝟐, and 𝐱̅ 𝟑 = 𝟏.
Given the demand functions and the cost function
EXAMPLE 2.
Given the demand functions and the cost function
P1 = 22 − 3Q1 − Q2 − 2Q3 P2 = 29 − Q1 − 4Q2 P3 = 27 − Q2 − 3Q3
1
TC = 2Q21 + Q1 Q2 + Q22 + Q2 Q3 + 2 Q23
Maximize profits by (a) using Cramer’s rule for the first-order condition, and (b) using the
Hessian for the second-order condition.
a) π = (22 − 3Q1 − Q2 − 2Q3 )Q1 + (29 − Q1 − 4Q2 )Q2 + (27−Q2 − 3Q3 )Q3 −
1
(2Q21 + Q1 Q2 + Q22 + Q2 Q3 + 2 Q23 )
7
= 22Q1 + 29Q2 + 27Q3 − 3Q1 Q2 − 2Q2 Q3 − 2Q1 Q3 − 5Q21 − 5Q22 − Q23
2
π1 = 22 − 3Q2 − 2Q3 − 10Q1 = 0 π2 = 29 − 3Q1 − 2Q3 − 10Q2 = 0
π3 = 27 − 2Q2 − 2Q1 − 7Q3 = 0
−10 −3 −2 Q1 −22
In matrix form, [ −3 −10 −2] [Q2 ] = [−29]
−2 −2 −7 Q3 −27
Use Cramer’s rule:
̅ 1 = |A1| = −581 = 1
Thus, Q ̅ 2 = |A2 | = −1162 = 2
Q ̅ 3 = |A3| = −1743 = 3
Q
|A| −581 |A| −581 |A| −581
−10 −3 −2
b) |H| = | −3 −10 −2|
−2 −2 −7
Where |H1 | = −𝟏𝟎, |H2 | = 𝟗1, and |H3 | = |H| = |A| = −𝟓𝟖𝟏. H is maximized.