Optimal Control Notes
Optimal Control Notes
André L. Tits
September 2024
2. sufficient stability
For any given x, the circuit is now entirely specified and the various quantities mentioned
above can be computed. More precisely, we can define
P (x) = power dissipated
GB(x) = gain-bandwidth product
F R(x, ω) = frequency response, as a function of the frequency ω.
We then write the optimization problem as
and we obtain
not to just indicate the minimum value, but rather as a short-hand for
minimize f (x)
subject to g(x) ≤ 0
If we define g : Rn → Rm by
g 1(x)
g(x) = ..
(1.7)
.
m
g (x)
we obtain again
[This is called a semi-infinite optimization problem: finitely many variables, infinitely many
constraints.]
Note. If we define
(1.9) is equivalent to
Exercise 1.1 Prove the equivalence between (1.9) and (1.11). (To prove A = B, prove
A ⊆ B and B ⊆ A.)
(i) some potentially useful information (e.g., what are the ‘critical’ values of ω) is lost
when replacing (1.9) by (1.11)
(ii) for given x, ψ(x) may not be computable exactly in finite time (this computation
involves another optimization problem)
(iii) ψ may not be smooth even when φ is. E.g., x ∈ R, Ω = {−1, 1} with φ(x, −1) = −x,
φ(x, 1) = x, which yields ψ(x) = |x|, which is nonsmooth at x = 0; or more generally,
x, ω ∈ Rn ,Ω = {ω : kωk2 = 1}, φ(x, ω) = ω T x (2nd-order cone).
(b) By exhibiting a counterexample, show that there might not exist a continuous function
ω(·) such that, for all x, ψ(x) = φ(x, ω(x)).
Exercise 1.3 Again referring to (1.10), show, by exhibiting counterexamples, that continuity
of ψ is no longer guaranteed if either (i) Ω is compact but φ is merely continuous in each
variable separately or (ii) φ is jointly continuous but Ω is not compact, even when the “sup”
in (1.10) is attained for all x.
Exercise 1.4 Referring still to(1.10), exhibit an example where φ ∈ C∞ (all derivatives
exist and are continuous), where Ω is compact, but where ψ is not everywhere differentiable.
In this course, we will mostly limit ourselves to classical (non semi-infinite) problems
(and will generally assume continuous differentiability), i.e., to problems of the form
Remark 1.1 To fit the opamp design problem into formulation (1.11) we had to pick one
of the design specifications as objective (to be minimized). Intuitively more appealing would
be some kind of multiobjective optimization problem.
Remark 1.2 Problem (1.12) is broader than it may seem at first sight. For instance, it
includes 0/1 variables (in the scalar case, take g(x) := x(x − 1)) and integer variables (in
the scalar case take, e.g., g(x) := sin(πx).
T(x,s)
Figure 1.1:
– low value of the ISE for a step input (ISE = integral of the square of the difference
(error) between input and output, in time domain)
– “enough stability”
We decide to minimize the ISE, while keeping the Nyquist plot of T (x, s) outside some
forbidden region (see Figure 1.2) and keeping rise time, settling time, and overshoot under
given values. The following constraints are also specified.
−10 ≤ x1 ≤ 10 , − 10 ≤ x2 ≤ 10 , .1 ≤ x3 ≤ 10
Exercise 1.5 Put the p.i.d. problem in the form (1.6), i.e., specify f , g i , φi , Ωi .
parabola
y=(a+1)x2 - b u(t)
y(t)
(-1,0) 1
w=0
ι(t)
T(x,jw)
w=w̄
Tr Ts T
Figure 1.2:
T (x, jω) has to stay outside the forbidden region ∀ω ∈ [0, ω̄]
For a step input, y(x, t) is desired to remain between l(t) and u(t) for t ∈ [0, T ]
Example 1.3 Consider again a plant, possibly nonlinear and time varying, and suppose we
want to determine the best control u(t) to approach a desired response.
ẋ = F (x, u, t)
y = G(x, t)
where yu (t) is the output corresponding to control u(·) and v(·) is some reference signal.
Various features may have to be taken into account:
– piecewise continuous
– |u(t)| ≤ umax ∀t
– The entire state trajectory may be constrained (x(·)), e.g., to keep the temperature
reasonable
– One may require a “closed-loop” control, e.g., u(t) = u(x(t)). It is well known that
such ‘feedback’ control systems are much less sensitive to perturbations and modeling
errors.
Unlike Example 1.1 and Example 1.2, Example 1.3 is an ‘optimal control’ problem. Whereas
discrete-time optimal control problems can be solved by classical optimization techniques,
continuous-time problems involve optimization in infinite dimension spaces (a complete
‘waveform’ has to be determined).
(P ) min{f (x) x ∈ S}
f (x̂) ≤ f (x) ∀x ∈ S
(<) (∀x ∈ S, x 6= x̂)
Definition 1.2 A point x̂ is called a (strict) local minimizer for (P) if x̂ ∈ S and ∃ ǫ > 0
such that
Notation.
It often helps to distinguish the scalar 0 from the original in Rn or in a more general vector
space (see Appendix A). We will usually denote that latter by θ, sometimes specialized to
θn in the case of Rn or to θV in the case of a vector space V .
Scope
1. Type of optimization problems considered
(i) Finite-dimensional
unconstrained
equality constrained
inequality [and equality] constrained
(ii) Infinite-dimensional
calculus of variations (no “control” signal) (old: 1800)
optimal control (new: 1950’s)
2. Results sought
where the state transition matrix Φ satisfies the homogeneous differential equation
∂
Φ(t, t0 ) = A(t)Φ(t, t0 )
∂t
where x(t) ∈ Rn , u(t) ∈ Rm and A(·), B(·) and L(·) are matrix-valued functions, and C
denotes the set of continuous mappings; minimization is with respect to u and x. (Equiva-
lently, x can be viewed as a function xu of u defined by the dynamics and initial condition,
so the only constraint is continuity of u.) The initial and final times t0 and tf are given, as
is the initial state x0 . The mappings A(·), B(·), and L(·), defined on the domain [t0 , tf ], are
assumed to be continuous. Without loss of generality, L(t) (for all t) and Q are assumed
symmetric.
Remark 2.1 Clearly, inclusion of the terminal cost in (P) could equivalently be achieved
by replacing L(t) with L(t) + δ(t − tf )Q, where δ is the Dirac impulse. In these notes though,
we rule out such impulses (controls u are functions, not distributions).
The problem just stated is, in a sense, the simplest meaningful continuous-time optimal
control problem. Indeed, the cost function is quadratic and the dynamics linear, and there
are no constraints on u (except for continuity). While a linear cost function may be even
simpler than a quadratic one, in the absence of (implicit or explicit) constraints on the
control, such problem would have no solution (except for the trivial situation where the cost
function is constant, independent of u and x).
In fact, the problem is simple enough that it can be solved without much advanced
mathematical machinery, by simply “completing the square”. Indeed, if (i) the integrand in
(P) were a perfect square and (ii) the give Q were the zero matrix, then the minimum value
of J would be attained with u selected (perhaps as a function of x) in such a way that the
integrand vanishes for all t.
Accordingly, the thought arises of first modifying the integrand to make it a perfect
square, e.g., by adding to it an appropriate quantity, say φ(x(t, u(t)). Of course, doing so
adds to J(u) a quantity (the integral of φ), which modifies the control problem to be solved.
Unless φ can be chosen in such a way that it integral does not depend on u or x. The R
following fundamental lemma provides a first step to resolving this conundrum. There ϕ
depends on (u, x) only via x(t0 ) and x(tf ), which as we will see can be taken care of by
making a proper choice of matrix K(·) involved in the lemma.
Lemma 2.1 (Fundamental Lemma/Path Independence Lemma) Let A(·), B(·) be continu-
ous matrix-valued functions and K(·) = K T (·) be a matrix-valued function with continuously
differentiable entries (in fact, absolute continuity is sufficient) on [t0 , tf ]. Then, if x(t) and
u(t) are related by
ẋ(t) = A(t)x(t) + B(t)u(t) ∀t, (2.5)
it holds that
Z tf
T T
x(tf ) K(tf )x(tf ) − x(t0 ) K(t0 )x(t0 ) = φ(x(t), u(t), K(t), K̇(t))dt (2.6)
t0
where
φ(x(t), u(t), K(t), K̇(t)) = x(t)T (K̇(t) + AT (t)K(t) + K(t)A(t))x(t) + 2x(t)T K(t)B(t)u(t).
Ztf
= (ẋ(t)T K(t)x(t) + x(t)T K̇(t)x(t) + x(t)T K(t)ẋ(t))dt
t0
and the claim follows if one substitutes for ẋ(t) the right hand side of (2.5).
Importantly, in Lemma 2.6, matrix K(·) can be freely selected (subject to symmetry
and continuous differentiability) for the purpose at hand. This is key to invoking it toward
solving problem (P), as we now show.
Selecting K(tf ) to be equal to Q and invoking (2.6) yields, since x(t0 ) = x0 ,
Z tf
T T
x(tf ) Qx(tf ) = x0 K(t0 )x0 + φ(x(t), u(t), K(t), K̇(t))dt
t0
Since K(·) does not depend on control u or state x, the first term in the right-hand side is
constant and it remains to select K(·) in such a way to that integrand is a perfect square.
Expanding φ we get
Z tf
2J(u) = xT (K̇ + AT K + KA + L)x + u(K T B + B T K)x + uT u dt + xT0 K(t0 )x0 ,
t0
where we have removed the explicit dependence on t for notational compactness. Now recall
that the above holds independently of the choice of K(·). If we select it to satisfy (assuming
a solution exists on [t0 , tf ]!) the differential equation
i.e.,
Ztf
1 1
J(u) = kB(t)T K(t)x(t) + u(t)k22 dt + xT0 K(t0 )x0 . (2.8)
2 2
t0
Note that, because K(·) is selected independently of u, the last term in (2.8) does not depend
on u.
We have completed the square! Equation (2.7) is an instance of a differential Riccati
equation (DRE) (after Jacopo F. Riccati, Italian mathematician, 1676–1754). Its right-hand
side is quadratic in the unknown K. We postpone the discussion of existence and uniqueness
of a solution to this equation and of whether such solution is symmetric (as required for the
Fundamental Lemma to hold). The following scalar example shows that this is an issue
indeed.
Example 2.1 (scalar Riccati equation) Consider the case of scalar, time-independent values
a = 0, b = 1, l = −1, q = 0, corresponding to the optimal control problem
Z tf
minimize (u(t)2 − x(t)2 )dt s.t. ẋ(t) = u(t) t ∈ [t0 , tf ), u ∈ C.
t0
We get
atan(k(t)) − atan(k(tf )) = t − tf ,
yielding
k(t) = tan (t − tf ),
with a finite escape time at t̂ = tf − π2 . (In fact, if t0 < tf − π2 , even if we “forget” about the
singularity at t̂, k(t) = tan (t−tf ) is not the integral of its derivative (as would be required by
the Fundamental Lemma): k̇(t) is positive everywhere, while k(t) goes from positive values
just before t̂ to negative values after t̂.) It is readily verified that in fact this optimal control
problem itself has no solution if, e.g., with x0 = 0, when tf is too large. Indeed, with x0 = 0,
controls of the form u(t) = αt yields
Z tf
2 t2
J(u) = α t2 (1 − )dt,
0 4
√
which is negative for tf > 10 and hence can be made arbitrary largely negative by letting
α → ∞.
For the time being, we assume that (2.7) with terminal condition K(tf ) = Q has a unique
solution exists on [t0 , tf ], and we denote its value at time t by
K(t) = Π(t, Q, tf ),
and that its optimal value is xT0 Π(t0 , Q, tf )x0 . Equation (2.9) is a feedback law, which specifies
a control signal in closed-loop form.
Exercise 2.1 Show that this feedback law yields a well-defined, continuous control signal û.
(Hint. First solve for x, then obtain û.)
Remark 2.2 By “closed-loop” it is meant that the right-hand side of (2.9) does not depend
on the initial state x0 nor on the initial time t0 , but only on the current state and time. Such
formulations are of major practical importance: If, for whatever reason (modeling errors,
perturbations) the state at some time τ ∈ [t0 , tf ] is not what it was predicted to be (when
the optimal control u∗ (·) was computed, at time t0 ), the control generated by (2.9) is still
optimal over τ ∈ [t0 , tf ] (for the same cost function but with the integral starting at time
τ )—assuming no modeling errors or perturbations between times τ and tf . This is of course
not so for the open-loop optimal control obtained for the original problem, with starting
time t0 .
Remark 2.3 It follows from the above that existence of a solution to the DRE over [t0 , tf ]
is a sufficient condition for existence of a solution to optimal control problem (P ) for every
x0 ∈ Rn . Indeed, of course, the existence of a solution to (P ) is not guaranteed at the outset.
This was seen, e.g., in Example 2.1 above.
where x∗ is the “optimal trajectory”, i.e., the trajectory generated by the optimal control.
As noted above, the optimal value is given by
1
V (t0 , x0 ) := J(u∗ ) = xT0 Π(t0 , Q, tf )x0 .
2
V is known as the value function. Now suppose that, starting from x0 at time t0 , perhaps after
having undergone perturbations, the state reaches x(τ ) at time τ ∈ (t0 , tf ). The remaining
portion of the minimal cost, to be incurred over [τ, tf ], is the minimum, over u ∈ U, subject
to ẋ = Ax + Bu with x(τ ) fixed, of
1
R tf
Jτ (u) := 2 τ
x(t)T L(t)x(t) + u(t)T u(t) dt + 21 x(tf )T Qx(tf ) (2.11)
R
1 tf
= 2 τ
kB(t)T Π(τ, Q, tf )x(t) + u(t)k2 dt + 12 x(τ )T Π(τ, Q, tf )x(τ ), (2.12)
where we simply have replaced, in (2.8) t0 with τ and x0 with x(τ ). The cost-to-go is
1
Jτ (u∗ ) = x(τ )T Π(τ, Q, tf )x(τ ).
2
Hence, the cost-to-go from an arbitrary time t < tf and state ξ ∈ Rn is
1
V (t, ξ) = Jt (u∗ ) = ξ T Π(t, Q, tf )ξ. (2.13)
2
Remark 2.4 We have not made any positive definiteness (or semi-definiteness) assumption
on L(t) or Q. The key assumption we have made is that the stated Riccati equation has
a solution Π(t, Q, tf ) over [t0 , tf ]. Below we investigate conditions (in particular, on L and
Q) which insure that this is the case. At this point, note that, if L(t) 0 for all t and
Q 0, then J(u) ≥ 0 for all u ∈ C, and expression (2.13) of the cost-to-go implies that
Π(t, Q, tf ) 0 whenever it exists.
Remark 2.5 Note that (DRE) does not involve t0 nor x0 . In particular, when a solution
Π(·, Q, tf ) exists on [t0 , tf ], it yields optimal controls for every problem Pτ,ξ with the same
A(·), B(·), L(·), Q and tf as in (P), but with initial state ξ ∈ Rn and τ ∈ [t0 , tf ]. In particular
the value function V : (τ, ξ) 7→ V (τ, ξ) is the same for every problem Pτ,ξ , as long as (DRE)
has a solution on [τ, tf ], in particular, for every (τ, ξ) such that τ ∈ [t0 , tf ]. The notation Pτ,ξ
will be used in the remainder of this chapter.
Lemma 2.2 Let t̂ = inf{τ : Π(t, Q, tf ) exists ∀t ∈ [τ, tf ]}. If t̂ is finite, then kΠ(·, Q, tf )k is
unbounded on (t̂, tf ].
Proof. Let
ϕ(K, t) = −A(t)T K − KA(t) + KB(t)B T (t)K − L(t),
so that (2.7) can be written
In other words, either Π(t, Q, tf ) exists and is unique over (−∞, tf ), or there exists a finite
t̂ < tf such that Π(t, Q, tf ) is unbounded on t̂, tf ) (finite escape time). Further, since clearly
the transpose of a solution to the Riccati equation is also a solution, this unique solution
must be symmetric, as required in the path-independence lemma.
Remark 2.6 It follows that, without any further conditions, if t0 is close enough to tf , the
optimal control problem has a (unique) solution.
Next, note that if L(t) 0 for all t, and Q 0, then J(u) ≥ 0 for all u ∈ C. Hence, in
such case, as long as an optimal control exists,
V (t, ξ) ≥ 0 ∀t ≤ tf , ξ ∈ Rn .
It then follows from (2.13) that Π(τ, Q, tf ) is positive semidefinite for every τ such that
Π(t, Q, tf ) exists for all t ∈ [τ, tf ].
Theorem 2.1 Suppose L(t) 0 for all t and Q 0 Then Π(t, Q, tf ) exists ∀t ≤ tf , i.e,
t̂ = −∞.
Proof. Again, let t̂ = inf{τ : Π(t, Q, tf ) exists ∀t ∈ [τ, tf ]}, so that Π(·, Q, tf ) exists on (t̂, tf ].
Below, we show that kΠ(·, Q, tf )k is bounded by a continuous function over (t̂, tf ]. This will
imply that, if kΠ(·, Q, tf )k were to be unbounded over (t̂, tf ], we would have t̂ = −∞; in view
of Lemma 2.2, “t̂ is finite” is ruled out, and the claim will follow.
Thus, let τ ∈ (t̂, tf ]. For any x ∈ Rn , using the positive definiteness assumption on L(t)
and Q, we have
Ztf
ξ T Π(τ, Q, tf )ξ = 2V (τ, ξ) = min u(t)T u(t) + x(t)T L(t)x(t) dt + x(tf )T Qx(tf ) ≥ 0, (2.14)
u∈C
τ
where x(t) satisfies (2.3) with initial condition x(τ ) = ξ. We show that there exists a
continuous function F : (−∞, tf ) → Rn such that, if Π(·, Q, tf ) exists (and is unique and
continuously differentiable) on [τ, tf ), then, for all ξ ∈ Rn ,
ξ T Π(τ, Q, tf )ξ ≤ ξ T F (τ )ξ, (2.15)
implying, in view of Exercise 2.2 below and, since Π(τ, Q, tf )ξ 0, that
kΠ(τ, Q, tf )k2 ≤ kF (τ )k2 ∀τ ∈ (t̂, tf ],
as claimed. To conclude the proof, we construct such F . From (2.14), we have for every
u ∈ C,
Ztf
T
ξ Π(τ, Q, tf )ξ ≤ u(t)T u(t) + x(t)T L(t)x(t) dt + x(tf )T Qx(tf ) (2.16)
τ
To obtain an upper bound quadratic in ξ, we let û be identically zero. The corresponding x̂
then satisfies ẋ = Ax, so that x̂(t) = ΦA (t, τ )ξ for all τ . This yields the upper bound (2.15)
with Z t f
F (τ ) := ΦA (t, τ )T L(t)ΦA (t, τ )dt + ΦA (tf , τ )T QΦA (tf , τ ).
τ
where L, S and R are continuous on [t0 , tf ], L(t) and R(t) are symmetric on [t0 , tf ], and
R(t) ≻ 0 for all t. Hint: Let v(t) = T (t)u(t) + M(t)x(t), where T satisfies R(t) = T (t)T T (t)
for all t, and T is continuous (does such T exist?).
Ztf
1 T 1 T
J(u) = x(t) L(t)x(t) + u(t) R(t)u(t) dt,
2 2
t0
evolving in R2n .
Suppose now that t0 ∈ [τ, tf ], and x(t0 ) = x0 . From (2.17), we also have the conditions
p (tf ) = −Qx∗ (tf ), yielding a linear two-point boundary-value problem (TPBVP). We know
∗
Theorem 2.2 Let X(t) and P (t) be n × n matrices satisfying the differential equation
Ẋ(t) A(t) B(t)R(t)−1 B T (t) X(t)
= , (2.20)
Ṗ (t) L(t) −AT (t) P (t)
satisfies DRE (2.7) for t ∈ [τ, tf ], for every τ < tf such that Π(t, Q, tf ) exists on [τ, tf ].
Exercise 2.5 Show that, if the DRE has a continuous solution Π(t, Q, tf ) on [τ, tf ] then
X(t) is nonsingular on [τ, tf ], so that Π(t, Q, tf ) = −P (t)X(t)−1 for all t ∈ [τ, tf ]. [Hint:
Use (2.21) to solve (2.20) for X(·).]
where clearly the minimum is achieved at v = R(t)−1 B T (t)p∗ (t). Thus the following result
(an instance of Pontryagin’s Principle; see Chapter 6 for more details) holds.1
Theorem 2.3 Suppose Π(t, Q, tf ) exists on [t0 , tf ] (so that the TPBVP has a (unique) solu-
tion). Then u∗ ∈ C solves (P) if and only if
ṗ∗ (t) = −∇ξ H(t, x∗ (t), p∗ (t), u∗(t)) (= −AT p∗ (t) + L(t)x∗ (t)), ∀t ∈ [t0 , tf ],
1
For the present special case, the condition is necessary and sufficient; as seen in Chapter 6, this is not
so in general.
Then
H(t, x∗ (t), p∗ (t), u∗ (t)) = H(t, x∗ (t), p∗ (t)) ∀t.
Function H is the pre-Hamiltonian,2 (sometimes called control Hamiltonian or pseudo-Hamiltonian)
and H the Hamiltonian (or true Hamiltonian). (Sir William R. Hamilton, Irish mathemati-
cian, 1805–1865.) Thus
1 1
H(t, ξ, η) = − ξ T L(t)ξ + η T A(t)ξ + η T B(t)R(t)−1 B T (t)η
2 2
T
1 ξ −L(t) AT (t) ξ
= −1 T .
2 η A(t) B(t)R(t) B (t) η
Finally, note that the optimal cost J(u∗ ) can be equivalently expressed as
1
J(u∗ ) = − x(t0 )T p(t0 ).
2
Remark 2.7 The gradient of H with respect to the first and second (z := [ξ; η]) is given by
A(t) B(t)R(t)−1 B T (t) ξ
∇z H(t, ξ, η) = .
−L(t) AT (t) η
Note however that while, as we will see later, (2.22)–(2.23) hold rather generally, (2.24) no
longer does when constraints are imposed on the values of control signal, as is the case later
in this chapter as well as in Chapter 6. Indeed, H usually is non-smooth.
Remark 2.8 Because ∇u H(t, x∗ (t), p∗ (t), u∗ (t)) = 0 and u∗ is differentiable, along trajec-
tories of (2.19), with z ∗ (t) := [x∗ (t); p∗ (t)], we have
d ∂
H(t, x∗ (t), p∗ (t), u∗ (t)) = ∇z H(t, x∗ (t), p∗ (t), u∗ (t))T ż ∗ (t) + H(t, x∗ (t), p∗ (t), u∗(t))
dt ∂t
∂
= H(t, x∗ (t), p∗ (t), u∗ (t))
∂t
since
∇z H(t, x∗ (t), p∗ (t), u∗ (t))T ż ∗ (t) = ∇z H(t, x∗ (t), p∗ (t), u∗ (t))T J∇z H(t, x∗ (t), p∗ (t), u∗(t))
= 0 (since J T = −J).
In particular, if A, B and L do not depend on t, H(t, x∗ (t), p∗ (t), u∗ (t)) is constant along
trajectories of (2.19).
2
This terminology is borrowed from P.S. Krishnaprasad
subject to
Note that y is merely some linear image of x, and need not be a physical output. For
example, it could be an error signal to be driven to the origin.
Consider the differential Riccati equation (2.7) with our constant A, B, and L and, in
agreement with the notation used in the previous section, denote by Π(t, 0, τ ) the value at
time t of the (continuously differentiable) solution to this equation that vanishes at time τ .
Since L is positive semi-definite, in view of Theorem 2.1, such solution exists for all t and τ
(with t ≤ τ ) and is unique, symmetric and positive semi-definite. Noting that Π(t, 0, τ ) only
depends on t − τ (since the Riccati equation is now time-invariant), we define
Π(τ ) := Π(0, 0, τ ),
so that
Π(t, 0, τ ) = Π(0, 0, τ − t) = Π(τ − t).
It is intuitively reasonable to expect that, for fixed t, as τ goes to ∞, the optimal feedback
law u(t) = −B T Π(t, 0, τ )x(t) for the finite-horizon problem with cost function
Zτ
τ 1
J (u) := (x(t)T C T Cx(t) + u(t)T u(t))dt .
2
0
will tend to an optimal feedback law for our infinite horizon problem. Since the optimal
cost-to-go is x(t)T Π(τ − t)x(t), it is also tempting to guess that Π(τ − t) itself will converge,
as τ → ∞, to some matrix Π∞ independent of t (since the time-to-go will approach ∞ at
every time t and the dynamics is time-invariant), satisfying the algebraic Riccati equation
(since the derivative of Π∞ with respect to t is zero)
AT Π∞ + Π∞ A − Π∞ BB T Π∞ + C T C = 0, (ARE)
Proof. Since the optimal value for J τ (u) is 21 xT0 Π(τ )x0 , for any u ∈ C we have, for all τ > 0,
Zτ
xT0 Π(τ )x0 ≤ x(σ)T C T Cx(σ) + u(σ)T u(σ)dσ. (2.25)
0
Invoking stabilizability, let u(t) = F x(t) be a stabilizing static state feedback and let x̂ be
the corresponding solution of
ẋ = (A + BF )x
x(0) = x0 ,
i.e., x̂(t) = e(A+BF )t x0 ; further, let û = F x̂. Then, since A + BF is Hurwitz stable and the
integrand in (2.25) is nonnegative, we have, for all τ ≥ 0,
Zτ Z∞
xT0 Π(τ )x0 ≤ x̂(σ)T C T C x̂(σ) + û(σ)T û(σ)dσ ≤ x̂(σ)T C T C x̂(σ) + û(σ)T û(σ)dσ = xT0 M x0 ,
0 0
where
Z∞
T
M = e(A+BF ) t (C T C + F T F )e(A+BF )t dt
0
is well defined and independent of τ . Since in view of (2.25) xT0 Π(τ )x0 is nonnegative, it is
bounded for every fixed x0 . Further, non-negative definiteness of C T C implies that xT0 Π(τ )x0
is monotonically non-decreasing as τ increases. Since it is bounded, xT0 Π(τ )x0 must converge
for every x0 .3 Using the fact that Π(τ ) is symmetric it is easily shown that Π(τ ) converges
(see Exercise 2.7 below), i.e., for some symmetric matrix Π∞ ,
lim Π(τ ) = Π∞ .
τ →∞
Symmetry and positive semi-definiteness are inherited from Π(τ ). Finally, since4
and the right-hand side converges when τ → ∞, Π̇(τ ) must also converge and, since it is the
derivative of Π(τ ), which itself converges, its limit must be zero. Hence Π∞ satisfies (ARE).
Note: The final portion of the proof is taken from [?, p.296–297], [?, section 8.4].
Exercise 2.7 Prove that convergence of xT0 Π(τ )x0 for arbitrary x0 implies convergence of
Π(τ ).
Now note that, for any ũ ∈ C and τ ≥ 0, we have
1 T 1
x0 Π(τ )x0 = xT0 Π(0, 0, τ )x0 = min J τ (u) ≤ J τ (ũ) ≤ J(ũ),
2 2 u∈C
u = −B T Π∞ x, (2.28)
Theorem 2.4 Suppose (A, B) is stabilizable. Then Π∞ solves (ARE), the control law u =
−B T Π∞ x is optimal, yielding u∗ , and
1
J(u∗ ) = xT0 Π∞ x0 .
2
TΠ
x∗ (t) = e(A−BB ∞ )t
x0 ∀t.
Also, V (t, ξ) = 21 ξ T Π∞ ξ does not depend on t. Finally, if control law (2.28) is stabilizing,
then u∗ is the only optimal control.
This solves the infinite horizon LTI problem. Note however that it is not guaranteed that
the optimal control law is stabilizing. For example, consider the extreme case when C = 0
(in which case Π∞ = 0) and the system is open loop unstable. It seems clear that this is due
to unstable modes not being observable through C. This of course is undesirable. We now
show that, indeed, under a detectability assumption, the optimal control law is stabilizing.
Theorem 2.5 Suppose (A, B) is stabilizable and (C, A) detectable. Then, if K 0 solves
(ARE), A − BB T K is Hurwitz stable; in particular, A − BB T Π∞ is Hurwitz stable.
Since the left-hand side is non-negative (since K 0) and the right-hand side non-positive,
both sides must vanish. Thus (i) Cv = 0 and, (ii) B T Kv = 0 which together with (2.30),
implies that Av = λv. Since Reλ ≥ 0, this contradicts detectability of (C, A).
Corollary 2.1 If (A, B) is stabilizable and (C, A) is detectable, then the optimal control law
u = −B T Π∞ x is stabilizing.
Remark 2.9 Some intuition concerning the solutions of (ARE) can be gained as follows.
In the scalar case, if B 6= 0 and C 6= 0, the left-hand side is a downward parabola that
intersects the vertical axis at C 2 (> 0); hence (ARE) has two real solutions, one positive,
the other negative. When n > 1, the number of solutions increases, most of them being
indefinite matrices (i.e., with some positive eigenvalues and some negative eigenvalues). In
line with the fact that Π(t) 0 for all t, a (or the) positive semi-definite solution will be the
focus of our investigation.
Finally, we discuss how (ARE) can be solved directly (without computing the limit of
Π(t)). In the process, we establish that, under stabilizability of (A, B) and detectability of
(C, A), Π∞ is that unique stabilizing solution of (ARE), hence the unique symmetric positive
semi-definite solution of (ARE). Also see Appendix E in [?].
Consider the Hamiltonian matrix (see (2.19))
A BB T
H= ,
L −AT
Then
−1 I 0
T = .
K+ I
where σ(·) denotes the spectrum (set of eigenvalues). Thus, if (A, B) is stabilizable and
(C, A) detectable (so such solution K + exists), H cannot have any imaginary eigenvalues:
It must have n eigenvalues in C− and n eigenvalues in C+ . Furthermore the first n columns
of T form a basis for the stable invariant subspace of H, i.e., for the span of all generalized
eigenvectors of H associated with stable eigenvalues (see, e.g., Chapter 13 of [?] for more on
this).
S11
Now let be a basis for the stable invariant subspace of H, i.e., let
S21
S11 S12
S=
S21 S22
be any invertible matrix such that
−1 X Z
SHS =
0 Y
for some X, Y, Z such that σ(X) ⊂ C− and σ(Y ) ⊂ C+ . (Note that σ(H) = σ(X) ∪ σ(Y ).)
Then it must hold that, for some non-singular R′ ,
S11 I
= R′ .
S21 −K +
K + = −S21 S11
−1
,
which also shows that (ARE) cannot have more than one stabilizing solution. From Theo-
rem 2.5, it also follows that, if (A, B) is stabilizable and (C, A) detectable, then (ARE) has
exactly one positive semidefinite solution, namely Π∞ .
We have thus proved the following.
−1
Theorem
2.7 Suppose (A, B) is stabilizable and (C, A) is detectable. Then Π∞ = −S21 S11 ,
S11 −1
where is any basis for the stable invariant subspace of H. In particular, S21 S11 is
S21
symmetric and there is exactly one stabilizing solution to (ARE), namely Π∞ , which is also
the only positive semi-definite solution.
0 I
Exercise 2.9 Given J = (a unitary matrix such that J 2 = −I), any real matrix
−I 0
H that satisfies J −1 HJ = −H T is said to be Hamiltonian. Show that if H is Hamiltonian
and λ is an eigenvalue of H, then −λ also is.
• (C, A) is detectable, then (i) the optimal control u∗ is unique and is generated by the
feedback control law u = −B T Π∞ ; (ii) A − BB T Π∞ is Hurwitz stable, i.e., the optimal
control law is stabilizing; and (iii) Π∞ is the only stabilizing solution of (ARE) and
the only positive semi-definite solution of (ARE).
Question: Given xf ∈ Rn , tf > t0 , does there exist u ∈ U such that, for system (2.1),
x(tf ) = xf ? If the answer to the above is “yes”, we say that xf is reachable from (x0 , t0 )
at time tf . If moreover this holds for all x0 , xf ∈ Rn then we say that the system (2.1) is
reachable on [t0 , tf ].
There is no loss of generality in assuming that xf = 0n ,5 as shown by the following
exercise.
d
x̂(t) = A(t)x̂(t) + B(t)u(t) ∀t ∈ [t0 , tf ).
dt
Conclude that, under dynamics (2.1), u steers (x0 , t0 ) to (xf , tf ) if and only if it steers (ξ, t0 )
to (0n , tf ), where ξ (= ξ(x0 , t0 )) := x0 − Φ(t0 , tf )xf .
5
Here and elsewere in these notes, 0n is the origin of Rn .
Since Φ(t0 , tf ) is invertible, it follows that system (2.1) is reachable on [t0 , tf ] if and only if it
is controllable on [t0 , tf ], i.e., if and only if, given x0 , there exists u ∈ C that steers (x0 , t0 ) to
(0n , tf ). [Note. Equivalence between reachability and controllability (to the origin) does not
hold in the discrete-time case, where controllability is a weaker property than reachability.]
Now controllability to (0n , tf ) from (ξ, t0 ), for some ξ, is equivalent to solvability of the
equation (in u ∈ C):
Ztf
Φ(tf , t0 )ξ + Φ(tf , σ)B(σ)u(σ)dσ = 0n .
t0
Equivalently (multiplying on the left by the non-singular matrix Φ(t0 , tf )), (0n , tf ) can be
reached from (ξ, t0 ). if there exists u ∈ C such that
Ztf
ξ = Lu := − Φ(t0 , σ)B(σ)u(σ)dσ,
t0
Ztf
1 1
J(u) := hu, ui = u(t)T u(t)dt
2 2
t0
u = L∗ η,
LL∗ η = ξ
(and such points do exist). It is shown in Exercise A.50 of Appendix A that L∗ is given by
which yields
Ztf
∗
LL µ = − Φ(t0 , t)B(t)(L∗ µ)(t)dt
t0
Ztf
= Φ(t0 , t)B(t)B T (t)ΦT (t0 , t)dt µ, ∀µ ∈ Rn ,
t0
(W (t0 , tf ) is often defined instead with Φ(tf , t) instead of Φ(t0 , t); note though that Φ(t0 , tf )
is invertible.) Since R(L) = R(LL∗ ), 0n is reachable at tf from (ξ, t0 ) if and only if
ξ ∈ R(W (t0 , tf )) .
with vi (t) := B(t)T Φi• (t0 , t)T for all t ∈ [t0 , tf ], where h·, ·i is again the Lm
2 inner product
i.e., W (t0 , tf ) is the Gramian matrix (or Gram matrix, or Gramian; Jørgen P. Gram, Danish
mathematician, 1850–1916) associated with the vectors (Φj· (t0 , ·)B(·))T , j = 1, . . . , n. It is
known as the reachability Gramian. It is invertible if and only if R(L) = Rn , i.e., if and
only if the system is reachable on [t0 , tf ].
Suppose W (t0 , tf ) is invertible indeed and, for simplicity, assume that the target state is
the origin, i.e., xf = 0n . (Also see Theorem A.6.) The unique minimum energy control that
steers (x0 , t0 ) to (0n , tf ) is then given by6
i.e.
Note that, as expressed in (2.31), û(t) depends explicitly on the initial state x0 and initial
time t0 . Consequently, if between t0 and the current time t, the state x has been affected by
an external perturbation, û as expressed by (2.31) is no longer optimal (minimum energy)
over the remaining time interval [t, tf ]. Let us address this issue. (We still assume that
xf = 0n .) At time t0 , we have
û(t0 ) = −B T (t0 )ΦT (t0 , t0 )W (t0 , tf )−1 x(t0 )
= −B T (t0 )W (t0 , tf )−1 x(t0 ).
Intuitively, this must hold independently of the value of t0 , i.e., for the problem un-
der consideration, Bellman’s Principle of Optimality holds (Richard E. Bellman, American
mathematician, 1920–1984): Independently of the initial state (at t0 ), for û to be optimal,
it is necessarily the case that û applied from the current time t ≥ t0 up to the final time tf ,
starting atR tthe current state x(t), be optimal for the remaining problem, i.e., for the objective
function t u(τ )T u(τ )dτ . Specifically, given x ∈ Rn and t ∈ [t0 , tf ] such that xf is reachable
f
at time tf from (x, t), denote by P (x, t; xf , tf ) the problem of determining the control of least
energy that steers (x, t) to (xf , tf ), i.e., with (x, t) replacing (x0 , t0 ). Let x(·) be the state
trajectory that results when optimal control û is applied, starting from x0 at time t0 . Then
Bellman’s Principle of Optimality asserts that, for any t ∈ [t0 , tf ], the restriction of û to [t, tf ]
solves P (x(t), t; xf , tf ). (See Chapter 3 for a proof of Bellman’s Principle in the discrete-time
case.)
Remark 2.10 It is readily seen that the optimality principle holds only for a class of optimal
control problems (which includes those considered so far as well as most of those to be
considered later on). Indeed, the principle assumes that the cost is incurred sequentially, as
time increases (and as the state is integrated accordingly): the cost incurred up to time t
does not depend on values of u beyond t.
Exercise 2.11 Assuming for simplicity that piecewise continuous controls (i.e., controls
that are right-continuous everywhere, and continuous everywhere except possibly at finitely
many points, with finite left and right limits at those points) are admissible7 prove that Bell-
man’s Principle of Optimality holds for the minimum energy fixed endpoint problem. [Hint:
Given an optimal control u∗ for P (x0 , t0 ; xf , tf ), assuming by contradiction that a lower en-
ergy control û exists for P (x(t), t; xf , tf ), construct, based on û, a better control that u∗ for
P (x0 , t0 ; xf , tf ), a contradiction.]
v(t) u(t) •
x(t)
+ x(t)
B(t) + ∫
-
A(t)
BT (t)W -1 (t,t 1)
+
i c v
-
whenever the inverse exists. Note that, with a fixed ξ 6= 0n , V (t, ξ) → ∞ as t → tf . This
reflects the fact that, with x(tf ) = 0n , for t close to tf , very high energy must be expended
to reach the origin in a very short time t − tf .
Exercise 2.12 Prove (2.33) from (2.31) directly, without invoking Bellman’s Principle.
d
cv(t) = i(t)
dt
Ztf
minimize ri(t)2 dt s.t. v(0) = v0 , v(tf ) = v1
0
We obtain
1
B(t) ≡ , A(t) ≡ 0
c
Ztf
1 tf
W (0, tf ) = 2
dt = 2
c c
0
v0 − v1
η0 = c2
tf
1 c2 (v0 − v1 ) c(v1 − v0 )
i0 (t) = − = = constant.
c tf tf
The closed-loop optimal feedback law is given by
−c
i0 (t) = (v(t) − v1 ).
tf − t
Exercise 2.13 Discuss the same optimal control problem (with fixed end points) with the
objective function replaced by
Ztf
1
J(u) ≡ u(t)T R(t)u(t) dt
2
t0
where R(t) = R(t)T ≻ 0 for all t ∈ [t0 , tf ] and R(·) is continuous. [Hint: define a new inner
product on U.]
The controllability Gramian W (·, ·) happens to satisfy certain simple equations. Recalling
that
Ztf
W (t, tf ) = Φ(t, σ)B(σ)B T (σ)Φ(t, σ)T dσ
t
d
W (t, tf ) = A(t)W (t, tf ) + W (t, tf )AT (t) − B(t)B T (t) (2.34)
dt
implying that, if W (t, tf ) is invertible, it satisfies
d
W (t, tf )−1 = −W (t, tf )−1 A(t) − AT (t)W (t, tf )−1 + W (t, tf )−1 B(t)B T (t)W (t, tf )−1(2.35)
dt
Equation (2.34) is linear. It is a Lyapunov equation. Equation (2.35) is quadratic. It is a
Riccati equation (for W (t, tf )−1 ).
Exercise 2.14 Prove that if a matrix M(t) := W (t, tf ) satisfies Lyapunov equation (2.34)
then, at every t < tf at which it is invertible, its inverse satisfies Riccati equation (2.35).
(Hint: dtd M(t)−1 = −M(t)−1 ( dtd M(t))M(t)−1 .)
Exercise 2.15 Prove that W (·, ·) also satisfies the functional equation
As we have already seen, the Riccati equation plays a fundamental role in optimal control
systems involving linear dynamics and quadratic cost (linear-quadratic problems). At this
point, note that, if xf = 0n and W (t, tf ) is invertible, then û(t) = −B(t)T P (t)x(t), where
P (t) = W (t, tf )−1 solves Riccati equation (2.35).
We have seen that, if W (t0 , tf ) is invertible, the optimal cost for problem (FEP) is given
by
1 1
J(û) = hû, ûi = xT0 W (t0 , tf )−1 x0 . (2.36)
2 2
This is clearly true for any t0 , so that, from a given time t < tf (such that W (t, tf ) is
invertible) the “cost-to-go” is given by
1
x(t)T W (t, tf )−1 x(t)
2
I.e., the value function is given by
1
V (t, ξ) = ξ T W (t, tf )−1 ξ ∀ξ ∈ Rn , t < tf .
2
This clearly bears resemblance with results we obtained for the free endpoint problem since
W (t, tf )−1 satisfies the associated Riccati equation (see Exercise 2.14).
Now consider the more general quadratic cost
Ztf Ztf T
1 T T x(t) L(t) 0 x(t)
J(u) := x(t) L(t)x(t) + u(t) u(t) dt = dt, (2.37)
2 u(t) 0 I u(t)
t0 t0
where L(·) = L(·)T ∈ C. Let K(t) = K(t)T be some continuously differentiable time-
dependent matrix. Using the Fundamental Lemma we see that, since x0 and xi are fixed, it
is equivalent to minimize (we no longer assume that xf = 0n )
˜ 1
J(u) := J(u) + (xf T K(tf )xf − xT0 K(t0 )x0 )
2
Ztf T
1 x(t) L(t) + K̇(t) + AT (t)K(t) + K(t)A(t) K(t)B(t) x(t)
= dt.
2 u(t) B(t)T K(t) 0 u(t)
t0
To “complete the square”, suppose there exists such K(t) that satisfies
L(t) + K̇(t) + AT (t)K(t) + K(t)A(t) = K(t)B(t)B(t)T K(t)
i.e., satisfies the Riccati differential equation
K̇(t) = −AT (t)K(t) − K(t)A(t) + K(t)B(t)B(t)T K(t) − L(t), (2.38)
As we have seen when discussing the free endpoint problem, if L(t) is positive semi-definite
for all t, then a solution exists for every prescribed positive semi-definite “final” value K(tf ).)
Then we get
Ztf T
˜ 1 x(t) K(t)B(t)B(t)T K(t) K(t)B(t) x(t)
J(u) = dt
2 u(t) B(t)T K(t) I u(t)
t0
Ztf
1 2
= B(t)T K(t)x(t) + u(t) 2
dt.
2
t0
Now, again supposing that some solution to (DRE) exists, let K(·) be such a solution
with, say, K(tf ) = Kf , and let
v Kf (t) = B T (t)K(t)x(t) + u(t).
It is readily verified that, in terms of the new control input v Kf , the systems dynamics
become
ẋ(t) = [A(t) − B(t)B T (t)K(t)]x(t) + Bv Kf (t) t ∈ [t0 , tf ),
and the cost function takes the form
Ztf
˜ =1
J(u) v Kf (t)T v Kf (t)dt.
2
t0
where Π := Π(t, Kf , tf ), and the optimal control u∗ for the original problem as
u∗ (t) = v Kf (t) − B(t)T Π(t, Kf , tf )x(t) = −B(t)T Π(t, Kf , tf ) + WA−BB
−1
TΠ (t, tf ) x(t).
Finally, if L(t) is identically zero, we can pick K(t) identically zero and we recover the
previous result.
Exercise 2.16 Show that reachability of (2.1) on [t0 , tf ] implies invertibility of WA−BBT Π (t0 , tf )
and vice-versa.
We obtain the block diagram depicted in Figure 2.3.8 Thus u∗ (t) = B(t)T p(t), with
w0=0 + v0 + u0 + x
B(t) ∫
+
- -
A(t)
BT (t)Π(t,K1,t1)
BT(t)WA-BBTΠ (t,t1)-1
−1
p(t) = − Π(t, Kf , tf ) + WA−BB TΠ (t, tf ) x(t).
Remark 2.11 While vfK clearly depends on Kf , u∗ obviously cannot, since Kf is an arbitrary
symmetric matrix (subject to DRE having a solution with K(tf ) = Kf ). Thus we could have
assigned Kf = 0 throughout the analysis. Check the details of this.
The above is a valid closed-loop implementation as it does not involve the initial point
(x0 , t0 ) (indeed perturbations may have affected the trajectory between t0 and the current
time t). Π(t, Kf , tf ) can be precomputed (again, we must assume that such a solution exists.)
Also note that the optimal cost J(u∗ ) is given by (when xf = 0n )
˜ ∗ ) − 1 xf T Kf , xf − xT Π(t0 , Kf , tf )x0
J(u∗ ) = J(u 0
2
1 T −1
= x0 WA−BBT Π (t0 , tf )x0 + xT0 Π(t0 , Kf , tf )x0
2
and is independent of Kf .
Finally, for all optimal control problems considered so far, the optimal control can be
expressed in terms of the adjoint variable (or co-state) p(·). More precisely, the following
holds.
8
If xf 6= 0n , then, on Figure 2.3, either replace w0 = 0 with
−1
w0 (t) = B T (t)WA−BB T Π (t, tf )ΦA−BB T Π (t, tf )xf ,
or equivalently insert a summing junction immediately to the right of the bottom feedback block, adding
−ΦA−BB T Π (t, tf )xf as exogenous input.
Exercise 2.17 Consider the fixed terminal state problem with xf = 0n . Suppose that the
controllability Gramian W (t0 , tf ) is non-singular and that the relevant Riccati equation has
a (unique) solution Π(t, Kf , tf ) on [t0 , tf ] with K(tf ) = Kf . Let x(t) be the optimal trajectory
and define p(t) by
−1
p(t) = − Π(t, Kf , tf ) + WA−BB T Π(t,K ,t )
f f
(t, tf ) x(t)
u∗ (t) = B T (t)p(t).
Prove that
ẋ(t) A(t) B(t)B T (t) x(t)
=
ṗ(t) L(t) −AT (t) p(t)
Exercise 2.18 Verify that a minor modification of Theorem 2.3 holds in the present case of
fixed terminal state, the only difference being that p∗ (tf ) is now free (which “compensates”
for x∗ (tf ) being known).
for some functions ϕ and ψ. Show that if an optimal control exists in U, its value u∗ (t) must
be in the range space of B T for all t. (Assume that B does not vary with time.)
where A(·), B(·) are assumed to be continuous, and a (a.e. continuously differentiable)
solution x is sought. The “a.e” (almost every) and continuity (of x) specifications are needed
here because we will allow for discontinuous controls u.
which amounts to specifying that x must be the integral of its almost-everywhere derivative.
Functions that have this property are termed absolutely continuous. Absolutely continuous
functions are a superset of continuously differentiable functions and a subset of almost ev-
erywhere differentiable functions. Further, if u ∈ PC (see Definition 2.1 below) and x is
continuous and satisfies (2.41) everywhere in [t0 , tf ] except possibly at (finitely many) points
t at which u is discontinuous, then it must be the integral of the right-handside, hence it is
absolutely continuous. Hence, for those x that satisfy (2.41) with u ∈ PC, continuity implies
absolute continuity.
From this point on, we will typically merely assume that the the control function u belongs
to the set PC of piecewise continuous functions, in the sense of the following definition.9
Throughout, given an initial time t0 and a terminal time tf , the set U of admissible controls
is defined by
U := {u : [t0 , tf ] → Rm , u ∈ PC, u(t) ∈ U ∀t ∈ [t0 , tf ]}, (2.42)
where U ⊆ Rm is to be specified. The reason for not requiring that admissible controls be
continuous is that, in many important cases, when U is not all of Rm , optimal controls are
“naturally” discontinuous, i.e., the problem has no solution if minimization is carried out
over the set of continuous function.11
Example 2.3 Consider the problem of bringing a point mass from rest at some point P to
rest at some point Q in the least amount of time, subject to upper and lower bounds on
9
Everything in these notes remains valid, with occasionally some minor changes, if the continuity assump-
tion on A and B is relaxed to piecewise continuity as well.
10
Many authors do not insist on right-continuity in the definition of piecewise continuity. The reason we
do is that with such requirement Pontryagin’s Maximum Principle holds for all t rather than for almost
all t, and that moreover the optimal control will be unique, which is not the case without such assumption.
Indeed, note that without right- (or left-) continuity requirement, changing the value of an optimal control
at, say, a single time point does not affect optimality.
11
This is related to the fact that the space of continuous functions is not “complete” under, say, the L1
norm. See more on this in Appendix A.
the acceleration—equivalently on the force applied. (For example a car is stopped at a red
light and the driver wants to get as early as possible to a state of rest at the next light.)
Clearly, the best strategy is to use maximum acceleration up to some point, then switch
instantaneously to maximum deceleration. This is an instance of a “bang-bang” control. If
we insist that the acceleration must be a continuous function of time, the problem has no
solution.
Given the constraint on the values of u (set U), contrary to the previous section, a linear
cost function can now be meaningful. Accordingly, we start with the following problem.
Let c ∈ Rn , c 6= 0, x0 ∈ Rn and let tf ≥ t0 be a fixed time. Find a control u∗ ∈ U so as to
minimize cT x(tf ) s.t.
dynamics ẋ(t) = A(t)x(t) + B(t)u(t) a.e. t ∈ [t0 , tf ],
initial condition x(t0 ) = x0
final condition x(tf ) ∈ Rn (no constraints)
control constraint u ∈ U
x absolutely continuous
Exercise 2.20 The state transition matrix Ψ(t, τ ) of the adjoint system is given by
Ψ(t, τ ) = Φ(τ, t)T .
Also, if ẋ = Ax, then x(t)T p(t) is constant.
d
Exercise 2.21 Prove that Φ (t , t)
dt A 0
= −ΦA (t0 , t)A(t).
Notation: For any u ∈ PC, z ∈ Rn and t0 ≤ t1 ≤ t2 ≤ tf , let φ(t2 , t1 , z, u) denote the state
at time t2 given that at time t1 the state is z, and control u is applied, i.e., let
Z t2
φ(t2 , t1 , z, u) = Φ(t2 , t1 )z + Φ(t2 , τ )B(τ )u(τ )dτ.
t1
Also let
K(t2 , t1 , z) = {φ(t2 , t1 , z, u) : u ∈ U}.
This set is called reachable set at time t2 .
12
Note that for the present problem, L = 0 (no integral cost), and this equation is a special case of (2.19).
or, equivalently, Z tf
(Φ(tf , τ )T c)T B(τ )(u∗ (τ ) − u(τ ))dτ ≤ 0.
t0
As pointed out above, for p∗ (t) as defined,
p∗ (t) = Φ(tf , t)T p∗ (tf ) = −Φ(tf , t)T c
So that u∗ is optimal if and only if and only if, for all u ∈ U,
Z tf
p∗ (τ )T B(τ )(u∗ (τ ) − u(τ ))dτ ≥ 0
t0
and the ‘if’ direction of the theorem follows immediately. Suppose now u∗ ∈ U is optimal.
We show that (2.44) is satisfied ∀t ∈ [t0 , tf ). Indeed, if this is not the case, ∃t∗ ∈ [t0 , tf ),
v ∈ U s.t.
p∗ (t∗ )T B(t∗ )u∗ (t∗ ) < p∗ (t∗ )T B(t∗ )v.
By right-continuity of u∗ (and of p∗ and B), there exists δ > 0 such that this inequality holds
for all t ∈ [t∗ , t∗ + δ]. Define ũ ∈ U by (“needle” perturbation)
v
t∗ ≤ t < t∗ + δ
ũ(t) =
∗
u (t) otherwise
Then Z tf Z tf
∗ T ∗
p (t) B(t)u (t)dt < p∗ (t)T B(t)ũ(t)dt
t0 t0
∗
which contradicts optimality of u .
Because the problem under consideration has no integral cost, the pre-Hamiltonian H defined
in section 2.1.1 reduces to
H(τ, ξ, η, υ) = η T (A(τ )ξ + B(τ )υ)
and the Hamiltonian H by
H(τ, ξ, η) = sup{H(τ, ξ, η, v) : v ∈ U}.
Since pT A(t)x does not involve the variable u, condition (2.44) can be written as
H(t, x∗ (t), p∗ (t), u∗ (t)) = H(t, x∗ (t), p∗ (t)) ∀t (2.46)
This is another instance of Pontryagin’s Principle. The previous theorem states that, for
linear systems with linear objective functions, Pontryagin’s Principle provides a necessary
and sufficient condition of optimality.
Remark 2.13
1. Let ψ : Rn → R be the “terminal cost” function, defined by ψ(x) = cT x. Then
p∗ (tf ) = −∇ψ(x∗ (tf )), just like in the case of the problem of section 2.1.
2. Linearity in u was not used. Thus the result (and proof) apply to systems with
dynamics of the form
ẋ(t) = A(t)x(t) + B(t, u(t))
where B(·, ·) is, say, a continuous function.
Exercise 2.23 Compute the optimal control u∗ for the following time-invariant data: t0 = 0,
tf = 1, A = diag(1, 2), B = [1; 1], c = [−2; 1], U = [−1, 1]. Note that u∗ is not continuous!
(Indeed, this is an instance of a “bang-bang” control.)
Fact. Let A and B be constant matrices, and suppose there exists an optimal control
∆
u∗ , with corresponding trajectory x∗ . Then m(t) = H(t, x∗ (t), p∗ (t)) is constant (i.e., the
Hamiltonian is constant along the optimal trajectory).
Exercise 2.24 Prove the fact under the assumption that U = [α, β]. (The general case will
be considered in Chapter 6.)
Exercise 2.25 Suppose U = [α, β], so that B(t) is an n × 1 matrix. Suppose that A(t) = A
and B(t) = B are constant matrices and A has n distinct real eigenvalues. Show that
there is an optimal control u∗ and t0 = τ0 ≤ τ1 < · · · ≤ τn = tf (n = dimension of x)
such that u∗ (t) = α or β on [τi , τi+1 ), 0 ≤ i ≤ n − 1. [Hint: first show that p∗ (t)T B =
γ1 exp(δ1 t) + · · · + γn exp(δn t) for some δi , γi ∈ R. Then use appropriate induction.]
(iii) more general constraints on the initial and terminal state, e.g., g(x(tf )) ≤ 0.
To tackle such more general optimization problems, we will make use of additional mathe-
matical machinery. We first proceed to develop such machinery.
Dynamic Programming
N
X −1
minimizeu∈RNm J(u) := L(i, xi , ui ) + ψ(xN )
i=0
s.t. xi+1 = f (i, xi , ui ), i = 0, . . . , N − 1, x0 fixed
ui ∈ U, i = 0, . . . , N − 1, (P )
xi ∈ X, i = 1, . . . , N,
The key idea is to embed problem (P ) into a family of problems, with all possible initial
times k < N − 1, and initial conditions ξ ∈ X
N
X −1
minimizeu∈RNm Jk (u) := L(i, xi , ui ) + ψ(xN )
i=k
s.t. xi+1 = f (i, xi , ui ), i = k, . . . , N − 1, xk = ξ,
ui ∈ U, i = k, k + 1, . . . , N − 1, (Pk,ξ )
xi ∈ X, i = k + 1, . . . , N.
Lemma 3.1 (Bellman’s Principle of Optimality) Suppose u∗k , . . . , u∗N −1 is optimal for (Pk,ξ )
with associated state trajectory x∗k = ξ, x∗k+1 , . . . , x∗N . Then, if ℓ ∈ {k, . . . , N − 1},
{u∗ℓ , u∗ℓ+1, . . . , u∗N −1 } is optimal for (Pℓ,x∗ℓ ).
Proof. Suppose not. Then there exists û := (ûℓ , . . . , ûN −1 ), with corresponding trajectory
x̂ℓ , x̂ℓ+1 , . . . , x̂N , with x̂ℓ = x∗ℓ , such that
N
X −1 N
X −1
L(i, x̂i , ûi ) + ψ(x̂N ) < L(i, x∗i , u∗i ) + ψ(x∗N ) (3.1)
i=ℓ i=ℓ
x̃i = x∗i i = k, . . . , ℓ
x̂i i = ℓ + 1, . . . , N
where (3.1) was invoked. Hence ũ yields a lower cost than u∗i , a contradiction.
Let V be again the optimal value function, i.e., for ξ ∈ X, V (N, ξ) = ξ, and for k ∈
{0, . . . , N − 1},
V (k, ξ) = inf Jk (u)
ui ∈U ∀i
and v ∈ U is a minimizer for (3.3) if and only if there exists (uk+1, . . . , uN −1) such that
(v, uk+1, . . . , uN −1) is optimal for (Pk,ξ ).
Proof. Let
F (k, ξ, v) := L(k, ξ, v) + V (k + 1, f (k, ξ, v)).
Let u∗i , i = k, . . . , N − 1 be optimal for (Pk,ξ ), with x∗i , i = k + 1, . . . , N the corresponding
state trajectory. Further, let ûk := v ∈ U, with f (k, ξ, v) ∈ X, be such that no control
sequence of the form (v, uk+1, . . . , uN −1 ) is optimal for (Pk,ξ ), let (ûk+1 , . . . , ûN −1) be optimal
for (Pk,f (k,ξ,v)), and let x̂i , i = k+1, . . . , N be the state trajectory generated by (ûk , . . . , ûN −1 ).
We show that V (k, ξ) = F (k, ξ, u∗k ) < F (k, ξ, v), proving both claims.
Indeed,
N
X −1
V (k, ξ) = L(k, ξ, u∗k )+ L(i, x∗i , u∗i )+ψ(x∗N ) = L(k, ξ, u∗k )+V (k+1, f (k, ξ, u∗k )) = F (k, ξ, u∗k )
i=k+1
(3.4)
and
N
X −1
V (k, ξ) < L(k, ξ, v)+ L(i, x̂i , ûi )+ψ(x̂N ) = L(k, ξ, v)+V (k+1, f (k+1, ξ, v)) = F (k, ξ, v),
i=k+1
where in both instances the penultimate equality follows from the Principle of Optimality.
f0 (k, ξ, φ(k, ξ)) + V (k + 1, f (k, ξ, φ(k, ξ)) = min{L(k, ξ, v) + V (k + 1, f (k, ξ, v))}. (3.5)
v∈U
How can this result be used? First note that V (N, ξ) = ψ(ξ) for all ξ, then for k =
N − 1, N − 2, . . . , 0 (i.e., “backward in time”) solve (3.5) to obtain, for each ξ, ψ(k, ξ), then
V (k, ξ).
Remark 3.1
1. No regularity assumptions were made.
2. It must be stressed that, indeed, since for a given initial condition x(0) = x0 the
optimal trajectory is not known a priori, V (k, ξ) must be computed for all ξ at every
time k > 0 (or at least for ξ equal to every “possibly optimal” xk ). Practically, such
computation is to be carried out over a grid of values ξ ∈ X; with d values for each
coordinate of ξ, dn optimizations would have to be carried out at each step k, i.e., an
exponential number of such calculations in terms of the state dimension n.
Exercise 3.1 (From [?].) Apply dynamic programming to solve the discrete-time, free ter-
minal state linear quadratic regulator problem, with cost function
N
X −1
xTi Li xi + uTi ui + xTN QxN ,
i=k
(i) for each t ∈ [t0 , tf ], f (t, ·, ·) and f0 (t, ·, ·) are continuously differentiable on Rn × Rm ,
and ψ is continuously differentiable.
subject to
·
x (t) = f (t, x(t), u(t)) a.e. t ∈ [τ, tf ], x absolutely continuous
x(τ ) = ξ
and let x̃ be the corresponding state trajectory, with x̃(τ ) = ξ. Next, motivated by (3.6),
define ϕv : [0, tf − τ ) → R by
Z τ +∆
ϕv (∆) := V (τ + ∆, x̃(τ + ∆)) − V (τ, ξ) + f0 (t, x̃(t), ũ(t))dt.
τ
ϕv (∆) ≥ 0 ∀∆ ∈ [0, tf − τ ].
We summarize the above in a formal statement, with “min” replaced with “inf”; such a
statement holds regardless of whether or not an optimal control exists.
Theorem 3.2 Suppose that the value function V is continuously differentiable. Then, for
all τ ∈ [t0 , tf ], ξ ∈ Rn ,
D1 V (τ, ξ) + inf v∈U {f0 (τ, ξ, v) + D2 V (τ, ξ)f (τ, ξ, v)} = 0
(HJB)
V (tf , ξ) = ψ(ξ)
This partial differential equation for V (·, ·) is known as the Hamilton–Jacobi–Bellman equa-
tion (W.R. Hamilton, Irish mathematician, 1805–1865; K.G.J. Jacobi, German mathemati-
cian, 1804–1851; R.E. Bellman, American mathematician, 1920–1984). Note that minimiza-
tion is now over (a subset of) Rm rather than over (a subset of) the function space U.
Now, for all τ, ξ, η, v, define H : R × Rn × Rn × Rm → R and H : R × Rn × Rn → R by
H(τ, ξ, η, v) = −f0 (τ, ξ, v) + η T f (τ, ξ, v) (3.9)
and
H(τ, ξ, η) = sup H(τ, ξ, η, v).
v∈U
We now show that (HJB) is also a sufficient condition of optimality, i.e., that if V (·, ·)
satisfies (HJB), it must be the value function. (In discrete time this was obvious since the
solution to (3.3) was clearly unique, given the final condition V (N, ξ) = ψ(ξ).) Furthermore,
obtaining V by solving (HJB) yields an optimal control in feedback form.
Theorem 3.3 (Sufficient condition of optimality) Suppose there exists V (·, ·), continuously
differentiable, satisfying (HJB) together with the boundary condition. Further suppose that
the ‘inf ’ in (HJB) is attained for all (τ, ξ) (i.e., inf=min) and that there exists φ(·, ·), with
values in U, piecewise continuous in the first argument and Lipschitz in the second argument,
such that φ(τ, ξ) is a minimizer for all τ, ξ, so that V satisfies
D1 V (τ, ξ) + D2 V (τ, ξ)f (τ, ξ, φ(τ, ξ)) + f0 (τ, ξ, φ(τ, ξ)) = 0 ∀τ, ξ. (3.10)
Then φ is an optimal feedback law, i.e., the control law u(t) := φ(t, x(t)) generates an
optimal control û, and V is the value function. Further, together with the associated optimal
trajectory x̂, û satisfies
D1 V (t, x̂(t)) + D2 V (t, x̂(t))f (t, x, û(t)) + f0 (t, x̂(t), û(t)) = 0 ∀t. (3.11)
Proof. (Idea: Carefully integrate back what we differentiated.) Let τ < tf and ξ ∈ Rn be
arbitrary.
1. Let u ∈ U, yielding x(·) with x(τ ) = ξ (initial condition), i.e.,
·
x (t) = f (t, x̃(t), ũ(t)) a.e. t ∈ [τ, tf ], x absolutely continuous
x(t) = ξ
−D1 V (t, x(t)) ≤ f0 (t, x(t), u(t)) + D2 V (t, x(t))f (t, x(t), u(t)) ∀t ∈ [τ, tf ),
Since V is continuously differentiable and x absolutely continuous, and since V (tf , x(tf )) =
ψ(x(tf )), integration of both sides from τ to tf yields
Z tf
ψ(x(tf )) − V (τ, ξ) + f0 (t, x(t), u(t))dt ≥ 0,
τ
i.e., Z tf
V (τ, ξ) ≤ f0 (t, x(t), u(t))dt + ψ(x(tf )) (= Jτ (u)). (3.12)
τ
Since u ∈ U is arbitrary, this implies that
V (τ, ξ) ≤ Jτ (u) ∀u ∈ U.
2. To show that V is the value function and that φ is an optimal feedback law indeed, it
now suffices to show that the control signal produced by φ achieves equality in (3.12). Thus
let x∗ (·) be the unique (due to the assumptions on φ) absolutely continuous function that
satisfies
and let
u∗ (t) = φ(t, x∗ (t)).
Then, proceeding as above and using (3.10), we get
Z tf
V (t, ξ) = f0 (τ, x∗ (τ ), u∗ (τ ))dτ + ψ(x∗ (tf )),
t
showing optimality of control law φ and, by the same token, of any control signal that
satisfies (3.11), and showing that V is indeed the value function. (We leave out the proof
that, given the regularity assumptions on the data, φ satisfies the regularity conditions in
the statement of the theorem.)
Remark 3.2 (HJB) is a partial differential equation. Thus, just like that of discrete-time
dynamic programming, its solution is prohibitively CPU-demanding when n is large (curse
of dimensionality).
Exercise 3.2 Solve the free end-point linear quadratic regulator problem using HJB (see
Example 6.3). Is V (t, x) always well-defined for all t ∈ [t0 , tf ) and x ∈ Rn ?
Theorem 3.4 Let u∗ ∈ U be an optimal control for (Pt0 ,x0 ), and x∗ be the corresponding
state trajectory. Suppose the value function V is twice continuously differentiable. Then
Pontryagin’s Principle holds, with
It remains to show that ṗ∗ (t) = −∇2 H(t, x∗ (t), p∗ (t), u∗ (t)). Since V satisfies (HJB), we
have, for all (τ, ξ) and for all υ ∈ U,
and
D2 G(t, x∗ (t), u∗ (t)) = 0 ∀t. (3.15)
Now, since V is twice differentiable, we have for all (τ, ξ, η, υ) since D1 ∇2 = ∇2 D1 ,
Exercise 3.3 Consider the optimal control problem, with scalar x and u,
where u ∈ PC and x is absolutely continuous. Obtain (by “inspection”) the value function
V (t, x), for t ∈ [0, 1], x ∈ R. Verify that it is not everywhere differentiable with respect to
x (hence is not a solution to (HJB)). [A fortiori, V is not twice continuously differentiable,
and the derivation of Pontryagin’s Principle given in Theorem 3.4 is not valid. The Principle
itself does hold though, as we’ll see down the road. This situation is typical in problems with
nonlinear (in (x, u)) dynamics that is linear in u for fixed x, and with simple bounds on u,
and terminal cost; such problems are common place in engineering applications.]
Unconstrained Optimization
Exercise 4.1 Suppose Ω ⊂ V is open. Prove carefully, using the definitions given earlier,
that x̂ is a local minimizer for (4.2) if and only if x̂ is a local minimizer for (4.1) and x̂ ∈ Ω.
Further, prove that the “if ” direction is true for general (not necessarily open) Ω, and show
by exhibiting a simple counterexample that the “only if ” direction is not.
Now suppose f is (Fréchet) differentiable (see Appendix B). (In fact, many of the results
we obtain below hold under milder assumptions.) We next obtain a first order necessary
condition for optimality.
Theorem 4.1 Let f be differentiable. Suppose x̂ is a local minimizer for (4.1). Then
Df (x̂) = 0B(V,R) .
Proof. Since x̂ is a local minimizer for (4.1), there exists ǫ > 0 such that
Remark 4.2 The same optimality condition can be established (with essentially the same
proof) under less restrictive assumptions, specifically mere G-differentiability of f at x̂ (which
does not require a norm on V ) and mere “weak” local optimality of x̂: For every h ∈ V ,
there exists ǫh > 0 such that f (x̂) ≤ f (x̂ + th) for all t ≤ ǫh .
o(h) o(td)
Exercise 4.2 If o(·) is such that ||h||
→ 0 as h → 0V then, for any fixed d 6= 0V , t
→0
as t → 0 t ∈ R.
Remark 4.3 The optimality condition above, like several other conditions derived in this
course, is only a necessary condition, i.e., a point x satisfying this condition need not be
optimal, even locally. However, if there is an optimal x, it has to be among those which satisfy
the optimality condition. Also it is clear that this optimality condition is also necessary for
a global minimizer (since a global minimizer is also a local minimizer). Hence, if a global
minimizer is known to exist, it must be, among the points satisfying the optimality condition,
the one with minimum value of f .
Suppose now that we want to find a minimizer. Solving Df (x̂) = 0B (V, R) for x (n
nonlinear equations in n unknown, when V = Rn ) is usually hard and could well yield
maximizers or other stationary points instead of minimizers. A central idea is, given an
“initial guess” x̃, to determine a “descent”, i.e., a direction in which, starting from x̃, f
decreases (at least for small enough displacement). Thus suppose Df (x̃) 6= 0B (V, R) (hence
x̃ is not a local minimizer). If h is such that Df (x̃)h < 0 (such h exists; why?) then, for
t > 0 small enough, we have
o(th)
f (x̃ + th) − f (x̃) = t Df (x̃)h + <0
t
Such h is called a descent direction for f at x̃. The concept of descent direction is essential
to numerical methods.
Exercise 4.3 Let V be a Hilbert space, with inner product h·, ·iV and associated gradient
gradV . Let f : V → R be differentiable at x ∈ V , with gradient gradV f (x) 6= 0V , and let
dˆ := − kgrad
gradV f (x)
f (x)k
. (i) Show that
V
ˆ
argmin {Df (x)d : hd, diV = 1} = {d}.
(Hint: Use the Cauchy-Bunyakovskii-Schwartz inequality.) (ii) Show that, given any d˜ =
6 dˆ
˜ di
with hd, ˜ = 1, there exists t̄ > 0 such that
ˆ < f (x + td)
f (x + td) ˜ ∀t ∈ (0, t̄].
Exercise 4.4 Under the same assumptions as in Exercise 4.3, show that ĥ = −gradf (x) is
also the unique solution of
1
min f (x) + Df (x)h + hh, hi,
h 2
i.e., the only minimizer of the second order expansion of f about x when the Hessian is
identity.
In view of the above, a natural algorithm for attempting to solve (4.1) would be the following.
Algorithm SD (steepest descent with exact line search)
Data x0 ∈ H
i := 0
while gradf (xi ) 6= 0V do {
pick ti ∈ arg min{f (xi − tgradf (xi )) : t ≥ 0} (if there is no such minimizer
t
the algorithm fails)
xi+1 := xi − ti gradf (xi )
i := i + 1
}
stop
Notation: Given a real-valued function φ, the (possibly empty) set of global minimizers for
the problem
is denoted by
arg min{φ(x) : x ∈ S}.
x
In the algorithm above, like in other algorithms we will study in this course, each iteration
consists of essentially 2 operations:
• a search along that search direction, which amounts to solving, often approximately, a
minimization problem in only one variable, t. The function φ(t) = f (x + th) can be
viewed as the one-dimensional section of f at x in direction h. This second operation
is often also called “step-size computation” or “line search”.
Before analyzing the algorithm above, we point out a practical difficulty. Computation of
ti involves an exact minimization which cannot in general be performed exactly in finite
time (it requires construction of an infinite sequence). Hence, point xf will never be actually
constructed and convergence of the sequence {xi } cannot be observed. One says that the
algorithm is not implementable, but merely conceptual. An implementable algorithm for
solving (4.1) will be examined later.
i=0
while xi 6∈ ∆ do {
xi+1 = a(xi )
i=i+1
}
stop
Theorem 4.2 Suppose
(i) a(·) is continuous in ∆c (∆c is the complement of ∆)
(ii) There exists v : ∆c → V such that v(a(x)) < v(x) ∀x ∈ ∆c
Then, if the sequence {xi } constructed by Algorithm model 1 is infinite, every accumulation
point of {xi } is desirable (i.e., belongs to ∆).
Exercise 4.6 Give an example (i.e., exhibit a(·), v(·) and ∆) showing that condition (ii),
in Theorem 4.2, cannot be dropped.
Remark 4.4
1. Note that Algorithm Model 1 does not imply any type of “optimization” idea. The
result of Theorem 4.2 will hold if one can show the existence of a function v(·) that,
together with a(·), would satisfy conditions (i) to (iii). This idea is related to that of
a Lyapunov function for the “discrete-time system” xi+1 = a(xi ) (but assumptions on
v are weaker, and the resulting sequence may be unbounded).
2. The result of Theorem 4.2 is stronger than it may appear at first glance.
(i) if {xi } is bounded (e.g., if all level sets of f are bounded) and V is finite-
dimensional, accumulation points do exist.
(ii) if accumulation point(s) exist(s) (which implies that ∆ is nonempty), and if ∆ is
a finite set (which is often the case), there are simple techniques that can force
the entire sequence to converge to one of these accumulation points. For example,
if ∆ is the set of stationary points of v, one might restrict the step kxi+1 − xi k to
never be larger than some constant multiple of k∇v(xi )k (step-size limitation).
Exercise 4.7 Consider Algorithm SD (steepest descent) with H = Rn and define, for any
x ∈ Rn
t(x) = arg min{f (x − t∇f (x)) : t ≥ 0}
t
where we assume that t(x) is uniquely defined (unique global minimizer) for every x ∈ Rn .
Also suppose that t(·) is locally bounded, i.e., for any bounded set K, there exists M > 0
s.t. |t(x)| < M for all x ∈ K. Show that the hypotheses of Theorem 4.2 are satisfied with
∆ = {x ∈ Rn : Df (x) = 0} and v = f . [Hint: the key point is to show that a(·) is continuous,
i.e., that t(·) is continuous. This does hold because, since f is continuously differentiable,
the curve below (Figure 4.1) does not change too much in a neighborhood of x.]
0 λ(x) λ
•
f(x-λ∇f(x))-f(x)
Remark 4.5 We just proved that Algorithm SD yields accumulation points x̂ (if any) such
that Df (x̂) = 0. There is no guarantee, however, that x̂ is even a local minimizer (e.g., take
the case where x0 is a local maximizer). Nevertheless, this will very likely be the case, since
the cost function decreases at each iteration (and thus, local minimizers are the only ‘stable’
points.)
In many cases t(x) will not be uniquely defined for all x and, when it is, a(·) may not be
continuous. (See, e.g., the “Armijo” line search discussed below.) Also, the iteration map
may have memory, i.e., may not be a function of x alone. This issue is addressed in Algorithm
Model 2 below, which is based on a point-to-set iteration map
A : V → 2V
(i) compound algorithms can be readily analyzed (two or more algorithms are intertwined)
(ii) this can include algorithms for which the iteration depends on some past information
(i.e., conjugate gradient methods)
(iii) algorithms not satisfying the conditions of the previous theorem (e.g., a not continuous)
may satisfy the conditions of the theorem below.
The algorithm above, with the convergence theorem below, will allow us to analyze an
implementable algorithm. The following theorem is due to Polak [?].
Then, if the sequence {xi } constructed by Algorithm model 2 is infinite, every accumulation
point of {xi } is desirable (i.e., belongs to ∆).
Remark 4.6 (4.8) indicates a uniform decrease in the neighborhood of any non-desirable
point. Note that a similar property was implied by (ii) and (iii) in Theorem 4.2.
K
Lemma 4.1 Let {ti } ⊂ R be a monotonically decreasing sequence such that ti → t∗ for
some K ⊂ IN, t∗ ∈ R. Then ti ց t∗ .
K
Now let ǫ, δ correspond to x̂ in assumption (ii). Since xi → x̂, there exists i0 such that
∀i ≥ i0 , i ∈ K, xi belongs to B(x̂, ǫ). Hence, ∀i ≥ i0 , i ∈ K,
and, in particular
Exercise 4.9 Show that Algorithm SD (steepest descent) with H = Rn satisfies the as-
K
sumptions of Theorem 4.3. Hence xi → x̂ implies Df (x̂) = 0B (V, R) (assuming that
argmint {f (xi − t∇f (xi ))} is always nonempty).
In the following algorithm, a line search due to Armijo (Larry Armijo, 20th century Amer-
ican mathematician) replaces the exact line search of Algorithm SD, making the algorithm
implementable. This line search imposes a decrease of f (xi ) at each iteration, which is com-
mon practice. Note however that such “monotone decrease” in itself is not sufficient for
inducing convergence to stationary points. Two ingredients in the Armijo line search insure
that “sufficient decrease” is achieved: (i) the back-tracking technique insures that, away
from stationary points, the step will not be vanishingly small, and (ii) the “Armijo line”
test insures that, whenever a reasonably large step is taken, a reasonably large decrease is
achieved.
We present this algorithm in a more general form, with a search direction hi (hi =
−gradf (xi ) corresponds to Armijo-gradient).
Algorithm 2 (Armijo step-size rule)
Parameters α, β ∈ (0, 1)
Data x0 ∈ V
i=0
while Df (xi ) 6= 0B (V, R) do {
compute an appropriate search direction hi
t=1
while f (xi + thi ) − f (xi ) > αtf ′ (xi ; hi ) do t := βt
xi+1 = xi + thi
i=i+1
}
stop
Hence the Armijo rule prescribes to choose the step-size ti as the least power of β (hence
the largest value, since β < 1) at which the curve φ(t) is below the straight line αtφ′i (0), as
shown on the Figure 4.2. In the case of the figure k = 2 will be chosen. We see that this
step-size will be well defined as long as
f ′ (xi ; hi ) < 0
which insures that the straight lines on the picture are downward. Let us state and prove
this precisely.
f ′ (xi ; hi ) < 0
Then there exists an integer k such that t = β k satisfies the line search criterion.
Proof
Since φ′i (0) = f ′ (xi ; hi ) < 0, the expression within braces is negative for t > 0 small enough,
thus φi (t) < tαφ′i (0) for t > 0 small enough.
We will now apply Theorem 4.3 to prove convergence of Algorithm 2. We just have to
show that condition (ii) holds (using v ≡ f , (i) holds by assumption). For simplicity, we let
V = Rn .
THE NEXT THEOREM TO BE SIMPLIFIED AND BE STATED
AND PROVED FOR THE SPECIAL CASE OF hi BEING THE
NEGATIVE GRADIENT DIRECTION, WITH A REMARK MEN-
TIONING THE GENERALIZATION.
Theorem 4.4 Let H(x) denote the set of search directions that could possibly be constructed
by Algorithm 2 when x is the current iterate. (In the case of steepest descent, H(x) =
{−gradf (x)}.) Suppose that H(x) is bounded away from zero near non-stationary points,
i.e., for any x̂ such that Df (x̂) 6= 0, there exists ǫ > 0 such that
β2 β1 1=β0 λ
0•
•
φ i(λ)=f(xi+λh i)-f(xi)
αλφ′i (0)=αλ〈∇f(xi),hi〉
λφ′i (0)=λ〈∇f(x i),hi〉
Further suppose that for any x̂ for which Df (x̂) 6= 0 there exist positive numbers ǫ and ρ
such that, ∀x ∈ B(x̂, ǫ), ∀h ∈ H(x), it holds
Thus
Z 1
f (x + th) − f (x) − αth∇f (x), hi = t h∇f (x + σth) − ∇f (x), hidσ
0
+ t(1 − α)h∇f (x), hi (4.14)
≤ t( sup |h∇f (x + σth) − ∇f (x), hi| + (1 − α)h∇f (x), hi) ∀t ≥ 0
σ∈[0,1]
Suppose now that x̂ is such that ∇f (x̂) 6= 0 and let ǫ, ρ and C satisfy the hypotheses of the
theorem. Substituting (4.13) into (4.14) yields (since α ∈ (0, 1) and t ≥ 0), using Schwartz
inequality,
f (x + th) − f (x) − αth∇f (x), hi ≤ t||h||( sup ||∇f (x + σth) − ∇f (x)|| − (1 − α)ρ||∇f (x)||)
σ∈[0,1]
Assume now that h(x) = −∇f (x) [the proof for the general case is left as a (not entirely
trivial) exercise.] First let us pick ǫ′ ∈ (0, ǫ] s.t., for some η > 0, (using continuity of ∇f )
Thus,
ǭ
||∇f (x − σt∇f (x)) − ∇f (x)|| < η ∀σ ∈ [0, 1], t ∈ [0, ], x ∈ B̄(x̂, ǫ′ )
C
which implies
ǭ
with t̄ = C
> 0. Thus (4.15) yields
f (x − t∇f (x)) − f (x) + αt||∇f (x)||2 < 0 ∀t ∈ (0, t̄], x ∈ B̄(x̂, ǫ′ ) (4.16)
(since β k̃ will then always satisfy inequality (4.16). The iteration map A(x) (singleton valued
in this case) is
A(x) = {x − β k(x) ∇f (x)}.
and, from the line search criterion, using (4.17) and (4.18)
η2
≤ −αβ k ∀x ∈ B̄(x̂, ǫ′ )
∗
(1 − α)2 ρ2
η2
δ = αβ k
∗
> 0.
(1 − α)2 ρ2
K
Hence xi → x∗ implies x∗ ∈ ∆, i.e., ∇f (x∗ ) = 0.
Remark 4.7 Condition (4.13) expresses that the angle between h and (−gradf (x)), (in the
2D plane spanned by these two vectors) is uniformly bounded by cos−1 (ρ) (note that ρ > 1
cannot possibly satisfy (4.13) except if both sides are = 0). In other words, this angle is
uniformly bounded away from 90◦ . This angle just being less than 90◦ for all x, insuring that
h(x) is always a descent direction, is indeed not enough. Condition (4.12) prevents h(x)
from collapsing (resulting in a very small step ||xk+1 − xk ||) except near a desirable point.
Exercise 4.10 Prove that Theorem 4.4 is still true if the Armijo search is replaced by an
exact search (as in Algorithm SD).
Remark 4.8
2. The best values for α and β in Armijo step-size are not obvious a priori. More about
all this can be found in [?, ?].
3. Many other step-size rules can be used, such as golden section search, quadratic or cubic
interpolation, Goldstein step-size. With some line searches, a stronger convergence
result than that obtained above can be proved, under the additional assumption that f
is bounded from below (note that, without such assumption, the optimization problem
would not be well defined): Irrespective of whether or not {xk } has accumulation
points, the sequence of gradients {∇f (xk )} always converges to zero. See, e.g., [?,
section 3.2].
Note on the assumption xi → x∗ . The convergence results given earlier assert that,
under some assumptions, every accumulation point of the sequence generated by a suitable
algorithm (e.g., Armijo gradient) satisfies the first order necessary condition of optimality.
A much “nicer” result would be that the entire sequence converges. The following exercises
address this question.
The assumption in Exercise 4.12 is often satisfied. In particular, any local minimum satisfying
the 2nd order sufficient condition of optimality is isolated (why?). Finally if xi+1 = xi −
tgradf (xi ) and |t| ≤ 1 (e.g., Armijo-gradient) then kxi+1 − xi k ≤ kgradf (xi )k which goes to
0 on sub-sequences converging to a stationary point; for other algorithms, suitable step-size
limitation schemes will yield the same result.
Theorem 4.5 (2nd order necessary condition) Suppose that f is twice differentiable and let
x̂ be a local minimizer for (4.19). Then ∇2 f (x̂) is positive semi-definite, i.e.
dT ∇2 f (x̂)(x̂)d ≥ 0 ∀d ∈ Rn
Proof. Let d ∈ Rn , kdk = 1, and let t > 0. Since x̂ is a local minimizer, ∇f (x̂) = 0. Second
order expansion of f around x̂ yields
t2 T 2 o2 (td)
0 ≤ f (x̂ + td) − f (x̂) = d ∇ f (x̂)d + (4.20)
2 t2
o2 (h)
with khk2
→ 0 as h → 0. The claim then follows by letting t → 0.
Theorem 4.6 (2nd order sufficiency condition) Suppose that f is twice differentiable, that
Df (x̂) = 0 and that ∇2 f (x̂) is positive definite. Then x̂ is a strict local minimizer for (4.19).
Proof. Let m > 0 be the smallest eigenvalue of ∇2 f (x̂). (It is positive indeed since V is
assumed finite-dimensional.) Then, since hT ∇2 f (x̂)h ≥ mkhk2 for all h,
2 m o2 (h)
f (x̂ + h) − f (x̂) ≥ khk + ∀h 6= 0V .
2 khk2
|o2 (h)| m
Let ǫ > 0 be such that khk2
< 2
for all khk < ǫ, h 6= 0V . Then
Alternatively, under the further assumption that the second derivative of f is continuous,
Theorem 4.6 can be proved by making use of (B.15), and using the fact that, due to the
assumed continuity of the second derivative, (D2 f (x̂ + th)h) h ≥ (m/2)khk2 for all h small
enough and t ∈ (0, 1).
Exercise 4.14 Show by a counterexample that the 2nd order sufficiency condition given
above is not valid when the space is infinite-dimensional. [Hint: Consider the space of
sequences in R with finitely nonzero entries (equivalently, the space of univariate polynomi-
als), with an appropriate norm.] Show that the condition remains sufficient in the infinite-
dimensional case if it is expressed as: there exists m > 0 such that, for all h,
D2 f (x̂)h h ≥ (m/2)khk2
Remark 4.9 Consider the following “proof” for Theorem 4.6. “Let d 6= 0. Then
hd, D2(x̂)di = δ > 0. Let h = td. Proceeding as in (1), (4.20) yields f (x̂+td)−f (x̂) > 0 ∀t ∈
(0, t̄] for some t̄ > 0, which shows that x̂ is a local minimizer.” This argument is in error.
Why? (Note that if this argument was correct, it would imply that the result also holds on
infinite-dimensional spaces. However, on such spaces, it is not sufficient that hd, D2 f (x̂)di
be positive for every nonzero d: it must be bounded away from zero for kdk = 1.)
Remark 4.10 Note that, in the proof of Theorem 4.6, it is not enough that o2 (h)/khk2 goes
to zero along straight lines. (Thus twice Gateaux differentiable is not enough.)
Exercise 4.15 Exhibit an example where f has a strict minimum at some x̂, with D2 f (x̂)
0 (as required by the 2nd order necessary condition), but such that there is no neighborhood
of x̂ where D2 f (x) is everywhere positive semi-definite. (Try x ∈ R2 ; while examples in R
do exist, they are contrived.) Simple examples exist where there is a neighborhood of x̂ where
the Hessian is nowhere positive semi-definite (except at x̂). [Hint: First ignore the strictness
requirement.]
Remark 4.11 Let V = Rn and suppose f is strongly convex. Then there is a global
minimizer (why?). By the previous theorem it is unique and Df vanishes at no other point.
Exercise 4.17 Suppose that f : Rn → R is strictly convex and has a minimizer x̂, and
suppose that the sequence {xi } is such that
(i) every accumulation point x̃ satisfies Df (x̃) = 0n ;
(ii) f (xi+1 ) ≤ f (xi ) for all i.
Then xi → x̂.
Exercise 4.18 Let f (x, y) = 21 (x2 + ay 2 ) where a > 0. Consider the steepest descent al-
gorithm with exact minimization. Given (xi , yi ) ∈ R2 , obtain formulas for xi+1 and yi+1 .
Using these formulas, give a qualitative discussion of the performance of the algorithm for
a = 1, a very large and a very small. Verify numerically using, e.g., MATLAB.
If the objective function is quadratic and x ∈ R2 , two function evaluations and two gradient
evaluations are enough to identify the function exactly (why?). Thus there ought to be a way
to reach the solution in two iterations. As most functions look quadratic locally, such method
should give good results in the general case. Clearly, such a method must have memory (to
remember previous function and gradient values). It turns out that a very simple idea gives
answers to these questions. The idea is that of conjugate direction.
Definition 4.1 Given a symmetric matrix Q, two vectors d1 and d2 are said to be Q-
orthogonal, or conjugate with respect to Q if dT1 Qd2 = 0
Fact. If Q is positive definite and d0 , . . . , dk are Q-orthogonal and are all nonzero, then
these vectors are linearly independent (and thus there can be no more than n such vectors).
Proof. See [?].
∇f (xk )T h = 0
i.e., since h ∈ span {h0 , . . . , hk−1 } if and only if −h ∈ span {h0 , . . . , hk−1 }, that
∇f (xk )T hi = 0 i = 0, . . . , k − 1.
This first term vanishes due to the induction hypothesis, the second due to Q-orthogonality
of the h′i s.
Corollary 4.1 xn minimizes f (x) = 21 xT Qx + bT x over Rn , i.e., the given iteration yields
the minimizer for any quadratic function in no more than n iterations.
(Qxk + b)T hk
tk = −
hTk Qhk
i.e., only the preceding direction hk has a nonzero coefficient. This is because, if (4.21) was
used to construct the previous iterations, then ∇f (xk+1 ) is already conjugate to h0 , . . . , hk−1 .
Indeed, first notice that hi is always a descent direction (unless ∇f (xi ) = 0), so that ti 6= 0.
Then, for i < k
T T 1
∇f (xk+1 ) Qhi = ∇f (xk+1 ) Q(xi+1 − xi )
ti
1
= ∇f (xk+1 )T (∇f (xi+1 ) − ∇f (xi ))
ti
1
= ∇f (xk+1 )T (βi hi − hi+1 + hi − βi−1 hi−1 ) = 0
ti
where we have used (4.21) for k = i + 1 and k = i, and the Expanding Subspace Theorem.
The coefficient βk is chosen so that hTk+1 Qhk = 0. One gets
∇f (xk+1 )T Qhk
βk = . (4.22)
hTk Qhk
definite Hessian matrix and the conjugate gradient algorithm should work very well in such
a neighborhood of the solution. However, (4.22) cannot be used for βk since Q is unknown
and since we do not want to compute the second derivative. Yet, for a quadratic function,
it can be shown that
||∇f (xk+1 ||2 (∇f (xk+1 ) − ∇f (xk ))T ∇f (xk+1 )
βk = = (4.23)
||∇f (xk )||2 ||∇f (xk )||2
The first expression yields the Fletcher-Reeves conjugate gradient method. The second one
gives the Polak-Ribière conjugate gradient method.
Exercise 4.19 Prove (4.23).
Algorithm 3 (conjugate gradient, Polak-Ribière version)
Data xo ∈ Rn
i=0
h0 = −∇f (x0 )
while ∇f (xi ) 6= 0 do {
ti ∈ arg min f (xi + thi ) (exact search)
t
xi+1 = xi + ti hi
hi+1 = −∇f (xi+1 ) + βi hi
i=i+1
}
stop
The Polak-Ribière formula uses
(∇f (xi+1 ) − ∇f (xi ))T ∇f (xi+1 )
βi = . (4.24)
||∇f (xi )||2
It has the following advantage over the Fletcher-Reeves formula: away from a solution there
is a possibility that the search direction obtained be not very good, yielding a small step
||xk+1 − xk ||. If such a difficulty occurs, ||∇f (xk+1) − ∇f (xk )|| will be small as well and P-R
will yield −∇f (xk+1 ) as next direction, thus “resetting” the method.
By inspection, one verifies that hi is a descent direction for f at xi , i.e., ∇f (xi )T hi < 0
whenever ∇f (xi ) 6= 0. The following stronger statement can be proved.
Fact. If f is twice continuously differentiable and strongly convex then ∃ρ > 0 such that
h∇f (xi ), hi i ≤ −ρ||∇f (xi )|| ||hi || ∀i
where {hi } and {xi } are as constructed by Algorithm 3 (in particular, this assumes an exact
line search).
As pointed out earlier one can show that the convergence theorem of Algorithm 2 still holds
in the case of an exact search (since an exact search results in a larger decrease).
Exercise 4.21 Show how the theorem just mentioned can be applied to Algorithm 3, by
specifying H(x).
Thus, all accumulation points are stationary and, since f is strongly convex, xi → x̂ the
unique global minimizer of f . An implementable version of Algorithm 3 can be found in [?].
If f is not convex, it is advisable to periodically reset the search direction (i.e., set hi =
−∇f (xi ) whenever i is a multiple of some number k; e.g., k = n to take advantage of the
quadratic termination property).
Definition 4.2 Suppose xi → x∗ . One says that {xi } converges to x∗ with a Q-order of
p(≥ 1) and a corresponding Q-factor = γ if there exists i0 such that, for all i ≥ i0
Exercise 4.22 Let xi → x∗ be such that ||xi+1 − x∗ || = γ ||xi − x∗ ||p for all i, with γ > 0,
p ≥ 1, and suppose that yi → y ∗ is such that
Q-linear convergence
If γ ∈ (0, 1) and p = 1, convergence is called Q-linear. This terminology comes from the fact
that, in that case, we have (assuming i0 = 0),
||xi − x∗ || ≤ γ i ||x0 − x∗ || ∀i
and, hence
log ||xi − x∗ || ≤ i log γ + log ||x0 − x∗ || ∀i
so that − log kxi − x∗ k (which, when positive, is roughly proportional to the number of exact
figures in xi ) is linear (more precisely, affine) in i.
||xi+1 −x∗ ||
If xi → x∗ Q-linearly with Q-factor= γ, clearly ||xi −x∗ ||
≤ γ for i larger enough. This
motivates the following definition.
||xi+1 − x∗ ||
→ 0 as i → ∞
||xi − x∗ ||
Exercise 4.23 Show, by a counterexample, that a sequence {xi } can converge Q-superlinearly,
without converging with any Q-order p > 1. (However, Q-order larger than 1 implies Q-
superlinear convergence.)
||xi − x∗ ||
lim =1
i→∞ ||xi+1 − xi ||
q-quadratic convergence is very fast: for large i, the number of exact figures is doubled at
each iteration.
Exercise 4.25 [?]. The Q-factor is norm-dependent (unlike the Q-order). Let
(
(.9)k 10 √ for k even
xi 1/ 2
(.9)k 1/√2 for k odd
p
and consider the norms x21 + x22 and max(|x1 |, |x2 |). Show that in both cases the sequence
converges with Q-order= 1, but that only in the 1st case convergence is Q-linear (γ > 1 in
the second case).
Definition 4.5 One says that xi → x∗ with an R-order equal to p ≥ 1 and an R-factor equal
to γ ∈ (0, 1) if there exists i0 such that, for all i ≥ i0
Equivalently there exists δ ′ > 0 and γ ′ ∈ (0, 1) such that, for all i,
Exercise 4.26 Show that, if xi → x∗ with Q-order= p ≥ 1 and Q-factor= γ ∈ (0, 1) then
xi → x∗ with R-order= p and R-factor= γ. Show that the converse is not true. Finally,
exhibit a sequence {xi } converging
(i) with Q-order p ≥ 1 which does not converge with any R-order= p′ > p, with any
R-factor
(ii) with Q-order p ≥ 1 and Q-factor γ, not converging with R-order p with any R-factor
γ ′ < γ.
Exercise 4.28 Show, by a counterexample, that a sequence {xi } can converge R-superlinearly
without converging with any R-order p > 1
Theorem 4.9 Suppose xi → x∗ , for some x∗ , where {xi } is constructed by the algorithm
above, and assume that (4.29) holds. Suppose that f is twice continuously differentiable and
that the second order sufficiency condition holds at x∗ (as discussed above, this is a mild
assumption). Let m, M, ǫ be positive numbers such that ∀x ∈ B(x∗ , ǫ), ∀y ∈ Rn
[Such numbers always exist. Why?]. Then xi → x∗ R-linearly (at least) with an R-factor of
(at most)
r
ρm 2
γ = 1−( ) (4.30)
M
Exercise 4.29 Show that if ρ < 1 convergence is not necessarily Q-linear (with Euclidean
norm).
Remark 4.14
2. without knowing anything else on hip , the fastest convergence is achieved with ρ = 1
m 2
(steepest descent), which yields γs = 1 − ( M ) . m and M are related to the smallest
and largest eigenvalues of D2 f (x∗ ) (why? how?). If m ≪ M, convergence may be very
slow again (see Figure 4.3) (also see [?]).
m∼M
m << M level curves
• x0
• •x1 • •x ∼ x*
• 1
•x •x0
2
Figure 4.3:
We will see below that if hi is cleverly chosen (e.g., conjugate gradient method) the rate of
convergence can be much faster.
If instead of using exact line search we use an Armijo line search, with parameters α, β ∈
(0, 1), convergence is still R-linear and the R-factor is now given by
r
ρm 2
γa = 1 − 4βα(1 − α)( ) (4.31)
M
Remark 4.15
2. Hence it appears that the rate of convergence does not by itself tell how fast the
problem is going to be solved (even asymptotically). The time needed to complete
one iteration has to be taken into account. In particular, for the rate of convergence
to have any significance at all, the work per iteration must be bounded. See exercise
below.
Exercise 4.30 Suppose xi → x∗ with xi 6= x∗ for all i. Show that for all p, γ there exists a
sub-sequence {xik } such that xik → x∗ with Q-order = p and Q-factor = γ.
Exercise 4.31 Consider two algorithms for the solution of some given problem. Algo-
rithms SD and 2 construct sequences {x1k } and {x2k }, respectively, both of which converge
to x∗ . Suppose x10 = x20 ∈ B(x∗ , 1) (open unit ball) and suppose
with p1 > p2 > 0. Finally, suppose that, for both algorithms, the CPU time needed to generate
xk+1 from xk is bounded (as a function of k), as well as bounded away from 0. Show that
there exists ǭ > 0 such that, for all ǫ ∈ (0, ǭ), {x1k } enters the ball B(x∗ , ǫ) in less total
CPU time than {x2k } does. Thus, under bounded, and bounded away from zero, time per
iteration, Q-orders can be meaningfully compared. (This is in contrast with the point made
in Exercise 4.30.)
Exercise 4.32 Show that any accumulation point of the sub-sequence {xi }i=ℓk of the se-
quence {xi } constructed by Algorithm 4 is stationary.
Exercise 4.33 (Pacer step) Show that, if f is strongly convex in any bounded set, then
the sequence {xi } constructed by Algorithm 4 converges to the minimum x∗ and the rate of
convergence is at least R-linear.
Theorem 4.10 Suppose that k = n and suppose that the sequence {xi } constructed by
Algorithm 4 is such that xi → x∗ , at which point the 2nd order sufficiency condition is
satisfied. Then xi → x∗ n-step q-quadratically, i.e. ∃q, l0 such that
This should be compared with the quadratic rate obtained below for Newton’s method:
Newton’s method achieves the minimum of a quadratic convex function in 1 step (compared
to n steps here).
Exercise 4.34 Show that n-step q-quadratic convergence does not imply R-superlinear con-
vergence. Show that the implication would hold under the further assumption that, for some
C > 0,
F (x) = 0V (4.32)
F(x)
convergent n=1
x
• • •
x2 x1 x0
but it should not be computed that way but rather by solving the linear system (4.33)
(much cheaper than computing an inverse). It turns out that, under suitable conditions, xi
converges very fast to a solution x∗ .
Hence, in particular, if F : Rn → Rn , Newton’s method is invariant under scaling of the
individual components of x.
Proof. (We use the following instance of the Inverse Function Theorem: Let f : V → V
be continuously differentiable, V a Banach space and let x0 ∈ V be such that DF (x0 ) is
invertible. Then there exists ρ > 0 such that DF (x)−1 exists and is continuous on B(x0 , ρ).
See, e.g. [?, Section 9.7, Problem 1].) Let xi be such that DF (xi ) is invertible. Then, from
(4.34),
where the induced norm k · ki is used for the (inverse) linear map. Now, there exist (i) ρ1 > 0
and β1 > 0 such that
DF (x)−1 ≤ β1 ∀x ∈ B(x∗ , ρ1 )
and (ii) ρ2 > 0 and β2 > 0 such that
(Existence of β1 and ρ1 follow from the Inverse Function Theorem; existence of β2 , for ρ2
small enough follows from continuity of the second derivative of F and from Corollary B.2.)
Further, let ρ > 0, with ρ < min{ρ1 , ρ2 } be such that
β1 β2 ρ < 1.
kxi+1 − x∗ k ≤ β1 β2 kxi − x∗ k2
≤ β1 β2 ρkxi − x∗ k ≤ kxi − x∗ k
so that, if x0 ∈ B(x∗ , ρ), then xi ∈ B(x∗ , ρ) for all i, and thus
and
kxi+1 − x∗ k ≤ β1 β2 ρkxi − x∗ k ≤ (β1 β2 ρ)i kx0 − x∗ k ∀i .
Since β1 β2 ρ < 1, it follows that xi → x∗ as i → ∞. In view of (4.35), convergence is
q-quadratic.
min{f (x)|x ∈ V }.
Since we are looking for points x∗ such that Df (x∗ ) = 0B (V, R), we want to solve a system of
nonlinear equations and the theory just presented applies, provided f is twice differentiable.
The Newton iteration now amounts to solving the linear system
Exercise 4.36 Newton’s method is invariant under affine transformations of the domain
z 7→ Lz + b, where L : V → V is an invertible, bounded linear map. [Note that, if L is a
bounded linear map and F is continuously differentiable, then G : z 7→ F (Lz + b) also is
continuously differentiable. Why?] Express this statement in a mathematically precise form,
and prove it. Next, turning to the application to minimization, show (e.g., by exhibiting
an example) that steepest descent (e.g., with exact line search) is not invariant under such
transformations, a significant shortcoming in comparison to Newton’s method, since selecting
a good scaling is then the user’s responsibility.
Remark 4.16 Global strong convexity of f (over all of Rn ) does not imply global conver-
gence of Newton’s method to minimize f . (f = integral of the function plotted on Figure 4.5.
gives such an example).
Exercise 4.37 Come up with a specific globally strongly convex function f : R → R and
an initial point x0 such that Newton’s iteration started at x0 does not converge to the unique
minimizer of f . Experiment with Matlab, trying various initial points, and comment (in
particular, you should observe local quadratic convergence).
divergent (although ∂F
(x) > 0 ∀x)
∂x
x2 x0
x1 x3
Global convergence will be obtained by making use of a suitable step-size rule, e.g., the
Armijo rule.
Now suppose V = Rn .1 Note that the Newton direction hN (x) at some x is given by
hN (x) = −∇2 f (x)−1 ∇f (x).
When ∇2 f (x) ≻ 0, hN (x) is minus the gradient associated with the (local) inner product
hu, vi = uT ∇2 f (x)v.
Hence, in such case, Newton’s method is a special case of steepest descent, albeit with a
norm that changes at each iteration.
Armijo–Newton
The idea is the following: replace the Newton iterate xi+1 = xi − ∇2 f (xi )−1 ∇f (xi ) by a
suitable step in the Newton direction, i.e.,
xi+1 = xi − ti ∇2 f (xi )−1 ∇f (xi ) (4.36)
with ti suitably chosen. By controlling the length of each step, one hopes to prevent insta-
bility. Formula (4.36) fits into the framework of Algorithm 2, with h(x) := hN (x). Following
Algorithm 2, we define ti in (4.36) via the Armijo step-size rule.
Note that if ∇2 f (x) is positive definite, h(x) is a descent direction. Global convergence with
an Armijo step, however, requires more (see (4.12)–(4.13)).
1
The same ideas apply for any Hilbert space, but some additional notation is needed.
(ii) The sequence {xk } generated by the Armijo-Newton algorithm converges to the unique
global minimizer.
Armijo-Newton yields global convergence. However, the q-quadratic rate may be lost since
nothing insures that the step-size ti will be equal to 1, even very close to a solution x∗ .
However, as shown in the next theorem, this will be the case if the α parameter is less
than 1/2.
We now have a globally convergent algorithm, with (locally) a q-quadratic rate (if f is thrice
continuously differentiable). However, we needed an assumption of strong convexity on f on
bounded sets (for the iteration to be well-defined).
Suppose now that f is not strongly convex (perhaps not even convex). We noticed earlier
that, around a local minimizer, the strong convexity assumption is likely to hold. Hence,
we need to steer the iterate xi towards the neighborhood of such a local solution and then
use Armijo-Newton for local convergence. Such a scheme is called a stabilization scheme.
Armijo-Newton stabilized by a gradient method would look like the following.
Algorithm
Parameters. α ∈ (0, 1/2), β ∈ (0, 1)
Data. x0 ∈ Rn
i=0
while ∇f (xi ) 6= 0 do {
set
Hi := ∇2 f (xi ) + δi I,
where δi ≥ 0 is appropriately selected;
set
hi := −Hi−1 ∇f (xi );
compute Armijo step size ti ;
set xi+1 := xi + ti hi
}
stop.
In defining Hi , the non-negative scalar δi should be selected large enough (so hi is close
enough to the being along the negative gradient direction) that global convergence ensures,
while ideally being set to zero from some iteration onwards, so that local the Armijo-Newton
iteration takes over, yielding q-quadratic convergence. The choice δ-selection rule is critical,
to avoid the iteration entering into an infinite loop by repeated switching between δi = 0
and a “large” value, possibly even hindering global convergence.
The variable metric methods avoid these 2 drawbacks. The price paid is that the rate of
convergence is not quadratic anymore, but merely superlinear (as in the conjugate gradient
method). The idea is to construct increasingly better estimates Si of the inverse of the
Hessian, making sure that those estimates remain positive definite. Since the Hessian ∇2 f
is generally positive definite around a local solution, the latter requirement presents no
contradiction.
Algorithm
Data. x0 ∈ Rn , S0 ∈ Rn×n , positive definite (e.g., S0 = I)
while ∇f (xi ) 6= 0 do {
hi = −Si ∇f (xi )
pick ti ∈ arg min{f (xi + thi )|t ≥ 0}
t
xi+1 = xi + ti hi
compute Si+1 , positive definite, using some update formula
}
stop
If the Si are bounded and uniformly positive definite, all accumulation points of the sequence
constructed by this algorithm are stationary (why?).
Exercise 4.40 Consider the above algorithm with the step-size rule ti = 1 for all i instead
of an exact search and assume f is strongly convex. Show that, if kSi − ∇2 f (xi )−1 k → 0,
convergence is Q-superlinear (locally). [Follow the argument used for Newton’s method. In
fact, if kSi − ∇2 f (xi )−1 k → 0 fast enough, convergence may be quadratic.]
A number of possible update formulas have been suggested. The most popular one, due
independently to Broyden, Fletcher, Goldfarb and Shanno (BFGS) is given by
γi γiT Si δi δiT Si
Si+1 = Si + −
δiT γi δiT Si δi
where
∆
δi = xi+1 − xi
∆
γi = ∇f (xi+1 ) − ∇f (xi )
Convergence
If f is three times continuously differentiable and strongly convex, the sequence {xi } gener-
ated by the BFGS algorithm converges superlinearly to the solution x∗ .
Remark 4.17
1. BFGS has been observed to perform remarkably well on non convex cost functions
2. Variable metric methods, much like conjugate gradient methods, use past information
in order to improve the rate of convergence. Variable metric methods require more
storage than conjugate gradient methods (an n × n matrix) but generally exhibit much
better convergence properties.
Exercise 4.41 Justify the name “variable metric” as follows. Given a symmetric positive
definite matrix M, define
−Si ∇f (x)
is achieved for h close to ĥ := ||Si ∇f (x)|| −1
for α small. Specifically, show that, given any
S
i
In particular, if D2f (x) > 0, the Newton direction is the direction of steepest descent in the
corresponding norm.
Constrained Optimization
min{f (x) : x ∈ Ω} (P )
where f : V → R is continuously Fréchet differentiable and Ω is a subset of V , a normed
vector space. Although the case of interest here is when Ω is not open (see Exercise 4.1), no
such assumption is made.
Remark 5.1 Note that this formulation is very general. It allows in particular for binary
variables (e.g., Ω = {x : x(x − 1) = 0}) or integer variables (e.g., Ω = {x : sin(xπ) = 0}).
These two examples are in fact instances of smooth equality-constrained optimization: see
section 5.2 below.
and since the direction (and orientation) of h was unrestricted, we could conclude that
Df (x̂) = 0B(V,R) .
In the case of problem (P ) however, the inequality f (x̂) ≤ f (x̂ + h) is not known to
hold for every small h. It is known to hold when x̂ + h ∈ Ω though. Since Ω is potentially
very complicated to specify, some approximation of it near x̂ is needed. A simple yet very
powerful such class of approximations is the class of conic approximations. Perhaps the most
obvious one is the “radial cone”.
The following result is readily proved (as an extension of the proof of Theorem 4.1 of uncon-
strained minimization, or with a simplification of the proof of the next theorem).
While this result is useful, it has a major drawback: When nonlinear equality constraints
are present, RC(x∗ , Ω) is usually empty, so that theorem is vacuous. This motivates the
introduction of the “tangent cone”. But first of all, let us define what is meant by “cone”.
In other words given x ∈ C, the entire ray from the origin through x belongs to C (but
possibly not the origin itself). A cone may be convex or not.
Example 5.1 (Figure 5.1)
ℜ2 ℜ2 ℜ2 non convex
cone
0
• convex • not a
0 cone a≠0 cone
ι1
ℜ2 ι2 ℜ3
• • non convex
cone
ι1 ∪ ι2 • •
• • •
0 0
non convex cone •
Figure 5.1:
A cone may or may not include the origin of the space. If it does, it is pointed. A cone
is salient if it does not include a nontrivial subspace. (A subspace S is nontrivial subspace
if S 6= {0V }.)
Exercise 5.1 Show that a cone C is convex if and only if αx + βy ∈ C for all α, β ≥ 0,
α + β > 0, x, y ∈ C.
Exercise 5.2 Show that a cone C is convex if and only if 21 (x + y) ∈ C for all x, y ∈ C.
Show by exhibiting a counterexample that this statement is incorrect if “cone” is replaced
with “set”.
To address the difficulty just encountered with radial cones, let us focus for a moment
on the case Ω = {(x, y) : y = f (x)} (e.g., with x and y scalars), and with f nonlinear.
As just observed, the radial cone is empty in this situation. From freshman calculus we
do know how to approximate such set around x̂ though: just replace f with its first-order
Taylor expansion, yielding {(x, y) : y = f (x̂) + Df (x̂)(x − x̂)}, where we have replaced the
curve with its “tangent” at x̂. Hence we have replaced the radial-cone specification (that
a ray belongs to the cone if short displacements along that ray yield points within Ω) with
a requirement that short displacements along a candidate tangent direction to our curve
yield points “little-o-close” to the curve. Merging the two ideas yields the “tangent cone”, a
super-set of the radial cone. In the case of Figure 5.2 below, the tangent cone is the closure
of the radial cone: it includes the radial cone as well as the two “boundary line” which are
the tangents to the “boundary curves” of Ω. (It is of course not always the case that the
tangent cone is the closure of the radial cone: Just think of the case that motivated this
discussion, where the radial cone was empty.)
Definition 5.3 Given an normed space V , Ω ⊆ V , and x ∈ Ω, the tangent cone TC(x, Ω)
to Ω at x is defined by
ko(t)k
TC(x, Ω) = {h ∈ V : ∃o(·), t̄ > 0 s.t. x+th+o(t) ∈ Ω ∀t ∈ (0, t̄], → 0 as t → 0, t > 0} .
t
The next exercise shows that this definition meets the geometric intuition discussed above.
i.e., the tangent cone is the half space that lies “above” the subspace parallel to the tangent
hyperplane—when n = 1, the line through the origin parallel to the tangent line—to f at
(ŷ, ẑ).
o(t)
TC(x, Ω) = {h ∈ V : ∃o(·) s.t. x + th + o(t) ∈ Ω ∀t > 0, → 0 as t → 0, t > 0} .
t
Some authors require that o(·) be continuous. This may yield a smaller set (and hence a
weaker version of the necessary condition of optimality), as shown in the next exercise.
Exercise 5.8 Let Ω : {0, 1, 21 , 13 , . . .}. Show that TC(0, Ω) = {h ∈ R : h ≥ 0} but there
exists no continuous little-o function such that th + o(t) ∈ Ω for all t > 0 small enough.
TC need not be convex, even if Ω is defined by smooth equality and inequality constraints
(although N (Dg(x)) and S(x), introduced below, are convex). Example: Ω = {x ∈ R2 :
x1 x2 ≤ 0}. Also note that x∗ + TC(x∗ , Ω) is an approximation to Ω around x∗ .
Theorem 5.1 Suppose x∗ is a local minimizer for (P). Then
Df (x∗ )h ≥ 0.
Dual cone. In a Hilbert space X, if x∗ = 0X solves (P), then hgradf (x∗ ), hi ≥ 0 for all h in
the tangent cone, i.e., gradf (x∗ ) belongs to the dual cone to the tangent cone.
K ∗ := {y ∈ X : hy, xi ≥ 0 ∀x ∈ K}.
Ω)
x,
Ω C(*
+T
x*
x*
C
Figure 5.2: In the situation pictured (where x∗ = 0X for clarity), the tangent cone to Ω at
x∗ is the closure of the radial cone to Ω at x∗ .
In Figure 5.2, when x∗ = 0X , cone C is the negative of the dual cone, which is the polar
cone, of TC(x, Ω).
The necessary condition of optimality we just obtained is not easy to use. By considering
specific types of constraint sets Ω, we hope to obtain a simple expression for TC, thus a
convenient condition of optimality. We first consider the equality constrained problem.
i.e.
min{f (x) : x ∈ {x : g(x) = 0ℓ }}
| {z }
Ω
Below, we investigate conditions that guarantee non-degeneracy. Note that, indeed, non-
degeneracy may fail to hold. In particular, unlike TC(x∗ , Ω) and the closure of its convex
hull, N (Dg(x∗ )) depends not only on Ω, but also on the way Ω is formulated. For example,
with x ∈ R, {x : x = 0} ≡ {x : x2 = 0} but N (Dg(0)) is {0} for the left-hand side and R
for the right-hand side.
We now derive a first order optimality conditions for the case when (5.4) does hold.
Theorem 5.2 Suppose x∗ is a local minimizer for (5.3) and suppose that (x∗ , g) is non-
degenerate, i.e., cl coTC(x∗ , Ω) = N (Dg(x∗ )). Then
Df (x∗ )h = 0 ∀h ∈ N (Dg(x∗))
Remark 5.2 Theorem 5.2 can also be proved directly, without making use of Theorem 5.1,
by invoking the “Inverse Function Theorem”. See, e.g., [?, Section 9.3, Lemma 1].
Remark 5.3 Our non-degeneracy condition is in fact a type of “constraint qualification”;
more on this later. In fact, as mentioned in Remark 5.22 it is the least restrictive constraint
qualification for our equality-constrained problem.
Corollary 5.1 (Lagrange multipliers. Joseph-Louis Lagrange, Italian-born mathematician,
1736–1813.) Under the same assumptions, ∃λ∗ ∈ Rm such that
∇f (x∗ ) + Dg(x∗ )T λ∗ = 0n (5.8)
i.e.
m
X
∗
∇f (x ) + λ∗,j ∇g j (x∗ ) = 0n . (5.9)
j=1
(1) m = 1 n = 2. Claim: ∇g(x∗ )⊥TC(x∗ , Ω) (why ?). Thus, from the picture, TC(x∗ , Ω) =
N (Dg(x∗)) (assuming ∇g(x∗ ) 6= 02 ), so (5.4) holds.
(2) m = 2 n = 3. Again, TC(x∗ , Ω) = N (Dg(x∗)), so again (5.4) holds. (We assume here
that ∇g1 (x∗ ) 6= 03 6= ∇g2 (x∗ ) and it is clear from the picture that these two gradients
are not parallel to each other.)
g =0
2
Figure 5.3: Inclusion (5.4) holds in case (1) and (2), but not in case (3).
Now let h ∈ N (Dg(x∗)), i.e., suppose Dg(x∗)h = 0ℓ . We want to find o(·) : R → Rn s.t.
∆
s(t) = x∗ + th + o(t) ∈ Ω ∀t ≥ 0
Geometric intuition (see Figure 5.4) suggests that we could try to find o(t) orthogonal to
h. (This does not work for the third example in Figure 5.3.). Since h ∈ N (Dg(x∗)), we try
with o(t) in the range of Dg(x∗ )T , i.e.,
x* x*+th
•
Ω x*+ th
+ o(t)
Figure 5.4:
Theorem 5.3 (Implicit Function Theorem (IFT); see, e.g., [?]. Let F : Rm ×
Rn−m → Rm , m < n and x̂1 ∈ Rm , x̂2 ∈ Rn−m be such that
(a) F ∈ C 1
(iii) Φ ∈ C 1 in B(x̂2 , ǫ)
(iv) DΦ(x2 ) = −[D1 F (Φ(x2 ), x2 )]−1 D2 F (Φ(x2 ), x2 ) ∀x2 ∈ B(x̂2 , ǫ), where D denotes
differentiation and Di differentiation with respect to the ith argument.
x2
F(x1,x2)=0
• x*
∼x
•
x1
Figure 5.5:
Exercise 5.10 Let A be a full rank m × n matrix with m ≤ n. Then AAT is non-singular.
If m > n, AAT is singular.
Definition 5.6 x ∈ Ω is a regular point for problem (5.3) if Dg(x∗ ) is surjective, i.e., has
full row rank.
Theorem 5.4 Suppose that g(x∗ ) = 0ℓ and x∗ is a regular point for (5.3). Then (x∗ , g) is
non-degenerate, i.e., TC(x∗ , Ω) = N (Dg(x∗ )).
(ii) g̃(0ℓ , 0) = 0ℓ
D2 g̃(0ℓ , 0) = Dg(x∗ )h = 0ℓ
i.e.
dϕ
(0) = 0ℓ
dt
and
dϕ
ϕ(t) = ϕ(0) + (0)t + o(t) = o(t)
dt
so that
g(x∗ + th + o′ (t)) = 0ℓ ∀t
with
o′ (t) = Dg(x∗ )T o(t)
which implies that h ∈ TC(x∗ , Ω).
Remark 5.4 Note that, in order for Dg(x∗) to be full row rank, it is necessary that ℓ ≤ n,
a natural condition for problem (5.3).
Remark 5.5 Regularity of x∗ is not necessary in order for (5.8) to hold. For example,
consider cases where two components of g are identical (in which case there are no regular
points), or cases where x∗ happens to also be an unconstrained local minimizer (so (5.8)
holds trivially) but is not a regular point, e.g., min x2 subject to x = 0. Also, it is a simple
exercise to show that, if g is affine, then every x∗ such that g(x∗ ) = 0ℓ is regular.
Remark 5.6 It follows from Theorem 5.4 that, when x∗ is a regular point, TC(x∗ , Ω) is
convex and closed, i.e.,
TC(x∗ , Ω) = cl(coTC(x∗ , Ω)).
Indeed, is a closed subspace. This subspace is typically referred to as the tangent plane to
Ω at x∗ .
Remark 5.7 Suppose now g is scalar-valued. The set Lα (g) := {x : g(x) = α} is often
referred to as the α-level set of g. Let x∗ ∈ Lα (g) for some α. Regardless of whether x∗ is
regular for g, we have
TC(x∗ , Lα (g)) ⊆ N (Dg(x∗ )) = {∇g(x∗ )}⊥ ,
i.e., ∇g(x∗ ) is orthogonal to TC(x∗ , Lα (g)). It is said to be normal at x∗ to Lα (g), the
(unique) level set (or level surface, or level curve) of g that contains x∗ .
Remark 5.8 Also of interest is the connection between (i) the gradient at some x̂ ∈ R of a
scalar, continuously differentiable function f : Rn → R and (ii) the normal at x̂, f (x̂) to its
graph
G := {(x, z) ∈ Rn+1 : z = f (x)}.
(Note that ∇f (x) lies in Rn while G belongs to Rn+1 .) Thus let x̂ ∈ Rn and ẑ = f (x̂). Then
(i) (x̂, ẑ) is regular for the function z −f (x) and (ii) (g, −1) is orthogonal to the tangent plane
at (x̂, ẑ) to G (i.e., is normal to G) if and only if g = ∇f (x̂). Thus, the gradient at x̂ of f is
the horizontal projection of the downward normal (makes an angle of more than π/2 with
the positive z-axis) at (x̂, ẑ) to the graph of f , when the normal is scaled so that its vertical
projection (which is always nonzero since f is differentiable at x̂) has unit magnitude.
Remark 5.9 Regularity of x∗ is not necessary in order for (5.8) to hold. For example,
consider cases where two components of g are identical (in which case there are no regular
points), or cases where x∗ happens to also be an unconstrained local minimizer (so (5.8)
holds trivially) but is not a regular point, e.g., min x2 subject to x = 0.
Corollary 5.2 Suppose that x∗ is a local minimizer for (5.3) (without full rank assumption).
Then ∃λ∗ ∈ R1+ℓ , λ∗ = (λ∗,0 , λ∗,1 , . . . , λ∗,ℓ ) 6= 01+ℓ , such that
ℓ
X
∗,0 ∗
λ ∇f (x ) + λ∗,j ∇g j (x∗ ) = 0n , (5.11)
j=1
Proof. If Dg(x∗ ) is not full rank, then (5.11) holds with λ∗,0 = 0 (∇g j (x∗ ) are linearly
dependent). If Dg(x∗) has full rank, (5.11) holds with λ∗,0 = 1, from Corollary 5.1.
Remark 5.10
1. How does the optimality condition (5.9) help us solve the problem? Just remember
that x∗ must satisfy the constraints, i.e.,
g(x∗ ) = 0ℓ (5.12)
Lagrangian function
If one defines L : Rn × Rℓ → R by
ℓ
X
L(x, λ) = f (x) + λj g j (x)
j=1
then, the optimality conditions (5.9)+(5.12) can be written as: ∃λ∗ ∈ Rℓ s.t.
(In fact, D2 L(x∗ , λ) = 0B(Rn ,R) ∀λ.) L is called the Lagrangian for problem (5.3).
Show that (0, 0) is the unique global minimizer and that it does not satisfy (5.15). ((0,0)
does not minimize f over the tangent cone (=tangent plane).)
The correct second order conditions will involve the Lagrangian. (The statement given here
is more restrictive than strictly necessary. Specifically, while surjectivity of the Jacobian of
the constraints is sufficient for the theorem to hold, it also holds under milder appropriate
conditions.)
Theorem 5.5 (2nd order necessary condition). Suppose x∗ is a local minimizer for (5.3)
and suppose that Dg(x∗ ) is surjective. Also suppose that f and g are twice continuously
differentiable. Then there exists λ ∈ Rm such that (5.13) holds and
Proof. Let h ∈ N (Dg(x∗ )) = TC(x∗ , Ω) (since Dg(x∗) has full row rank). Then ∃o(·) s.t. x∗ +
th + o(t) ≡ s(t) ∈ Ω ∀t ≥ 0 i.e.
g(s(t)) = 0ℓ ∀t ≥ 0 (5.17)
oj (t)
where o2t(t)
2 → 0, as t → 0, 2t2 → 0 as t → 0 for j = 1, 2, . . . , m. (Note that the first
term in the RHS of (5.19) is generally not 0, because of the “o” term, and is likely to even
dominate the second term; this is why conjecture (5.15) is incorrect.) We have shown (1st
order condition) that there exists λ ∈ Rm such that
m
X
∗
∇f (x ) + λj ∇g j (x∗ ) = 0
j=1
Hence, multiplying the jth equation in (5.20) by λj and adding all of them, together with
(5.19), we get
1
0 ≤ L(s(t), λ)−L(x∗ , λ) = ∇x L(x∗ , λ)T (th+o(t))+ (th+o(t))T ∇2xx L(x∗ , λ)(th+o(t))+ õ2 (t)
2
yielding
1
0 ≤ (th + o(t))T ∇2xx L(x∗ , λ)(th + o(t)) + õ2 (t)
2
with m
X
õ2 (t) = o2 (t) + λj oj2 (t)
j=1
Just like in the unconstrained case, the above proof cannot be used directly to obtain a
sufficiency condition, by changing ‘≤’ to ‘<’ and proceeding backwards. In fact, an additional
difficulty here is that all we would get is
for some “little o” function oh and for all t ∈ (o, t̄h ] for some t̄h > 0. It is not clear whether
this would ensure that
Theorem 5.6 (2nd order sufficiency condition). Suppose that f and g are twice continu-
ously differentiable. Suppose that x∗ ∈ Rn is such that
(i) g(x∗ ) = 0ℓ
g(x∗ + tk hk ) = 0ℓ (5.21)
We can write
1
0 ≥ f (xk ) − f (x∗ ) = tk ∇f (x∗ )T hk + t2k hTk ∇2 f (x∗ )hk + o2 (tk hk )
2
1
0ℓ = g (xk ) − g (x ) = tk ∇g (x ) hk + t2k hTk ∇2 g j (x∗ )hk + oj2 (tk hk )
j j ∗ j ∗ T
2
j
Multiplying by the multipliers λ∗ given by (ii) and adding, we get
1
0 ≥ t2k hTk ∇2xx L(x∗ , λ∗ )hk + õ2 (tk hk )
2
i.e.
1 T 2 õ2 (tk hk )
hk ∇xx L(x∗ , λ∗ )hk + ≤ 0 ∀k (5.23)
2 t2k
K
Since ||hk || = 1 ∀k, {hk } lies in a compact set and there exists h∗ and K s.t. hk → h∗ .
Without loss of generality, assume hk → h∗ . Taking k → ∞ in (5.23), we get
Exercise 5.13 Give an alternate proof of Theorem 4.6, using the line of proof used above
for Theorem 5.6. Where do you make use of the assumption that the domain is finite di-
mensional? (Recall Exercise 4.14.)
(i) Carefully prove that if (x̂, ŝ) solves (P2 ) then x̂ solves (P1 ).
p
(ii) Carefully prove that if x̂ solves (P1 ) then (x̂, ŝ) solves (P2 ), where ŝj = −f j (x̂).
(iii) Use Lagrange multipliers rule and part (ii) to prove (carefully) the following weak result:
If x̂ solves (P1 ) and {∇f j (x̂) : j ∈ J(x̂)} is a linearly-independent set, then there exists a
vector µ ∈ Rm such that
∇f 0 (x̂) + Df (x̂)T µ = 0n (5.30)
µj = 0 if f j (x̂) < 0 j = 1, 2, . . . , m (5.31)
[This result is weak because: (i) there is no constraint on the sign of µ, (ii) the linear
independence assumption is significantly stronger than necessary.]
Thus
x + th ∈ Ω ∀t ∈ (0, min(t̄, t̃)]
or, equivalently
6 ∃h s.t. ∇f j (x∗ )T h < 0 ∀j ∈ J0 (x∗ ).
Remark 5.11 Since RC(x, Ω) ⊂ TC(x, Ω)), it follows from Theorem 5.7 that
However, as further discussed below, it does not follow from Theorem 5.8 that ∇f 0 (x∗ )T h ≥ 0
for all h such that ∇f j (x∗ )T h ≤ 0 for all j ∈ J(x∗ ).
Note that, if v1 , . . . , vk are linearly independent, then they are positively linearly indepen-
dent.
The following proposition gives a geometric interpretation to the necessary condition just
obtained.
Theorem 5.9 Given {v1 , . . . , vk } ∈ Rn the following three statements are equivalent
(ii) 0n ∈ co{v1 , . . . , vk }
Proof
(i)⇒(ii): By contradiction. If 0n 6∈ co{v1 , . . . , vk } then by the separation theorem (see
Appendix B) there exists h such that
v T h < 0 ∀v ∈ co{v1 , . . . , vk } .
Since positive numbers which sum to 1 cannot be all zero, this proves (iii).
P
(iii)⇒(i): By contradiction. Suppose (iii) holds, i.e., αi vi = 0n for some αi ≥ 0, not all
T
zero, and there exists h such that vj h < 0, j = 1, . . . , k. Then
k
!T k
X X
0= αj vj h= αj vjT h.
1 1
But since the αj ’s are non negative, not all zero, this is a contradiction.
Corollary 5.4 (F. John conditions) [Fritz John, American (German born) mathematician,
1
1910-1994]. Suppose x∗ is a local minimizer for (5.25). Then there exist µ∗0 , µ∗ , . . . , µ∗m ,
not all zero such that
m
P
(i) µ∗0 ∇f 0 (x∗ ) + µ∗j ∇f j (x∗ ) = 0n
j=1
(ii) f j (x∗ ) ≤ 0 j = 1, . . . , m
(iii) µ∗j ≥ 0 j = 0, 1, . . . , m
(iv) µ∗j f j (x∗ ) = 0 j = 1, . . . , m
Proof. From (iii) in Theorem 5.9, ∃µ∗j , ∀j ∈ J0 (x∗ ), µ∗j ≥ 0, not all zero such that
X
µ∗j ∇f j (x∗ ) = 0.
j∈J0 (x∗ )
By defining µ∗j = 0 for j 6∈ J0 (x∗ ) we obtain (i). Finally, (ii) just states that x∗ is feasible,
(iii) directly follows and (iv) follows from µ∗j = 0 ∀j 6∈ J0 (x∗ ).
Remark 5.12 Condition (iv) in Corollary 5.4 is called complementary slackness. In view
of conditions (ii) and (iii) it can be equivalently stated as
m
X
(µ∗ )T f (x∗ ) = µ∗j f j (x∗ ) = 0
1
The similarity between the above F. John conditions and the weak conditions obtained
for the equality constrained case is obvious. Again, if µ∗0 = 0, the cost f 0 does not enter
the conditions at all. These conditions are degenerate. (For example, min x s.t. x3 ≥ 0 has
x∗ = 0 as global minimizer and the F. John condition only holds with µ∗0 = 0. See more
meaningful examples below.)
We are now going to try and obtain conditions for the optimality conditions to be non-
degenerate, i.e., for the first multiplier µ∗0 to be nonzero (in that case, it can be set to 1
by dividing through by µ∗0 ). The resulting optimality conditions are called Karush-Kuhn-
Tucker (or Kuhn-Tucker) optimality conditions. The general condition for µ∗0 6= 0 is called
Kuhn-Tucker constraint qualification (KTCQ). But before considering it in some detail, we
give a simpler (but more restrictive) condition, which is closely related to the “regularity”
condition of equality-constrained optimization.
Proposition 5.2 Suppose x∗ is a local minimizer for (5.25) and suppose {∇f j (x∗ ) : j ∈
J(x∗ )} is a positively linearly independent set of vectors. Then the F. John conditions hold
with µ∗0 6= 0.
Proof. By contradiction. Suppose µ∗0 = 0. Then, from Corollary 5.4 above, ∃ µ∗j ≥ 0, j =
1, . . . , m, not all zero such that
m
X
µ∗j ∇f j (x∗ ) = 0n
j=1
Note: Positive linear independence of {∇f j (x∗ ) : j ∈ J(x∗ )} is not necessary in order for
µ∗0 to be nonzero. E.g, again, min x s.t. x3 ≥ 0 has x∗ = 0 and µ∗0 > 0.
We now investigate weaker conditions under which a strong result holds. For x ∈ Ω,
define
It turns out that the strong result holds whenever Sf (x∗ ) is equal the convex hull of the
closure of the tangent cone. (It is readily verified that Sf (x∗ ) is a closed convex cone.)
Remark 5.13 In the case of equality constraints recast as inequality constraints (g(x) ≤
0, −g(x) ≤ 0), Sf (x) reduces to N (Dg(x∗)) !
Remark 5.14 The inclusion S̃f (x∗ ) ⊆ TC(x∗ , Ω) (Theorem 5.7) does not imply that
since, in general
cl(S̃f (x∗ )) ⊆ Sf (x∗ ) (5.38)
but equality in (5.38) need not hold. (As noted below (see Proposition 5.6 : Mangasarian-
Fromovitz constraint qualification), it holds if and only if S̃f (x∗ ) is nonempty.) Condi-
tion (5.37) is known as the KTCQ condition (see below).
The next exercise shows that the inclusion opposite to (5.37) always holds. That inclusion
is analogous to the inclusion cl(coTC(x∗ , Ω)) ⊆ N (Dg(x∗ )) in the equality-constrained case.
Ω
•
x*
Figure 5.6:
Figure 5.7:
Thus KTCQ is satisfied iff (5.37) holds. In particular this holds whenever S̃f (x) 6= ∅ (see
Proposition 5.6 below).
Example 5.3 In (1), (2), and (3) below, the gradients of the active constraints are not
positively linearly independent. In (1) and (2) though, KTCQ does hold.
(1) (Figure 5.6)
f 1 (x) ≡ x2 − x21
S̃f (x∗ ) = ∅
f 2 (x) ≡ −x2 ⇒
Sf (x∗ ) = {h s.t. h2 = 0} = TC(x∗ , Ω)
x∗ = (0, 0)
If f 2 is changed to x41 − x2 , KTCQ still does not hold, but with the cost function f 0 (x) = x2 ,
the KKT conditions do hold! (Hence KTCQ is sufficient but not necessary in order for KKT
to hold. Also see Exercise 5.20 below.)
(3) Example similar to that given in the equality constraint case; TC(x∗ , Ω) and Sf (x∗ ) are
the same as in the equality case (Figure 5.8). KTCQ does not hold.
(4) {(x, y, z) : z −(x2 +2y 2) ≥ 0, z −(2x2 +y 2) ≥ 0}. At (0, 0, 0), the gradients are positively
linearly independent, though they are not linearly independent. S̃f (x∗ ) 6= ∅, so that KTCQ
does hold.
Remark 5.15 The equality constraint g(x) = 0ℓ can be written instead as the pair of
inequalities g(x) ≤ 0ℓ and −g(x) ≤ 0ℓ . If there are no other constraints, then we get
f2(x)=0 ≤ 0 below
Figure 5.8:
Sf (x̂) = N (Dg(x̂)) so that KTCQ holds if and only if (x̂, g) is non-degenerate. (In particular,
if x̂ is regular, then KTCQ does hold.) However, none of the sufficient conditions we have
discussed (for KTCQ to hold) are satisfied in such case (implying that none are necessary)!
(Also, as noted in Remark 5.5, in the equality-constrained case, regularity is (sufficient but)
not necessary for a “strong” condition—i.e., with λ∗,0 6= 0—to hold.)
Exercise 5.16 (due to H.W. Kuhn). Obtain the sets Sf (x∗ ), S̃f (x∗ ) and TC(x∗ , Ω) at min-
imizer x∗ for the following examples (both have the same Ω): (i) minimize (−x1 ) subject
to x1 + x2 − 1 ≤ 0, x1 + 2x2 − 1 ≥ 0, x1 ≥ 0, x2 ≥ 0, (ii) minimize (−x1 ) subject to
(x1 + x2 − 1)(x1 + 2x2 − 1) ≤ 0; x1 ≥ 0, x2 ≥ 0. In each case, indicate whether KTCQ holds.
Exercise 5.17 In the following examples, exhibit the tangent cone at (0, 0) and determine
whether KTCQ holds
(ii) Ω = {(x, y) : − x2 + y ≤ 0, − x2 − y ≤ 0.
(iii) Ω = {(x, y) : − x2 + y ≤ 0, − x2 − y ≤ 0, − x ≤ 0}
Proposition 5.3 Suppose x∗ is a local minimizer for (P) and KTCQ is satisfied at x∗ . Then
∇f 0 (x∗ )T h ≥ 0 ∀h ∈ Sf (x∗ ), i.e.,
Remark 5.17 As mentioned in Remark 5.22 below, KTCQ is in fact the least restrictive
constraint qualification for our inequality-constrained problem.
Remark 5.18 The above result may appear to the reader to be only slightly stronger than
Theorem 5.8. It turns out that this is enough to ensure µ∗0 6= 0 though. This follows directly
from Farkas’s Lemma, named after Gyula Farkas (Hungarian mathematician, 1847–1930).
k
X
∃λi ≥ 0, i = 1, 2, . . . , k s.t. b = λi ai
i=1
m
X
0 ∗
∇f (x ) + µ∗j ∇f j (x∗ ) = 0n
j=1
∗j
µ ≥ 0 j = 1, . . . , m
j
f (x∗) ≤ 0 j = 1, . . . , m
µ f (x∗ ) = 0
∗j j
j = 1, . . . , m
Proof. From (5.40) and Farkas’s Lemma ∃µ∗j , j ∈ J(x∗ ) such that
X
∇f 0 (x∗ ) + µ∗j ∇f j (x∗ ) = 0n
j∈J(x∗ )
Remark 5.19 An interpretation of Farkas’s Lemma is that the closed convex cone C and
the closed convex cone
D := {x : aTi x ≥ 0, i = 1, . . . , k}
are dual of each other; see Definition 5.4. (Hint: hb, xi ≤ 0 for all x ∈ {x : hai , xi ≤ 0} iff
hb, xi ≥ 0 for all x ∈ {x : hai , xi ≥ 0}.) In the case of a subspace S (subspaces are cones),
the dual cone is simply the orthogonal complement, i.e., S ∗ = S ⊥ (check it). In that special
case, the fundamental property of linear maps L
N (L) = R(L∗ )⊥
can be expressed in the notation of cone duality as
N (L) = R(L∗ )∗ ,
which shows that our proofs of Corollary 5.1 (equality constraint case) and Theorem 5.10
(inequality constraint case), starting from Theorem 5.2 and Proposition 5.3 respectively, are
analogous.
We pointed out earlier a sufficient condition for µ∗0 6= 0 in the F. John conditions. We now
consider two other important sufficient conditions and we show that they imply KTCQ.
Definition 5.9 h : Rn → R is affine if h(x) = aT x + b.
Proposition 5.5 Suppose the f j ’s are affine. Then Ω = {x : f j (x) ≤ 0, j = 1, 2, . . . , m}
satisfies KTCQ at any x ∈ Ω.
1
∇f j (x̂)T hi = ∇f j (x̂)T ĥ + ∇f j (x̂)T h < 0 ∀j ∈ J(x̂) (5.41)
i | {z } | {z }
<0 ≤0
Exercise 5.21 Suppose the gradients of active constraints are positively linearly indepen-
dent. Then KTCQ holds. (Hint: ∃h s.t. ∇f j (x)T hi < 0 ∀j ∈ J(x).)
Exercise 5.22 Suppose the gradients of the active constraints are linearly independent.
Then the KKT multipliers are unique.
Exercise 5.23 (First order sufficient condition of optimality.) Consider the problem
(There is no assumption that these multipliers are unique in any way.) Further suppose that
there exists a subset J of J0 (x∗ ) of cardinality n with the following properties: (i) µ∗j > 0 for
all j ∈ J, (ii) {∇fj (x∗ ) : j ∈ J} is a linearly independent set of vectors. Prove that x∗ is
a strict local minimizer.
with
f 0 : Rn → R, f : Rn → Rm , g : Rn → Rℓ , all C1
We first obtain an extended Karush-Kuhn-Tucker condition. We define
Fact. If {∇g j (x), j = 1, . . . , ℓ} ∪ {∇f j (x), j ∈ J(x)} is a linearly independent set of vectors,
then KTCQ holds at x.
Theorem 5.11 (extended KKT conditions). If x∗ is a local minimizer for (5.42) and KTCQ
holds at x∗ then ∃µ∗ ∈ Rm , λ∗ ∈ Rℓ such that
µ∗ ≥ 0m
f (x∗ ) ≤ 0m , g(x∗ ) = 0ℓ
m
X ℓ
X
∇f 0 (x∗ ) + µ∗j ∇f j (x∗ ) + λ∗j ∇g j (x∗ ) = 0n
j=1 j=1
∗j j ∗
µ f (x ) = 0 j = 1, . . . , m
Proof (sketch)
Express Sf,g (x∗ ) by means of pairs of inequalities of the form ∇g j (x∗ )T h ≤ 0, g j (x∗ )T h ≥
0, and use Farkas’s lemma.
Remark 5.22 As shown in the next exercise, constraint qualification (5.43) is the least
restrictive valid constraint qualification: it is necessary in some appropriate sense. The non-
degeneracy condition we considered in the context of equality-constrained optimization and
the (“restricted”) KTCQ we considered obtained in the pure inequality-constraint case are
special cases of the above and hence are necessary in the same sense.
Exercise. Prove the following: Constraint qualification (5.43) is necessary in the sense that,
if it does not hold at x∗ then there exists a continuously differentiable objective function f 0
that attains a (constrained) local minimum at x∗ at which the extended KKT conditions do
not hold. [Hint: Invoke the main result in paper [?] (which involves the concept of polar
cone) and show that the CQ condition used there is equivalent to the above.]
Without the KTCQ assumption, the following (weak) result holds (see, e.g., [?], sec-
tion 3.3.5).
Theorem 5.12 (extended F. John conditions). If x∗ is a local minimizer for (5.42) then
∃µ∗j , j = 0, 1, 2, . . . , m and λ∗j j = 1, . . . , ℓ, not all zero, such that
µ∗j ≥ 0 j = 0, 1, . . . , m
f (x∗ ) ≤ 0m , g(x∗ ) = 0ℓ
m
X ℓ
X
∗j j ∗
µ ∇f (x ) + λ∗j ∇g j (x∗ ) = 0n
j=0 j=1
Note the constraint on the sign of the µ∗j ’s (but not of the λ∗j ’s) and the complementary
slackness condition for the inequality constraints.
Exercise 5.26 The argument that consists in splitting again the equalities into sets of 2
inequalities and expressing the corresponding F. John conditions is inappropriate. Why?
Theorem 5.13 (Convex problems, sufficient condition). Consider problem (5.42). Suppose
that f j , j = 0, 1, 2, . . . , m are convex and that g j , j = 1, 2, . . . , ℓ are affine. Under those
conditions, if x∗ is such that ∃µ∗ ∈ Rm , λ∗ ∈ Rℓ which, together with x∗ , satisfy the KKT
conditions, then x∗ is a global minimizer for (5.42).
Proof. Define ℓ : Rn → R as
m
X ℓ
X
j j
ℓ(x) := L(x, µ∗ , λ∗ ) = f 0 (x) + µ∗ f j (x) + λ∗ g j (x)
j=1 j=1
ℓ(x∗ ) ≤ ℓ(x) ∀x ∈ Rn
in particular,
ℓ(x∗ ) ≤ ℓ(x) ∀x ∈ Ω
i.e.
m
X ℓ
X m
X ℓ
X
0 ∗ ∗j j ∗ ∗j j ∗ 0 ∗j j j
f (x ) + µ f (x ) + λ g (x ) ≤ f (x) + µ f (x) + λ∗ g j (x) ∀x ∈ Ω .
j=1 j=1 j=1 j=1
Exercise 5.27 Under the assumptions of the previous theorem, if f 0 is strictly convex, then
x∗ is the unique global minimizer for (P ).
Remark 5.23 Our assumptions require that g be affine (not just convex). In fact, what we
really need is that ℓ(x) be convex and this might not hold if g is merely convex. For example
{(x, y) : x2 − y = 0} is obviously not convex.
Remark 5.24
1. The linear independence assumption is more restrictive than KTCQ (and is more
restrictive than necessary; see related comment in connection with Theorem 5.5). It
insures uniqueness of the KKT multipliers (prove it).
2. Intuition may lead to believe that (5.44) should hold for all h in the larger set
Sf,g (x∗ ) := {h : Dg(x∗)h = 0ℓ , ∇f j (x∗ )T h ≤ 0 ∀j ∈ J(x∗ )} .
The following scalar example shows that this is not true:
min{log(x) : x ≥ 1} (with x ∈ R)
(Note that a first order sufficiency condition holds for this problem: see Exercises 5.23
and 5.28)
There are a number of (non-equivalent) second-order sufficient conditions (SOSCs) for prob-
lems with mixed (or just inequality) constraints. The one stated below strikes a good trade-off
between power and simplicity.
Theorem 5.15 (SOSC with strict complementarity). Suppose that x∗ ∈ Rn is such that
(i) KKT conditions (see Theorem 5.11) hold with µ∗ , λ∗ as multipliers, and µ∗j > 0 ∀j ∈
J(x∗ ).
Remark 5.25 Without strict complementarity, the result is not valid. (Example: min{x2 −
y 2 : y ≥ 0} with (x∗ , y ∗) = (0, 0) which is a KKT point but not a local minimizer.) An
alternative (stronger) condition is obtained by dropping the strict complementarity assump-
j
tion but replacing in (ii) J(x∗ ) with its subset I(x∗ ) := {j : µ∗ > 0}, the set of indices
j
of binding constraints. Notice that if µ∗ = 0, the corresponding constraint does not enter
the KKT conditions. Hence, if such “non-binding” constraints is removed, x∗ will still be a
KKT point.
Exercise 5.28 Show that the second order sufficiency condition still holds if condition (ii)
is replaced with
hT ∇2xx L(x∗ , µ∗ , λ∗ )h > 0 ∀h ∈ Sf,g (x∗ )\{0} .
Find an example where this condition holds while (ii) does not.
Remark 5.26 If sp{∇f j (x∗ ) : j ∈ I(x∗ )} = Rn , then condition (iii) in the sufficient
condition holds trivially, yielding a first order sufficiency condition. (Relate this to Exercise
5.23.)
with P (x) = ||g(x)||2 + ||f (x)+ ||2 , (f (x)+ )j = max(0, f j (x)), and where ci grows to infinity.
Note that P (x) = 0 if and only if x ∈ Ω (feasible set). The rationale behind the method
is that, if ci is large, the penalty term P (x) will tend to push the solution xi (Pi ) towards
the feasible set. The norm used in defining P (x) is arbitrary, although the Euclidean norm
has clear computational advantages (P (x) continuously differentiable: this is the reason for
squaring the norms).
First, let us suppose that each Pi can be solved for a global minimizer xi (conceptual version).
K
Theorem 5.16 Suppose xi → x̂, then x̂ solves (P ).
As pointed out earlier, the above algorithm is purely conceptual since it requires exact
computation of a global minimizer for each i. However, using one of the algorithms previously
studied, given ǫi > 0, one can construct a point xi satisfying
by constructing a sequence {xj } such that ∇φi (xj ) → 0n as j → ∞ and stopping computa-
tion when (5.45) holds. We choose {ǫi } such that ǫi → 0 as i → ∞.
For simplicity, we consider now problems with equality constraints only.
Exercise 5.31 Show that ∇φi (x) = ∇f (x) + ci Dg(x)T g(x)
K
Theorem 5.17 Suppose that ∀x ∈ Rn , Dg(x) has full row rank . Suppose that xi → x∗ .
Then x∗ ∈ Ω and ∃λ∗ ∋
∆
with S = {h : ||h|| ≤ 1}. Any norm could be used but we will focus essentially on the
Euclidean norm, which does not favor any direction. Since the “max” is taken over a finite
set (thus a compact set) it is continuous in h. Since S is compact, the minimum is achieved.
Proposition 5.7 For all x ∈ Rn , θ1 (x) ≤ 0. Moreover, if x ∈ Ω, θ1 (x) = 0 if and only if x
is a F. John point.
Proposition 5.8 Suppose x ∈ Ω. Then θ2 (x) ≤ 0 and, moreover, θ2 (x) = 0 if and only if x
is a F. John point.
We state without proof a corresponding convergence theorem (the proof is essentially pat-
terned after the corresponding proof in the unconstrained case).
Theorem 5.18 Suppose that {xi } is constructed by the above algorithm. Then xi ∈ Ω ∀i
K
and xi → x̂ implies θ2 (x̂) = 0 (i.e. x̂ is a F. John point).
Note: The proof of this theorem relies crucially on the continuity of θ2 (x).
Newton’s method for constrained problems
Consider again the problem
We know that, if x∗ is a local minimizer for (5.51) and Dg(x∗) has full rank, then ∃λ ∈ Rm
such that
∇x L(x∗ , λ∗ ) = 0
g(x∗ ) =0
which is a system of n + m equations with n + m unknowns. We can try to solve this system
using Newton’s method. Define z = (x, λ) and
∇x L(x, λ)
F (z) = .
g(x)
We have seen that, in order for Newton’s method to converge locally (and quadratically),
it is sufficient that DF (z ∗ ) be non singular, with z ∗ = (x∗ , λ∗ ), and that DF be Lipschitz
continuous around z ∗ .
Exercise 5.36 Suppose that 2nd order sufficiency conditions of optimality are satisfied at
x∗ and, furthermore, suppose that Dg(x∗ ) has full rank. Then DF (z ∗ ) is non singular.
As in the unconstrained case, it will be necessary to “stabilize” the algorithm in order to
achieve convergence from any initial guess. Again such stabilization can be achieved by
• using a suitable step-size rule
• using a composite algorithm.
Sequential quadratic programming
This is an extension of Newton’s method to the problem
min{f 0 (x) : g(x) = 0, f (x) ≤ 0} . (P )
Starting from an estimate (xi , µi , λi ) of a KKT triple, solve the following minimization prob-
lem:
1
min{∇x L(xi , µi , λi )T v + v T ∇2xx L(xi , µi , λi )v :
v 2
g(xi ) + Dg(xi )v = 0, f (xi ) + Df (xi )v ≤ 0} (Pi )
i.e., the constraints are linearized and the cost is quadratic (but is an approximation to L
rather than to f 0 ). (Pi ) is a quadratic program (we will discuss those later) since the cost
is quadratic (in v) and the constraints linear (in v). It can be solved exactly and efficiently.
Let us denote by vi its solution and ξi , ηi the associated multipliers. The next iterate is
xi+1 = xi + vi
µi+1 = ξi
λi+1 = ηi
Then (Pi+1 ) is solved as so on. Under suitable conditions (including second order sufficiency
condition at x∗ with multipliers µ∗ , λ∗ ), the algorithm converges locally quadratically if
(xi , µi , λi ) is close enough to (x∗ , µ∗, λ∗ ). As previously, D2 L can be replaced by an estimate,
e.g., using an update formula. It is advantageous to keep those estimates positive definite. To
stabilize the methods (i.e., to obtain global convergence) suitable step-size rules are available.
Exercise 5.37 Show that, if m = 0 (no inequality) the iteration above is identical to the
Newton iteration considered earlier.
5.8 Sensitivity
An important question for practical applications is to know what would be the effect of
slightly modifying the constraints, i.e., of solving the problem
min{f 0 (x) : g(x) = b1 , f (x) ≤ b2 } (5.52)
with the components of b1 and b2 being small. Specifically, given a (local) minimizer x∗ for
the problem when b := (b1 , b2 ) = (0ℓ , 0m ), (i) does there exist ǫ > 0 such that, whenever
kbk ≤ ǫ, the problem has a local minimizer x(b) which is “close” to x∗ ? and (ii) if such ǫ
exists, what can be said about the “value function” V : B(0ℓ+m , ǫ) → R given by
V (b) := f0 (x(b));
in particular, how about ∇V (0ℓ+m )?
For simplicity, we first consider the case with equalities only:
min{f 0 (x) : g(x) = b}. (5.53)
When b = 0ℓ , there exist λ∗ such that the first-order conditions of optimality are
∇f 0 (x∗ ) + Dg(x∗ )T λ∗ = 0n
. (5.54)
g(x∗ )) = 0ℓ
hold. Consider now the left-hand side of (5.54) as a function F (x, λ, b) of x, λ and b and
try to solve (5.54) locally for x and λ using IFT (assuming f 0 and g are twice continuously
Fréchet-differentiable)
2
∗ ∗ ∇1,1 L(x∗ , λ∗ ) Dg(x∗ )T
D1,2 F (x , λ , θℓ ) = (5.55)
Dg(x∗ ) 0
(where D1,2 denotes the Fréchet-derivative with respect to the first two arguments) which
was shown to be non-singular (in Exercise 5.36) under the same hypotheses. Hence x(b) and
λ(b) are well defined and continuously differentiable for ||b|| small enough and they form a
KKT pair for (5.53) since they satisfy (5.54). Furthermore, by continuity, they still satisfy
the 2nd order sufficiency conditions (check this) and hence, x(b) is a strict local minimizer
for (5.53). Finally, by the chain rule, we have
T
DV (0ℓ ) = Df 0(x∗ )Dx(0ℓ ) = −λ∗ Dg(x∗ )Dx(0ℓ ),
where we have invoked (5.54). Now let ϕ : Rℓ → Rℓ be given by ϕ(b) := g(x(b)). But by
the second equality in (5.54), for kbk small enough,
Dg(x(b))Dx(b) = Dϕ(b) = I,
in particular, with b = 0ℓ ,
Dg(x∗)Dx(0ℓ ) = I.
Hence (DV (0ℓ ))T = −λ∗ .
The next theorem addresses the case of the general problem (5.52). Strict complemen-
tarity is needed in order for µ(b) to still satisfy µ(b) ≥ 0m .
Theorem 5.19 Consider the family of problems (5.52) where f 0 , f and g are twice contin-
uously differentiable. Suppose that for b = (b1 , b2 ) = 0ℓ+m , there is a local solution x∗ such
∆
that S = {∇g j (x∗ ), j = 1, 2, . . . , ℓ} ∪ {∇f j (x∗ ), j ∈ J(x∗ )} is a linearly independent set of
vectors. Suppose that, together with the multipliers µ∗ ∈ Rm and λ∗ ∈ Rℓ , x∗ satisfies SOSC
with strict complementarity. Then there exists ǫ > 0 such that for all b ∈ B(0ℓ , ǫ) there
exists x(b), x(·) continuously differentiable, such that x(0ℓ ) = x∗ and x(b) is a strict local
minimizer for (5.52). Furthermore
The proof essentially follows the lines of that for the equality-constrained case.
Exercise 5.38 In the theorem above, instead of considering (5.55), one has to consider the
matrix
∇21,1 L(x∗ , λ∗ , µ∗ ) Dg(x∗ )T Df 1(x∗ )T · · · Df m (x∗ )T
Dg(x∗ )
D1,2,3 F (x∗ , λ∗ , µ∗ , 0ℓ+m ) =
µ∗1 Df 1 (x∗ ) f1 (x∗ )
.
.. . ..
.
∗ m ∗ ∗
µm Df (x ) fm (x )
Show that, under the assumption of the theorem above, this matrix is non-singular. (Hence,
again, one can solve locally for x(b), λ(b) and µj (b).)
Remark 5.28 Equilibrium price interpretation. For simplicity, consider a problem with a
single constraint,
min{f 0 (x) : f (x) ≤ 0m } with f : Rn → R.
(Extension to multiple constraints is straightforward.) Suppose that, at the expense of
paying a price of p per unit of b, the producer can, by acquiring some amount of b, replace
the inequality constraint used above by the less stringent
f (x) ≤ b , b > 0
(conversely, he/she will save p per unit if b < 0), for a total additional cost to the producer
of pb. From the theorem above, the resulting savings will be, to the first order
d
f 0 (x(0)) − f 0 (x(b)) ≃ − f (x(0))b = µ∗ b
db
Hence, if p < µ∗ , it is to the producers’ advantage to relax the constraint by relaxing the
right-hand side, i.e., by acquiring some additional amount of b. If p > µ∗ , to the contrary,
s/he can save by tightening the constraint. If p = µ∗ , neither relaxation nor tightening yields
any gain (to first order). Hence µ∗ is called the equilibrium price.
Note. As seen earlier, the linear independence condition in the theorem above (linear
independence of the gradients of the active constraints) insures uniqueness of the KKT
multipliers λ∗ and µ∗ . (Uniqueness is obviously required for the interpretation of µ∗ as
“sensitivity”.)
Exercise 5.39 Discuss the more general case
min{f 0 (x) : g(x, b1 ) = 0ℓ , f (x, b2 ) ≤ 0m }.
5.9 Duality
See [?]. Most results given in this section do not require any differentiability of the objective
and constraint functions. Also, some functions will take values on the extended real line
(including ±∞). The crucial assumption will be that of convexity. The results are global.
We consider the inequality constrained problem
min{f 0 (x) : f (x) ≤ 0m , x ∈ X} (P )
with f 0 : Rn → R, f : Rn → Rm and X is a given subset of Rn (e.g., X = Rn ) and the
inequality is meant componentwise. As before, we define the Lagrangian function by
m
X
L(x, µ) = f 0 (x) + µj f j (x)
j=1
We will see that under assumptions of convexity and a certain constraint qualification, the
following converse holds: if x∗ solves (P ) then ∃µ∗ ≥ 0m such that (5.56) holds. As we show
below (Proposition 5.9), the latter is equivalent to the statement that
min sup L(x, µ) = max inf L(x, µ)
x∈X µ≥0m µ≥0m x∈X
and that the left-hand side attains its minimum at x∗ and the right-hand side attains its
maximum at µ∗ . If this holds, strong duality is said to hold. In such case, one could compute
any µ∗ which globally maximizes ψ(µ) = inf L(x, µ), subject to the simple constraint µ ≥ 0.
x
Once µ∗ is known, (5.56) shows that x∗ is a minimizer of L(x, µ∗ ), unconstrained if X = Rn .
(Note: L(x, µ∗ ) may have other “spurious” minimizers, i.e., minimizers for which (5.56) does
not hold; see below.)
Instead of L(x, µ), we now consider a more general function F : Rn × Rm → R. First of
all, “weak duality” always holds.
Lemma 5.1 (Weak duality). Given two sets X and Y and a function F : X × Y → R,
where now only x is free. Taking inf on both sides (i.e., in the right-hand side) yields
x∈X
In the sequel, we will make use of the following result, of independent interest.
Proposition 5.9 Given two sets X and Y and a function F : X × Y → R, the following
statements are equivalent (under no regularity or convexity assumption)
(i) x∗ ∈ X, y ∗ ∈ Y and
(ii)
min{sup F (x, y)} = max{ inf F (x, y)}
x∈X y∈Y y∈Y x∈X
where the common value is finite and the left-hand side is attained at x∗ and the right-
hand side is attained at y ∗.
n o
Proof. ((ii)⇒(i)) Let α = min sup F (x, y) = max inf F (x, y) and let x∗ and y ∗ attain
x y y x
the ‘min’ in the first expression and the ‘max’ in the second expression, respectively. Then
Thus
F (x∗ , y ∗) ≤ α ≤ F (x∗ , y ∗)
and the proof is complete.
((i)⇒(ii))
inf sup F (x, y) ≤ sup F (x∗ , y) = F (x∗ , y ∗) = inf F (x, y ∗) ≤ sup inf F (x, y).
x y y x y x
inf sup F (x, y) = sup F (x∗ , y) = F (x∗ , y ∗) = inf F (x, y ∗) = sup inf F (x, y).
x y y x y x
Further, the first and fourth equalities show that the “inf” and “sup” are attained at x∗ and
y ∗ , respectively.
A pair (x∗ , y ∗) satisfying the conditions of Proposition 5.9 is referred to as a saddle point.
Exercise 5.41 The set of saddle points of a function F is a Cartesian product, that is, if
(x1 , y1 ) and (x2 , y2) are saddle points, then (x1 , y2 ) and (x2 , y1 ) also are. Further, F takes
the same value at all its saddle points.
Let us apply the above to L(x, µ). Thus, consider problem (P ) and let Y = {µ ∈ Rm : µ ≥
0}. Let p : Rn → R ∪ {+∞}, and ψ : Rm → R ∪ {−∞} be given by
0
f (x) if f (x) ≤ 0
p(x) = sup L(x, µ) =
µ≥0 +∞ otherwise
ψ(µ) = inf L(x, µ).
x∈X
Definition 5.10 It is said that duality holds (or strong duality holds) if equality holds in
(5.62).
Remark 5.29 Some authors use the phrases “strong duality” or “duality holds” to means
that not only there is no duality gap but furthermore the primal infimum and dual supremum
are attained at some x∗ ∈ X and µ∗ ∈ Y .
If duality holds and x∗ ∈ X minimizes p(x) over X and µ∗ solves the dual problem
it follows that
Remark 5.30 That some x̂ ∈ X minimizes L(x, µ∗ ) over X is not sufficient for x̂ to solve
(P ) (even if (P ) does have a global minimizer). [Similarly, it is not sufficient that µ̂ ≥ 0
maximize L(x∗ , µ) in order for µ̂ to solve (5.63); in fact it is immediately clear that µ̂
maximizing L(x∗ , µ) implies nothing about µ̂j for j ∈ J(x∗ ).] However, as we saw earlier,
(x̂, µ̂) satisfying both inequalities in (5.64) is enough for x̂ to solve (P ) and µ̂ to solve (5.63).
(with the min and the max being attained). Suppose we can easily compute a maximizer
µ∗ for the right-hand side. Then, by Proposition 5.9 and Exercise 5.40, there exists x∗ ∈ X
such that (5.56) holds, and such x∗ is a global minimizer for (P ). From (5.56) such x∗ is
among the minimizers of L(x, µ∗ ). The key is thus whether (5.65) holds. This is known as
(strong) duality. We first state without proof a more general result, about the existence of
a saddle point for convex-concave functions. (This and other related results can be found
in [?]. The present result is a minor restatement of Proposition 2.6.4 in that book.)
Theorem 5.20 Let X and Y be convex sets and let F : X × Y → R be convex in its first
argument and concave (i.e., −F is convex) in its second argument, and further suppose that,
for each x ∈ X and y ∈ Y , the epigraphs of F (·, y) and −F (x, ·) are closed. Further suppose
that the set of minimizers of sup F (x, y) is nonempty and compact. Then
y∈Y
We now prove this result in the specific case of our Lagrangian function L.
∆
Proposition 5.10 ψ(µ) = inf L(x, µ) is concave (i.e., −ψ is convex) (without convexity
x
assumption)
Proof. L(x, µ) is affine, hence concave, and the pointwise infimum of a set of concave functions
is concave (prove it!).
We will now see that convexity of f 0 and f and a certain “stability” assumption (related to
KTCQ) are sufficient for duality to hold. This result, as well as the results derived so far in
this section, holds without differentiability assumption. Nevertheless, we will first prove the
differentiable case with the additional assumption that X = Rn . Indeed, in that case, the
proof is immediate.
Theorem 5.21 Suppose x∗ solves (P ) with X = Rn , suppose that f 0 and f are differentiable
and that KTCQ holds, and let µ∗ be a corresponding KKT multiplier vector. Furthermore,
suppose f 0 and f are convex functions. Then µ∗ solves the dual problem, duality holds and
x∗ minimizes L(x, µ∗ ).
is convex, and it follows that x∗ is a global minimum for L(x, µ∗ ). Hence ψ(µ∗ ) = L(x∗ , µ∗ ).
It follows that µ∗ solves the dual, duality holds, and, from (5.66), x∗ solves
∇x L(x∗ , µ∗ ) = 0n
Remark 5.31 The condition above is also necessary for µ∗ to solve the dual: indeed if µ̂
is not a KKT multiplier vector at x∗ then ∇x L(x∗ , µ̂) 6= 0n so that x∗ does not minimize
L(·, µ̂), and (x∗ , µ̂) is not a saddle point.
Remark 5.32
1. The only convexity assumption we used is convexity of ℓ(x) = L(x, µ∗ ), which is weaker
than convexity of f 0 and f (for one thing, the inactive constraints are irrelevant).
2. A weaker result, called local duality is as follows: If the min’s in (5.61)-(5.63) are taken
in a local sense, around a KKT point x∗ , then duality holds with only local convexity
of L(x, µ∗ ). Now, if 2nd order sufficiency conditions hold at x∗ , then we know that
∇2xx L(x∗ , µ∗ ) is positive definite over the tangent space to the active constraints. If
positive definiteness can be extended over the whole space, then local (strong) convexity
would hold. This is in fact one of the ideas which led to the method of multipliers
mentioned above (also called augmented Lagrangian).
Exercise 5.42 Define again (see Method of Feasible Directions in section 5.7)
∗
− j∈J0 (x) µ∗ ∇f j (x)
h = P . (5.70)
|| j∈J0(x) µ∗j ∇f j (x)||2
h
Hint: first show that the given problem is equivalent to the minimization over h̃
∈ Rn+1
Remark 5.33 This shows that the search direction corresponding to Θ is the direction
opposite to the nearest point to the origin in the convex hull of the gradients of the active
constraints. Notice that applying duality has resulted in a problem (5.69) with fewer variables
and simpler constraints than the original problem (5.68). Also, (5.69) is a quadratic program
(see below).
We now drop the differentiability assumption on f 0 and f and merely assume that they are
convex. We substitute for (P ) the family of problems
and f¯(X) by
f¯(X) = {f¯(x) : x ∈ X}
On Figure 5.9, the cross indicates the position of f¯(x) for some x ∈ X; and, for some µ ≥ 0m ,
the oblique line represents the hyperplane Hx,µ orthogonal to (µ, 1) ∈ Rm+1 , i.e.,
µT f (x) + f 0 (x) = α,
i.e.,
z 0 = L(x, µ) − µT z.
ℜ
z0
(f(x),f 0 (x))
〈µ,f(x)〉
×
(x∈X)
L(x,µ)
f 0 (x) z 0 =f 0 (x)-〈µ,z-f(x)〉=L(x,µ)-〈µ,z〉
slope=-µ≤0
m
ℜ
z
Figure 5.9
In particular, the oblique line intersects the vertical axis at z 0 = L(x, µ).
Next, we define the following objects:
Ω(b) = {x ∈ X : f (x) ≤ b},
B = {b ∈ Rm : Ω(b) 6= ∅},
V : Rm → R ∪ {±∞}, with V (z) := inf {f 0 (x) : f (x) ≤ z}.
x∈X
V is the value function. It can take the values +∞ (when {x ∈ X : f (x) ≤ b} is empty) and
−∞ (when V is unbounded from below on {x ∈ X : f (x) ≤ b}).
Exercise 5.43 If f 0 , f are convex and X is a convex set, then Ω(b) and B and the epigraph
of V are convex sets (so that V is a convex function), and V is monotonic non-increasing.
(Note that, on the other hand, min{f 0 (x) : f (x) = b} need not be convex in b: e.g.,
f (x) = ex and f 0 (x) = x. Also, f¯(X) need not be convex (e.g., it could be just a curve as,
for instance, if n = m = 1).)
The following exercise points out a simple geometric relationship between epiV and f¯(X),
which yields simple intuition for the central result of this section.
Exercise 5.44 Prove that
cl(epiV ) = cl(f¯(X) + Rm+1
+ ),
where Rm+1
+ is the set of points in Rm+1 with non-negative components. Further, if for all z
such that V (z) is finite, the “min” in the definition of V is attained, then
epiV = f¯(X) + Rm+1
+ .
This relationship is portrayed in Figure 4.10, which immediately suggests that the “lower
tangent plane” to epiV with “slope” −µ (i.e., orthogonal to (µ, 1), with µ ≥ 0m ), intersects
the vertical axis at ordinate ψ(µ), i.e.,
inf{z 0 + µT z : (z, z 0 ) ∈ epiV } = inf L(x, µ) = ψ(µ) ∀µ ≥ 0m . (5.71)
x∈X
Exercise 5.45
= inf {z 0 + µT f (x)}
(z,z 0 )∈Rm+1 ,x∈X
(ii) there exists a non-vertical supporting line (supporting hyperplane) to epi V at (0, V (0)).
(A sufficient condition for this is that 0m ∈ int B.)
Note that if V (·) is continuously differentiable at 0, then −µ∗ is its slope where µ∗ is the
KKT multiplier vector. This is exactly the sensitivity result we proved in section 5.8!
In the convex (not necessarily differentiable) case, condition (ii) acts as a substitute
for KTCQ. It is known as the Slater constraint qualification (after Morton L. Slater, 20th
century American mathematician). It says that there exists some feasible x at which none
of the constraints is active, i.e., f (x) < 0. Condition (i), which implies convexity of epi V ,
implies the existence of a supporting hyperplane, i.e., ∃(µ, µ0 ) 6= 0m+1 , s.t.
and the epigraph property of epi V ((0, β) ∈ epi V ∀β > V (0)) implies that µ0 ≥ 0.
Exercise 5.46 Let S be convex and closed and let x ∈ ∂S, where ∂S denotes the boundary of
S. Then there exists a hyperplane H separating x and S. H is called supporting hyperplane
to S at x. (Note: The result still holds without the assumption that S is closed, but the proof
is harder. Hint for this harder result: If S is convex, then ∂S = ∂clS.)
Exercise 5.47 Suppose f 0 and f j are continuously differentiable and convex, and suppose
Slater’s constraint qualification holds. Then MFCQ holds at every feasible x∗ .
Under condition (ii), µ0 > 0, i.e., the supporting hyperplane is non-vertical. In particular
suppose that 0 ∈ int B and proceed by contradiction: if µ0 = 0 (5.72) reduces to µT z ≥ 0
for all (z, z 0 ) ∈ epi V , in particular for all z with kzk small enough; since (µ0 , µ) 6= 01+m ,
this is impossible. Under this condition, dividing through by µ0 we obtain:
Next, the fact that V is monotonic non-increasing implies that µ∗ ≥ 0m . (Indeed we can
keep z 0 fixed and let any component of z go to +∞.) Formalizing the argument made above,
we now obtain, since, for all x ∈ X, (f 0 (x), f (x)) ∈ epi V ,
implying that
f 0 (x∗ ) ≤ inf L(x, µ∗ ) = ψ(µ∗ ) .
x
Remark 5.34 Figure 5.10 may be misleading, as it focuses on the special case where m = 1
and the constraint is active at the solution (since µ∗ > 0). Figure 4.11 illustrates other cases.
It shows V (z) for z = γej , with γ a scalar and ej the jth coordinate vector, both in the case
when the constraint is active and in the case it is not.
To summarize: if x∗ solves (P ) (in particular, inf p(x) is attained and finite) and
x∈X
conditions (i) and (ii) hold, then sup ψ(µ) is attained and equal to f 0 (x∗ ) and x∗ solves
µ≥0
Note. Given a solution µ∗ to the dual, there may exist x minimizing L(x, µ∗ ) s.t. x does not
solve the primal. A simple example is given by the problem
L(x̂, µ∗ ) ≤ L(x, µ∗ ) ∀x
min{cT x : Gx = b1 , F x ≤ b2 } (5.73)
where
c ∈ Rn
G ∈ Rm×n
F ∈ Rk×n
For simplicity, assume that the feasible set is nonempty and bounded. Note that if n = 2
and m = 0, we have a picture such as that on Figure 5.12. Based on this figure, we make
the following guesses
1. If a solution exists (there is one, in view of our assumptions), then there is a solution
on a vertex (there may be a continuum of solutions, along an edge)
2. If all vertices adjacent to xi have higher cost, stop. Else, select an edge along which
the directional derivative of cT x is the most negative. Let xi+1 be the corresponding
adjacent vertex and iterate.
min{cT x : Ax = b, x ≥ 0} (5.74)
where c ∈ Rn , A ∈ Rm×n , b ∈ Rm
( c T v
v
v
)
G −G 0 b1
min −c w w = , w ≥ 0
F −F I b2
0 y y y
Hence, we do not lose any generality by considering (5.74) only. To give meaning to our first
guess, we need to introduce a suitable notion of vertex or extreme point.
Until the recent introduction of new ideas in linear programming (Karmarkar and others),
the only practical method for the solution of general linear programs was the simplex method.
The idea is as follows:
2. if xi is not a solution, pick among the components of xi which are zero, a component
such that its increase (xi remaining on Ax = b) causes a decrease in the cost function.
Increase this component, xi remaining on Ax = b, until the boundary of Ω is reached
(i.e., another component of x is about to become negative). The new point, xi+1 , is an
extreme point adjacent to xi with lower cost.
Obtaining an initial extreme point of Ω can be done by solving another linear program
min{Σǫj : Ax − b − ǫ = 0, x ≥ 0, ǫ ≥ 0} (5.76)
Exercise 5.49 Let (x̂, ǫ̂) solve (5.76) and suppose that
min{cT x : Ax = b, x ≥ 0}
has a feasible point. Then ǫ̂ = 0 and x̂ is feasible for the given problem.
In this set of conditions, all relations except for the next to last one (complementary slack-
ness) are linear. They can be solved using techniques analog to the simplex method (Wolfe
algorithm; see [?]).
Figure 5.10
Figure 5.11
〈 f1,x 〉 = b12
〈 f2,x 〉 = b22
Ω
∧
x •
〈 f4,x 〉 = b42
c 〈 f3,x 〉 = b32
〈 c,x 〉 = constant
Figure 5.12:
This chapter deals with a subclass of optimization problems of prime interest to controls
theorists and practitioners, that of optimal control problems, and with the classical field of
calculus of variations (whose formalization dates back to the late 18th century), a precursor
to continuous-time optimal control. Optimal control problem can be optimization problems
in finite-dimensional spaces (like in the case of discrete-time optimal control with finite
horizon), or in infinite-dimensional spaces (like in the case of a broad class of continuous-
time optimal control problems). In the latter case, finite-dimensional optimization ideas
often still play a key role, at least when the underlying state space is finite-dimensional.
Remark 6.1 Note at this point that problem (6.3) can be thought of as the “optimal
control” problem
Zb
minimize L(t, x(t), u(t))dt s.t. ẋ(t) = u(t) ∀t, x(a) = A, x(b) = B, u continuous,
a
(6.4)
where minimization is to be carried out over the pair (x, u). The more general ẋ = f (x, u),
with moreover the values of u(t) restricted to lie in some U (which could be the entire Rm )
amounts to generalizing Ω by imposing constraints on the values of ẋ in (6.4), viz.,
ẋ(t) ∈ f (x(t), U) ∀t
i.e., as state-dependent constraint on the control values. E.g., f (x, u) = sin(u) with U = Rm
yields the constraint |ẋ(t)| ≤ 1 for all t. In general, such constraint are not allowed within
the framework of the calculus of variations. If f (x, U) = Rn though (more likely to be
the case when U = Rn ) then the problem does fit within (6.3), via (6.4), but requires the
solution of an equation of the form v = f (x, u) for u.
While the tangent cone is norm dependent, the radial cone is not, so as a first approach
we base our analysis on the latter. Indeed, it turns out that much can be said about this
problem1 without need to specify a norm on X.
Proposition 6.1 If x∗ ∈ Ω is optimal for problem (6.3) then, ∀h ∈ X s.t. h(a) = h(b) = 0n ,
Z b
∗ ∗ ∗ ∗
Dx L(t, x (t), ẋ (t))h(t) + Du L(t, x (t), ẋ (t), )ḣ(t) dt = 0 (6.5)
a
Remark 6.2 Clearly, this results also holds for “stationary” points. E.g., see below the
discussion of the Principle of Least Action.
We now proceed to transform (6.5) to obtain a more manageable condition: the Euler–
Lagrange equation (Leonhard Euler, Swiss mathematician, 1707–1787). The following
derivation is simple but assumes that x∗ is twice continuously differentiable. (An alter-
native, which does not require such assumption, is to use the DuBois-Reymond Lemma: see,
e.g., [?, ?].) Integrating (6.5) by parts, one gets, for all h ∈ X with h(a) = h(b) = 0n ,
Z b Z b
d
∗ ∗
Dx L(t, x (t), ẋ (t))h(t)dt+[Du L(t, x (t), ẋ ∗ ∗
(t))h(t)]ba − (Du L(t, x∗ (t), ẋ∗ (t))) h(t)dt = 0
a a dt
i.e.,
Z b
∗ ∗ d ∗ ∗
Dx L(t, x (t), ẋ (t)) − Du L(t, x (t), ẋ (t)) h(t)dt = 0 (6.6)
a dt
d
Dx L(t, x∗ (t), ẋ∗ (t)) − Du L(t, x∗ (t), ẋ∗ (t)) = 0L(X,R) ∀t ∈ [a, b] (6.7)
dt
Indeed, it is a direct consequence of the following result.
then
f (t) = 0n ∀t ∈ [a, b].
H(τ, ξ, π, v) = π T v − L(τ, ξ, v)
and let
p∗ (t) = ∇u L(t, x∗ (t), u∗ (t))
ṗ∗ (t) = Dt ∇u L(t, x∗ (t), u∗ (t)) = ∇x L(t, x∗ (t), u∗ (t)) = −∇x H(t, x∗ (t), u∗ (t)).
Also,
∇u H(t, x∗ (t), u∗ (t)) = p∗ (t) − ∇u L(t, x∗ (t), u∗ (t)) = 0,
with u∗ (t) = ẋ∗ (t), and (2nd order necessary condition)
2. E.-L. amounts to a second order ordinary differential equation in x with 2 point bound-
ary conditions (x∗ (a) = A, x∗ (b) = B). Existence and uniqueness of a solution are not
guaranteed in general.
Among all the curves joining 2 given points (x1 , t1 ) and (x2 , t2 ) in R2 , find the one which
generates the surface of minimum area when rotated about the t-axis.
The area of the surface of revolution generated by rotating the curve x around the t-axis is
Z t2 p
J(x(·)) = 2π x(t) 1 + ẋ(t)2 dt, (6.8)
t1
so that
∂L √ ∂L xẋ
(x, ẋ) = √
(x, ẋ) = 1 − ẋ2 , ,
∂x ∂u 1 − ẋ2
and the Euler–Lagrange equation can be integrated to give
t + C1
x∗ (t) = C cosh (6.9)
C
where C and C1 are constants to be determined using the boundary conditions.
It can be shown that 3 cases are possible, depending on the positions of (x1 , t1 ) and (x2 , t2 )
1. There are 2 curves of the form (6.9) passing through (x1 , t1 ) and (x2 , t2 ) (in limit cases,
these 2 curves are identical). One of them solves the problem (see Figure 6.1).
2. There are 2 curves of the form (6.9) passing through (x1 , t1 ) and (x2 , t2 ). One of them
is a local minimizer. The global minimizer is as in (3) below (non smooth).
3. There is no curve of the form (6.9) passing through (x1 , t1 ) and (x2 , t2 ). Then there is
no smooth curve that achieves the minimum. The solution is not C 1 and is shown in
Figure 6.2 below (it is even not continuous).
x (x1,t1 ) (x2,t2 )
• •
(a) t
Figure 6.1:
surface = sum
of 2 disks
•
•
(b)
Figure 6.2:
Various extensions
The following classes of problems can be handled in a similar way as above.
– x(a) and x(b) may be unspecified, as well as either a or b (free time problems)
– some of the above may be constrained without being fixed, e.g.,
g(x(a)) ≤ 0
Theorem 6.2 (Legendre second-order necessary condition (for a weak minimum). Adrien-
Marie Legendre, French mathematician, 1752–1833.) If x∗ ∈ Ω is optimal for problem (6.3),
then
∇2u L(t, x∗ (t), ẋ∗ (t)) 0 ∀t ∈ [a, b].
ṗ∗ (t) = ∇x L(t, x∗ (t), u∗ (t)) = −∇x H(t, x∗ (t), p∗ (t), u∗ (t)) ∀t. (6.12)
Further,
∇u H(t, x∗ (t), p∗ (t), u∗ (t)) = −p∗ (t) + p∗ (t) = 0 ∀t. (6.14)
Finally, Legendre’s second-order condition yields
H(t, x∗ (t), p∗ (t), u∗ (t)) = maxn H(t, x∗ (t), p∗ (t), v), (6.16)
v∈R
we merely have (6.14) and (6.15), which are necessary conditions for u∗ (t) to be such maxi-
mizer.
Exercise. Verify that this (in particular equation (6.11)) is consistent with the exercise
immediately following Exercise 2.17 (Pontryagin’s Principle for the case of linear dynamics
and fixed terminal state).
Exercise. Reconcile definition (6.11) of p∗ (t) (in the case when the dynamics is ẋ = u) with
definition (3.13) used in the context of dynamic programming. [Hint: Invoke (HJB).]
where H is the Hamiltonian, which in the present case is also the Legendre-Fenchel transform
of the Lagrangian L(t, x, ·), viz.
also known as convex conjugate of L(t, x, ·). (Indeed, as the supremum of linear functions,
the Legendre-Fenchel transform is convex—in our context, in p.)
Remark 6.5 In view of Remark 6.1 and with equations (6.14)-(6.13)-(6.12)-(6.15) in hand,
it is tempting to conjecture that, subject to a simple modification, such “maximum principle”
still holds in much more general cases, when ẋ = u is replaced by ẋ = f (x, u) and u(t)
is constrained to lie in a certain set U for all t: Merely replace pT u by pT f (x, u) in the
definition (6.10) of H and, in (6.16), replace the unconstrained maximization by one over
U. This intuition turns out to be essentially correct indeed, as we will see below (and as we
have already seen, in a limited context, in section 2.3).
where
L(t, x(t), ẋ(t)) = T − V,
T and V being the kinetic and potential energies. Again, define
In classical mechanics, the potential energy does not depend on ẋ(t), while the kinetic
energy is of the form T = 12 ẋ(t)T M ẋ(t), where M is a symmetric, positive definite matrix.
Substituting into (6.17) yields p∗ (t) = M ẋ∗ (t). Hence, from (6.10),
H(t, x∗ (t), p∗ (t), ẋ∗ (t)) = p∗ (t)T ẋ∗ (t) − L(t, x∗ (t), ẋ∗ (t)) = ẋ∗ (t)M ẋ∗ (t) − T + V = T + V,
i.e., the pre-Hamiltonian evaluated along the trajectory that makes the action stationary is
indeed the total energy in the system. In this context, p∗ is known as the momentum. For
more details, see e.g., [?].
r(i, xi , ui ) ≤θ.
where
x0
..
.
xN
z= ∈ R(N +1)n+N m
u
0
.
..
uN −1
is an augmented vector on which to optimize and
N
X −1
0
f (z) = L(i, xi , ui ) + ψ(xN )
i=0
q0 (u0 ) x1 − x0 − f (0, x0 , u0)
.. ..
. .
¯
f (z) = qN −1 (uN −1 )
ḡ(z) = xN − xN −1 − f (N − 1, xN −1 , uN −1)
h0 (x0 ) g0 (x0 )
hN (xN ) gN (xN )
2 ∆
or equivalently, ∆xi = xi+1 − xi = f (i, xi , ui )
(the dynamics are now handled as constraints). If ẑ is optimal, the F. John conditions hold
for (6.19), i.e.,
∃( p0 , λ0 , . . . , λN −1 , ν0 , νN ) ≥ 0, p1 , . . . , pN , η0 , ηN , not all zero s.t.
|{z} | {z } | {z } | {z } | {z }
ψ q h dynamics g
∂ ∂f
⇒ p0 ∇x L(0, x̂0 , û0) − p1 + (0, x̂0 , û0 )T p1 + p0 = θ, (6.20)
∂x0 ∂x
where (note that p0 ∈ Rn is to be distinguished from p0 ∈ R)
∂g0 ∂h0
p0 := (x̂0 )T η0 + (x̂0 )T ν0 , (6.21)
∂x ∂x
∂ ∂f
⇒ p0 ∇x L(i, x̂i , ûi ) + pi − pi+1 − (i, x̂i , ûi )T pi+1 = θ i = 1, . . . , N − 1 (6.22)
∂xi ∂x
∂ ∂gN ∂hN
⇒ p0 ∇ψ(x̂N ) + pN + (x̂N )T ηN + (x̂N )T νN = θ (6.23)
∂xN ∂x ∂x
∂ ∂ ∂
⇒ p0 ∇u L(i, x̂i , ûi ) − f (i, x̂i , ûi )T pi+1 + qi (ûi )T λi = θ i = 0, . . . , N −(6.24)
1
∂ui ∂u ∂u
+ complementarity slackness
λTi qi (ûi ) = 0 i = θ, . . . , N − 1 (6.25)
ν0T h0 (x̂0 ) = 0 νNT
hN (x̂N ) = θ (6.26)
To simplify these conditions, let us define the pre-Hamiltonian function H : {0, 1, . . . , N −
1} × Rn × R1+n × Rm → R
H(i, x, [p0 ; p], u) = −p0 L(i, x, u) + pT f (i, x, u).
Then we obtain, with p̃i := [p0 ; pi ],
(6.20) + (6.22) ⇒ pi = pi+1 + ∇x H(i, x̂i , p̃i+1 , ûi ) i = 0, 1, . . . , N − 1 (6.27)
∂ ∂
− ∂u H(i, x̂i , p̃i+1 , ûi ) + ∂u qi (ûi )T λi = θ
(6.24) + (6.25) ⇒ i = 0, . . . , N − 1 (6.28)
λTi qi (ûi ) = 0
and (6.28) is a necessary condition (assuming KTCQ holds) for ûi the problem
max H(i, x̂i , p̃i+1 , v) s.t. qi (v) ≤ θ, i = 0, . . . , N − 1
v
to have v := ûi as a solution. (So this is a weak version of Pontryagin’s Principle.) Also,
(6.21)+(6.23) +(6.26) imply the transversality conditions
" #
∂g0
∂x
(x̂0 )
p0 ⊥ N ∂hj0 , (6.29)
∂x
(x̂0 ), j s.t. hj0 (x̂0 ) = 0
" #
∂gN
∂x
(x̂N )
pN + p0 ∇ψ(xN ) ⊥ N ∂hjN . (6.30)
∂x
(x̂N ), j s.t. hjN (x̂N ) =0
Remark 6.6 Simple examples show that it is indeed the case that a strong version of
Pontryagin’s Principle does not hold in general, in the discrete-time case. One such example
can be found, e.g., in [?, Section 4.1, Example 37]. A less restrictive condition than convexity,
that still guarantees that a strong Pontryagin’s principle holds, is “directional convexity”;
see [?, Section 4.2].
Remark 6.7 1. If KTCQ holds for the original problem, one can set p0 = 1. Then if
there are no constraints on xN (no gN ’s or hN ’s) we obtain that pN = −∇ψ(xN ).
2. If p0 6= 0, then without loss of generality we can assume p0 = 1 (this amounts to scaling
all multipliers).
4. The vector pi is known as the co-state or adjoint variable (or dual variable) at time
i. Equation (6.27) is the adjoint difference equation. Note that problems (6.31) are
decoupled in the sense that the kth problem can be solved for ûk as a function of x̂k
and p̂k+1 only. We will discuss this further in the context of continuous-time optimal
control.
Remark 6.8 If all equality constraints (including dynamics) are affine and the objective
function and inequality constraints are convex, then (6.28) is a necessary and sufficient
condition for the problem
to have a local minimum at ûi , in particular, a true Pontryagin Principle holds: there
exist vectors p0 , p1 , . . . , pN satisfying (6.27) (dynamics) such that ûi solves the constraint
optimization problem (6.31) for i = 1, . . . , N, and such that the transversality conditions
hold.
Remark 6.9 More general conditions under which a true maximum principle holds are
discussed in [?, Section 6.2].
Remark 6.10 (Sensitivity interpretation of pi .) From section 5.8, we know that, under
appropriate assumptions (which imply, in particular, that we can choose p0 = 1), if we
modify problem (6.18) by changing the ith dynamic equation (and only the ith one) from
to
−xi−1 − f (i − 1, xi−1 , ui−1 ) + xi = b,
then, if we denote by û(b) the new optimal control, we have
∇b J(û(b)) = pi .
b=θ
∇x V (i, xi ) = −pi ,
the discrete-time analog to (3.13). This can be verified using the dynamic-programming
approach of section 3.1. Equation (3.4)
yields
∂f
∇x V (i, x) = ∇x L(i, x, ûi ) + I + (i, x, ûi ) ∇x V (i + 1, x + f (i, x, ûi )).
∂x
dT x∗ ≤ dT x ∀x ∈ K (resp. dT x∗ ≥ dT x ∀x ∈ K)
dT (x − x∗ ) ≥ 0 ∀x ∈ K (resp. dT (x − x∗ ) ≤ 0 ∀x ∈ K)
i.e., from x∗ , all the directions towards a point in K make with d an angle of less (resp. more)
than 90◦ .
Proposition 6.2 Let u∗ ∈ U and let x∗ (t) = φ(t, t0 , x0 , u∗ ). Then u∗ is optimal if and only
if c is the inward normal to a hyperplane supporting K(tf , t0 , x0 ) at x∗ (tf ) (which implies that
x∗ (tf ) is on the boundary of K(tf , t0 , x0 )).
Further, as seen in Corollary 2.2, at every t ∈ [t0 , tf ], p∗ (t) is the outward normal at x∗ (t)
to K(t, t0 , x0 ).
Rn
x* (t 2)• p* (t 2)
t0 t1 t2 tf
Figure 6.3:
Exercise 6.6 (i) Assuming that U is convex, show that U is convex. (ii) Assuming that U
is convex, show that K(tf , t0 , z) is convex.
Remark 6.12 It can be shown that K(tf , t0 , z) is convex even if U is not, provided we
enlarge U to include all bounded measurable functions u : [t0 , ∞) → U: see Theorem 1A,
page 164 of [?].
From (2.45), we see that, if u∗ is optimal, i.e., if c = −p∗ (tf ) is the inward normal to a
hyperplane supporting K(tf , t0 , x0 ) at x∗ (tf ) then, for t0 ≤ t ≤ tf , x∗ (t) is on the boundary of
K(t, t0 , x0 ) and p∗ (t) is the outward normal to a hyperplane supporting K(t, t0 , x0 ) at x∗ (t).
This normal is obtained by transporting backwards in time, via the adjoint equation, the
outward normal p∗ (tf ) at time tf .
Suppose now that the objective function is of the form ψ(x(tf )), ψ continuously differentiable,
instead of cT x(tf ) and suppose K(tf , t0 , x0 ) is convex (see remark above on convexity of
K(t, t0 , z)).
We want to
minimize ψ(x) s.t. x ∈ K(tf , t0 , x0 )
we know that if x∗ (tf ) is optimal, then
Exercise 6.8 By following the argument in these notes, show that a version of Pontryagin’s
Principle also holds for a discrete-time linear optimal control problem. (We saw earlier that
it may not hold for a discrete nonlinear optimal control problem. Also see discussion in the
next section of these notes.)
minimize ψ(x(tf )) s.t. ẋ(t) = f (t, x(t), u(t)), a.e. t ∈ [t0 , tf ], u ∈ U, (6.33)
where x(t0 ) := x0 is prescribed and x is absolutely continuous. Unlike the linear case, we do
not have an explicit expression for φ(tf , t0 , x0 , u). We shall settle for a comparison between
the trajectory x∗ and trajectories x obtained by perturbing the control u∗ . By considering
strong perturbations of u∗ we will be able to still obtain a global Pontryagin Principle,
involving a global minimization of the pre-Hamiltonian. Some proofs will be omitted.
We assume that ψ is continuously differentiable, and impose the following regularity condi-
tions on (6.33) (same assumptions as in Chapter 3)
U = {u : [t0 , tf ] → U , u ∈ PC}
where ψ is the (continuously differentiable) terminal cost. However, unlike in the linear case
(convex reachable set), there is no explicit expression for this tangent cone. We will obtain
a characterization for a subset of interest of this cone. This subset will correspond to a
particular type of perturbations of x∗ (tf ). The specific type of perturbation to be used is
motivated by the fact that we are seeking a ‘global’ Pontryagin Principle, involving a ‘min’
over the entire U set.
Let D be the set of discontinuity points of u∗ . Let τ ∈ (t0 , tf ), τ 6∈ D, and let v ∈ U. For
ǫ > 0, we consider the strongly perturbed control uτ,ǫ defined by
(
v for t ∈ [τ − ǫ, τ )
uτ,v,ǫ (t) = ∗
u (t) elsewhere
This is often referred to as a “needle” perturbation. A key fact is that, as shown by the
following proposition, even though v may be very remote from u∗ (τ ), the effect of this
perturbed control on x is small. Such “strong” perturbations lead to a global Prontryagin’s
Principle even though local “tools” are used. Let xτ,v,ǫ be the trajectory corresponding to
uτ,v,ǫ . For small ǫ, this trajectory will be claose to x∗ and, because uτ,v,ǫ ∈ U, xτ,v,ǫ (tf ) will
be in K(tf , t0 , x0 ).
Proposition 6.3
xτ,v,ǫ (tf ) = x∗ (tf ) + ǫhτ,v + o(ǫ)
o(ǫ)
with o satisfying ǫ
→ 0 as ǫ → 0, and with
See, e.g., [?, p. 246-250] for a detailed proof of this result. The gist of the argument is that
(i)
Z τ
∗
xτ,v,ǫ (τ ) = x (τ − ǫ) + f (t, xτ,v,ǫ (t), v)dt = x∗ (τ − ǫ) + ǫf (τ, x∗ (τ ), v) + o(ǫ).
τ −ǫ
and
Z τ
∗ ∗
x (τ ) = x (τ − ǫ) + f (t, x∗ (t), u∗ (t))dτ = x∗ (τ − ǫ) + ǫf (τ, x∗ (τ ), u∗ (t)) + o′ (ǫ)
τ −ǫ
so that
xτ,v,ǫ (τ ) − x∗ (τ ) = ǫ[f (τ, x∗ (τ ), v) − f (τ, x∗ (τ ), u∗ (τ ))] + o′′ (ǫ).
and (ii) for t > τ , with ξ(t) := xτ,v,ǫ (t) − x∗ (t),
˙ := ẋτ,ǫ (t) − ẋ∗ (t) = f (t, xτ,ǫ (t), u∗(t)) − f (t, x∗ (t), u∗(t)) = ∂f (t, x∗ (t), u∗ (t))ξ(t) + o(ǫ).
ξ(t)
∂x
∂f
ṗ∗ (t) = − (t, x∗ (t), u∗(t))T p∗ (t) = −∇x H(t, x∗ (t), p∗ (t), u∗ (t)) a.e. t ∈ [t0 , tf ] (6.37)
∂x
p∗ (tf ) = −∇ψ(x∗ (tf )) (6.38)
with
H(t, x, p, u) = pT f (t, x, u) ∀t, x, u, p.
Then u∗ satisfies the Pontryagin Principle
H(t, x∗ (t), p∗ (t), u∗ (t)) = H(t, x∗ (t), p∗ (t)) (= max H(t, x∗ (t), p∗ (t), v) ) (6.39)
v∈U
for all t ∈ [t0 , tf ). Finally, if f does not depend explicitly on t, i.e., if f (t, x, u) = fˆ(x, u) for
all t, for some fˆ, then H(t, x∗ (t), p∗ (t), u∗ (t)) us constant.
∇ψ(x∗ (tf ))T Φ(tf , t)[f (t, x∗ (t), v) − f (t, x∗ (t), u∗ (t))] ≥ 0 ∀t ∈ (t0 , tf ), t 6∈ D, ∀v ∈ U.
Finally, for t ∈ D, the result follows from right-continuity of the two sides.
Remark 6.13 If u∗ ∈ U is locally optimal, in the sense that x∗ (tf ) is a local minimizer for ψ
in K(tf , t0 , x0 ), Pontryagin’s Principle still holds (with a global minimization over U). Why?
Such problems are known as a Lagrange problems, while terminal-state-cost problems are
known as Mayer problems.
Lagrange problems can be converted to the Mayer form. To this end, we consider the
augmented system with state variable x̃ = [x0 ; x] ∈ R1+n as follows
˜ L(t, x(t), u(t))
˙
x̃(t) == f (t, x(t), u(t)) a.e. t ∈ [t0 , tf ] := = f˜(t, x(t), u(t)) a.e. t ∈ [t0 , tf ],
f (t, x(t), u(t))
ψ(x̃(tf )) := x0 (tf )
with dynamics and constraints of the same form as before. After some simplifications, we
get the following result.
Theorem 6.4 Let u∗ ∈ U be optimal, and let x∗ be the associated state trajectory, and let
Remark 6.14 Note that the expression for H is formally quite similar to the negative of that
for the “Lagrangian” used in constrained optimization. Indeed L is the (integrand in the)
cost function, and f specifies the “constraints” (dynamics in the present case). (But beware!!
In the calculus of variations literature, the term “Lagrangian” refers to the integrand L in
problem (6.2).)
which is the dynamics used in section 6.2 (Discrete-time optimal control). Similarly, if we
let pi = p∗ (ti ), we can appropriately approximate the adjoint equation (6.37) with
∂fi
pi+1 = pi − (xi , ui )T pi ,
∂x
which is identical to (6.22), i.e., pi is the Lagrange multiplier associated with (6.42). Also,
recall that in Chapter 3), we noted in (3.13) that, when value function V is smooth enough,
which, again (see section 6.2) can be viewed in terms of the sensitivity interpretation of
Lagrange multipliers.
xi+1 = xi + f (i, xi , ui ), i = 0, . . . , N − 1,
and the problem of minimizing ψ(xN ), given a fixed x0 and the constraint that ui ∈ U for
all i. Suppose u∗i , i = 0, . . . , N − 1, is optimal, and x∗i , i = 1, . . . , N is the corresponding
optimal state trajectory. Given k ∈ {0, . . . , N − 1}, ǫ > 0, and w ∈ TC(u∗k , U), consider the
weak variation (
u∗k + ǫw + o(ǫ) i=k
(uk,ǫ )i =
u∗i otherwise
where o(·) is selected in such a way that uǫ,i ∈ U for all i, which is achievable due to the
choice of w. The next state value is then given by
(xk,ǫ )k+1 = x∗k+1 + f (k, x∗k , u∗k + ǫw + o(ǫ)) − f (k, x∗k , u∗k ) (6.43)
∂f
= x∗k+1 + ǫ (k, x∗k , u∗k )w + õ(ǫ). (6.44)
∂u
The final state is then given by
∂f
(xk,ǫ )N = x∗N + ǫΦ(N, k + 1) (k, x∗k , u∗k )w + ô(ǫ).
∂u
∂f
which shows that hk,w := Φ(N, k + 1) ∂u (k, x∗k , u∗k )w belongs to TC(x∗N , K(N, 0, x0 )). We now
can proceed as we did in the continuous-time case. Thus
∂f
∇ψ(x∗N )T Φ(N, k + 1) (k, x∗k , u∗k )w ≥ 0 ∀k, ∀w ∈ TC(u∗k , U).
∂u
Letting p∗k solve the adjoint equation,
∂f
pi = pi+1 + (i, xi , ui )pi+1 with p∗N = −∇ψ(x∗N ),
∂x
i.e., p∗k+1 = −Φ(N, k + 1)T ∇ψ(x∗N ), we get
∂f
(p∗k+1)T (k, x∗k , u∗k )w ≤ 0 ∀k, ∀w ∈ TC(u∗k , U).
∂u
Note that, if x∗ (·) is an optimal trajectory, then K(t, t0 , T0 ) contains K(t, t0 , x∗ (t0 )) for all t,
so that
TC(x∗ (tf ), K(tf , t0 , x∗ (t0 )) ⊆ TC(x∗ (tf ), K(tf , t0 , T0 )).
Since x∗ (tf ) ∈ K(tf , t0 , x∗ (t0 )), x∗ (tf ) is also optimal for (6.33) with fixed initial state x0 :=
x∗ (t0 ), and the necessary conditions we obtained for the fixed initial point problem apply to
the present problem, with x0 := x∗ (t0 )—but, of course, x∗ (t0 ) isn’t known. We now obtain
an additional condition (which will be of much interest, since we now have one more degree
of freedom). Let x∗ (t0 ) be the optimal initial point. From now on, the following additional
assumption will be in force:
Assumption. (x∗ (t0 ), g 0) is non-degenerate.
Let 0
∂g ∗
h∈N (x (t0 )) = TC(x∗ (t0 ), T0 ).
∂x
Then, given ǫ > 0 there exists some little-o function o such that x∗ (t0 ) + ǫh + o(ǫ) ∈ T0 .
For ǫ > 0 small enough, let xǫ (t0 ) = x∗ (t0 ) + ǫh + o(ǫ), and consider applying our optimal
control u∗ (for initial point x∗ (t0 )), but starting from xǫ (t0 ) as initial point. We now invoke
the following result, given as an exercise.
where Φ is as in Proposition 6.3. (Hint: Use the fact that Dǫ xǫ (t) follows linearized dynamics.
See, e.g., Theorem 10.1 in [?].)
Remark 6.15 An alternative derivation of this result follows by bserving that (excuse the
abuse of notation) 0
∂ψ ∗ ∂g ∗
(x (tf )h = 0 ∀h ∈ N (x (t0 )) .
∂x0 ∂x
and
∂ψ ∗ ∂ψ ∗ ∂x(tf ) ∂ψ ∗
(x (tf )) = (x (tf )) = (x (tf ))Φ(tf , t0 ).
∂x0 ∂x ∂x0 ∂x
is closed.
The first two assumptions amount to a type of constraint qualification for the constraint
x∗ (tf ) ∈ Tf . In contrast, the third one also involves the objective function.
Exercise 6.16 Consider minimizing f (x) subject to x ∈ Ω1 ∩Ω2 , with Ωi := {x : gi (x) ≥ 0},
i = 1, 2, where f, g1 , g2 : Rn → R are smooth. Let x̂ be a local minimizer for this
problem. Further assume that (i) ∇gi (x̂) 6= 0n , i = 1, 2, and (ii) TC(x, Ω1 ∩ Ω2 ) =
TC(x, Ω1 ) ∩ TC(x, Ω2 ). Show that, under such assumptions, KKT holds at x̂; i.e., with-
out further assumptions on f , there exists λ̂ ∈ R2 such that
we obtain, formally, the same Pontryagin Principle as above. While we do not know π, the
above guarantees that
f
∗ ∗ ∂g ∗
p (tf ) + ∇ψ(x (tf )) ⊥ N (x (tf )) .
∂x
This result is significantly harder to prove though. It is the central difficulty in the proof of
Pontryagin’s principle. Proofs are found in [?, ?, ?]. Also see [?].
H(τ, ξ, η̃, υ) := −η0 L(t, ξ, υ) + η T f (τ, ξ, υ), H(t, ξ, η̃) := supv∈U H(t, ξ, η̃, v),
where η̃ := [η0 ; η]. Suppose u∗ ∈ U is an optimal control, and x∗0 ∈ {ξ : g 0 (ξ) = 0ℓ0 ) an
optimal initial state, and let x∗ (·) be the associated optimal trajectory (with x∗ (t0 ) = x∗0 ).
Then there exists an absolutely continuous function p∗ : [t0 , tf ] → Rn and a scalar constant
p∗0 ≥ 0, with p̃∗ := [p∗0 ; p∗ ] not identically zero, that satisfy
T
∗ ∂H ∗ ∗ ∗
ṗ (t) = − (t, x (t), p̃ (t), u (t)) a.e. t ∈ [t0 , tf ]
∂x
H(t, x∗ (t), p̃∗ (t), u∗ (t)) = H(t, x∗ (t), p̃∗ (t)) ∀t ∈ [t0 , tf ).
∂g 0
Further, if ∂x
(x∗ (t0 )) has full row rank, then
∗ ∂g 0 ∗
p (t0 ) ⊥ N (x (t0 )) ,
∂x
∂g f
and if ∂x
(x∗ (tf )) has full row rank, then
∗ ∂g f ∗
p (tf ) + p∗0 ∇ψ(x∗ (tf )) ⊥N (x (tf )) .
∂x
Also, if f does not depend explicitly on t (i.e., if f (t, x, u) = fˆ(x, u) for all t, for some fˆ)
then m(t) := H(t, x∗ (t), p∗ (t)) is constant. Finally, if Assumptions TS hold for the associated
Mayer problem, then such [p∗0 ; p∗ ] exists for which p∗0 = 1.
Remark 6.16 When constraint qualification (6.48) does not hold for the associated Mayer
problem, then p∗0 may have to be equal to zero (with p∗ not identically zero). This makes
the result “weak”, just like the F. John condition of constrained optimization, because it
involves neither L nor ψ, i.e., does not involve the function being minimized.
Remark 6.17 It can be shown that Assumptions TS, (which imply that p∗0 can be chosen
strictly positive) also hold if a certain controllability condition is satisfied provided the control
values are unconstrained, i.e., U = Rn . See, e.g., [?].
We analyze this problem by converting the variable-length time interval [t0 , tf ] into a fixed-
length time interval [0, 1]. Define t(·), absolutely continuous, to satisfy
dt(s)
= α(s) a.e. s ∈ [0, 1]. (6.51)
ds
To fall back into a known formalism, we will consider s as the new time, t(s) as a new state
variables, and α(s) as a new control. Note that, clearly, given any optimal α∗ (·), there is an
equivalent constant optimal α∗ , equal to t∗f − t0 ; accordingly, among the controls (u(·), α(·))
that satisfy Pontryagin’s principle, we can choose to focus only on those for which α is
constant.4 The initial and final condition on t(s) are
t(0) = t0
t(1) free
d dt(s)
z(s) = αf (t(s), z(s), v(s)), = α a.e. s ∈ [0, 1]
ds ds
g 0 (z(0)) = 0ℓ0 , g f (z(1)) = 0ℓf .
Now suppose that (u∗ , tf ∗ , x∗0 ) is optimal for the original problem. Then the corresponding
(v ∗ , α∗ , x∗0 ), with α∗ = tf ∗ − t0 is optimal for the transformed problem. Expressing the known
conditions for this problem and performing some simplifications, we obtain the following
result.
and the additional necessary condition (related to the additional degree of freedom, on the
terminal time)
H(tf ∗ , x∗ (tf ∗ ), p̃∗ (tf ∗ )) = 0
where p̃∗ (t) = (p∗0 , p∗ (t)) and tf ∗ is the optimal final time. Again, if L and f do not explicitly
depend on t, then
H(t, x∗ (t), p̃∗ (t)) = constant = 0 ∀t
minimize tf subject to
ẋ(t) = f (t, x(t), u(t)) a.e. t ∈ [t0 , tf ], x absolutely continuous
x(t0 ) = x0 , x(tf ) = xf
u ∈ U, tf ≥ t0 (tf free)
with
H(t, x, p, u) = pT f (t, x, u) (L = 0)
H(t, x, p) = sup H(t, x, p, u)
v∈U
Also, if f does not depend explicitly on t then H(t, x∗ (t), p∗ (t)) is constant.
Exercise 6.18 Prove Theorem 6.7. Hint: Note that the statement does not involve a
scalar p∗0 . Indeed, when starting from Theorem 6.6 to solve this exercise, you will see that
p∗0 = H(tf ∗ , x∗ (tf ∗ ), p∗ (tf ∗ )), which yields the inequality H(tf ∗ , x∗ (tf ∗ ), p∗ (tf ∗ )) ≥ 0 in the
statement of Theorem 6.7.
1. Minimize the pre-Hamiltonian with respect to the control, yielding u∗ (t) in terms of
x∗ (t) and p∗ (t) at every time t;
2. Plug the expression for u∗ into the differential equations for x∗ and p∗ .
4. Plug x∗ (t) and p∗ (t) into the expression obtained for u∗ (t) (for each t) in step 1 above.
One difficulty with the scheme outlined above is that, in most cases of practical interest,
no “closed-form” solution can be obtained at step 1 for u∗ (t) in terms of (x∗ (t), p∗ (t)): the
maximization is to be carried out for fixed values of t, e.g., on a fine time grid, and this has
to be done concurrently with carrying out steps 3 and 4, since x∗ (t) and p∗ (t) must be known
at the “current” time in order to be able to proceed with the (numerical) minimization.
case 2. −p∗1 (0) + αp∗2 (0) < 0 p∗2 strictly monotonic decreasing. Then either
u∗ (t) = −1 ∀t
or
∗ −1 t < t̂ for some t̂
u (t) =
+1 t > t̂
or
∗
u (t) = +1 ∀t
case 3. −p∗1 (0) + αp∗2 (0) = 0 p∗2 constant, p∗2 (t) = α1 p∗1 (0). Then either
u∗ (t) = −1 ∀t
or
u∗ (t) = 1 ∀t
Thus we have narrowed down the possible optimal controls to the controls having the fol-
lowing property.
|u∗ (t)| = 1 ∀t
∗
u (t) changes sign at most once.
(iv) Integrate the state equation. The only piece of information we have not used yet is
the knowledge of x(0) and x(tf ). We now investigate the question of which among the
controls just obtained steers the given initial point to the origin. It turns out that
exactly one such control will do the job, hence will be optimal.
We proceed as follows. Starting from x = (0, 0), we apply all possible controls backward in
time and check which yield the desired initial condition. Let y(t) = x(t∗ − t).
1. u∗ (t) = 1 ∀t
We obtain the system
2. u∗ (t) = −1 ∀t
β eαt − 1 β
y1 (t) = − (−t + ), y2(t) = − (1 − eαt )
α α α
Also, eliminating t yields
1 β α
y1 = − log(1 + y2 ) + y2 .
α α β
3. Suppose now that v ∗ (t) := u∗ (t∗ − t) = +1 until some time t̂, and −1 afterward. Then
the trajectory for y is of the type OCD (y1 must keep increasing while y2 < 0). If
u∗ (t) = −1 first, then +1, the trajectory is of the type OEF.
1
A
D
C
-1
+1
0
2
-1
+1
E
B
F
Figure 6.4: “+1”/“−1” indicate values of u∗ (t) in/on the associated regions/curves; (α < 1
is assumed)
The reader should convince himself/herself that one and only one trajectory passes through
any point in the plane. Thus the given control, inverted in time, must be the optimal control
for initial conditions at the given point (assuming that an optimal control exists).
We see then that the optimal control u∗ (t) has the following properties, at each time t
if x∗ (t) is above BOA or on OB u∗ (t) = −1
if x∗ (t) is below BOA or on OA u∗ (t) = 1
Thus we can synthesize the optimal control in feedback form: u∗ (t) = ψ(x∗ (t)) where the
function ψ is given by
1 if (x1 , x2 ) is below BOA or on OA
ψ(x1 , x2 ) =
−1 above BOA or on OB
BOA is called the switching curve.
final state is free. Since the final state is free, we can select p∗0 = 1, so the pre-Hamiltonian
H is given by
1
H(t, x, p, u) = − (xT L(t)x + uT R(t)u) + pT (A(t)x + B(t)u).
2
We first minimize H(t, x∗ (t), p∗ (t), v) with respect to v in order to find u∗ in terms of t, x∗ (t),
and p∗ (t). Since U = Rn , the Pontryagin Principle yields, as R(t) > 0 ∀t,
Next, we plug this expression into the adjoint equation and state equation, yielding
ṗ∗ (t) = −AT (t)p∗ (t) + L(t)x∗ (t)
(S)
ẋ∗ (t) = A(t)x∗ (t) + B(t)R(t)−1 B(t)T p∗ (t)
provided Φ11 (1, t) is non singular ∀t, which was proven to be the case (since L(t) is positive
semi-definite; see Theorem 2.1). Now let
so that p∗ (t) = K(t)x∗ (t). We now show that K(t) satisfies a fairly simple equation. Note
that K(t) does not depend on the initial state x0 . From (6.54), p∗ (t) = K(t)x∗ (t). Differen-
tiating, we obtain
Since K(t) does not depend on the initial state x0 , this implies
For the same reason, p(1) = 0 implies K(1) = 0. Equation (6.57) is a Riccati equation. It
has a unique solution, which is a symmetric matrix. Note that we have
which is an optimal feedback control law. This was obtained in Chapter 2 using elementary
arguments.
Exercise 6.19 (Singular control. From [?].) Obtain the minimum-time control to bring the
state from [1; 0] to the origin under the dynamics
where u ∈ U and u(t) ∈ U := [−1.1] for all t. Show by inspection that the sole optimal
control u∗ is identically zero. Show that, as asserted by Pontryagin’s Principle, there exists
a p∗ satisfying the conditions of the principle, but that such p∗ is such that, at every time t,
the pre-Hamiltonian along (x∗ , p∗ ) is minimized by every v ∈ [−1, 1], so that Pontryagin’s
Principle is of no help for solving the problem. When such situation arises (which is not
that rare in real-life problems), the term singular control (or singular arc, which refers to the
time portion of the curve u∗ (·) on which Pontryagin’s Principle is of no help) is used.
Note. Some of the material contained in this appendix (and to a lesser extent in the second
appendix) is beyond what is strictly needed for this course. We hope it will be helpful to
many students in their research and in more advanced courses.
References: [?], [?, Appendix A]
Definition A.1 Let F = R or C and let V be a set. V is a vector space (linear space)
over F if two operations, addition and scalar multiplication, are defined, with the following
properties
(a) ∀x, y ∈ V, x + y ∈ V and V is an Abelian (aka commutative) group for the addition
operation (i.e., “+” is associative and commutative, there exists an additive identity
0V and every x ∈ V has an additive inverse −x).
(b) ∀α ∈ F, x ∈ V, ∃αx ∈ V and
(i) ∀x ∈ V, ∀α, β ∈ F
1x = x, α(βx) = (αβ)x, 0x = 0V , α0V = 0V
(ii) x, y ∈ V, ∀α, β ∈ F
α(x + y) = αx + αy
(α + β)x = αx + βx
If F = R, V is said to be a real vector space. If F = C, it is said to be a complex vector
space. Elements of V are often referred to as “vectors” or as “points”.
Exercise A.1 Let x ∈ V , a vector space. Prove that x + x = 2x.
In the context of optimization and optimal control, the primary emphasis is on real vector
spaces (i.e., F = R). In the sequel, unless explicitly indicated otherwise, we will assume this
is the case.
Example A.1 R, Rn , Rn×m (set of n×n real matrices); the set of all univariate polynomials
of degree less than n; the set of all continuous functions f : Rn → Rk ; the set C[a, b] of
all continuous functions over an interval [a, b] ⊂ R. (All of these with the usual + and ·
operations.) The 2D plane (or 3D space), with an origin (there is no need for coordinate
axes!), with the usual vector addition (parallelogram rule) and multiplication by a scalar.
Exercise A.2 Show that the set of functions f : R → R such that f (0) = 1 is not a vector
space.
Definition A.3 Let V be a linear space. The family of vectors {x1 , . . . , xn } ⊂ V is said to
be linearly independent if any relation of the form
α1 x1 + α2 x2 + . . . + αn xn = 0
implies
α1 = α2 = . . . = αn = 0.
Definition A.5 For i = 1, . . . , n, let ei ∈ Rn be the n-tuple consisting of all zeros, except
for a one in position i. Then {e1 , . . . , en } is the canonical basis for Rn .
Exercise A.4 Let V be a vector space and suppose {b1 , . . . , bn } is a basis for V . Prove
that,Pgiven any x ∈ V , there exists a unique n-tuple of scalars, {α1 , . . . , αn } such that
x = ni=1 αi bi . (Such n-tuple referred to as the coordinate vector of x in basis {b1 , . . . , bn }.)
Exercise A.5 Suppose {b1 , . . . , bn } and {b′1 , . . . , b′m } both form bases for V . Then m = n.
Definition A.6 If a linear space V has a basis consisting of n elements then V is said to
be finite-dimensional or of dimension n. Otherwise, it is said to be infinite-dimensional.
Example A.2 Rn is n-dimenstional. The set Rn×m of n × m real matrices form an nm-
dimensional vector space. Univariate polynomials of degree < n form an n-dimensional
vector space. Points in the plane, once one such point is selected to be the origin (but no
coordinate system has been selected yet), form a 2-dimensional vector space. (Come up with
a basis for each of the preceding examples!) C[a, b] is infinite-dimensional. The set of all
univariate polynomials form an infinite-dimensional vector space, and so does that set of all
scalar sequences with no more than finitely many nonzero entries. These last two examples
are “isomorphic” to each other.
Exercise A.6 Prove that the vector space of all univariate polynomials is infinite-dimensional.
A normed vector space is a pair (V, k · k) where V is a vector space and k · k is a norm on
V . Often, when the specific norm is irrelevant or clear from the context, we simply refer to
“normed vector space V ”.
n
n
1/2 n
1/p
n
P P 2
P p
Example A.3 In R , ||x||1 = |xi |, ||x||2 = (xi ) , ||x||p = (xi ) , p ∈
i=1 i=1 i=1
[1, ∞), ||x||∞ = max |xi |; in the space of bounded continuous functions f : R → R, ||f ||∞ =
i
1 1/p
R p
sup |f (t)|; in C[0, 1], kf kp = |f (t)| dt , p ∈ [1, ∞).
t 0
Note that the p-norm requires that p ≥ 1. Indeed, when p < 1, the triangle inequality does
not hold. E.g., take p = 1/2, x = (1, 0), y = (0, 1).
Once the concept of norm has been introduced, one can talk about balls and convergent
sequences.
Definition A.8 Given a normed vector space (V, k · k), a sequence {xn } ⊂ V is said to be
convergent (equivalently, to converge) to x∗ ∈ V if kxn − x∗ k → 0 as n → ∞.
Remark A.1 Examples of sequences that converge in one norm and not in another are well
known. For example, it is readily checked that, in the space P of univariate polynomials,
equivalently, of scalar sequences with only finitely many nonzero terms, the sequence {z k }
(i.e., the kth term in the sequence is the monomial given by the kth power of the variable)
does not converge in normP 1 k · k1 (sum of absolute values of coefficients) but converges to
zero in the norm ||p|| = |p | where pi is the coefficient of the ith power term. As another
i i
example consider the sequence of piecewise continuous function xk from [0, 1] to R with
xk (t) = k for t ∈ [0, (1/k 2 )] and 0 otherwise. Check that this sequence converges to θ in
norm k · k2 but does not converge in norm k · k∞ . Examples where a sequence converges to
two different limits in two different norms are more of a curiosity. The following one is due
to Tzvetan Ivanov from Catholic University of Louvain (UCL) and Dmitry Yarotskiy from
Ludwig Maximilian Universität P München. Consider the space P defined above, and for a
polynomial p ∈ P , write p(z) = i pi z i . Consider the following two norms on P :
|pi |
kpka = max |p0 |, max ,
i≥1 i
( )
X |pi − p0 |
kpkb = max |p0 + pi |, max .
i≥1
i≥1 i
(Note that the coefficients pi of p in the basis {1, z 1 , z 2 , ...}, used in norm a, are replaced in
norm b by the coefficients of p in the basis {1, z 1 − 1, z 2 − 1, ...}.) As above, consider the
sequence {xk } = {z k } of monomials of increasing power. It is readily checked that xk tends
to zero in norm a, but that it tends to the “constant” polynomial z 0 = 1 in norm b, since
kxk − 1kb = k2 tends to zero.
Definition A.9 Given a normed vector space (V, k · k), a sequence {xn } ⊂ V is said to be
a Cauchy sequence if kxn − xm k → 0 as n, m → ∞, i.e., if for every ǫ > 0 there exists N
such that n, m ≥ N implies kxn − xm k < ǫ.
Inner-product spaces
Definition A.10 Let V be a (possibly complex) vector space and let F be either R or C.
The function h·, ·i : V × V → F is called an inner product (scalar product) if
hy, xi = hx, yi ∀x, y ∈ V
hx, αy + βzi = αhx, yi + βhx, zi ∀x, y, z, ∈ V, α, β ∈ F
hx, xi > 0 ∀x 6= θ
A vector space endowed with an inner-product is termed inner-product space, or pre-Hilbert
space. It is readily checked that, if h·, ·i is an inner product on V , then the function k · k
given by
kxk = hx, xi1/2
is a norm on V (the norm induced by the inner product). (Check it.) Hence every inner-
product space is a normed vector space. Unless otherwise noted, the notation kxk, when x
belongs to an inner-product space refers to hx, xi1/2 .
Remark A.2 Some authors use a sightly different definition for the inner product, with
the second condition replaced by hαx, yi = αhx, yi, or equivalently hx, αyi = ᾱhx, yi. Note
that the difference is merely notational, since (x, y) := hy, xi satisfies such definition. The
definition given here has the advantage that it is satisfied by the standard dot product in
Cn , hx, yi := x∗ y = x̄T y, rather than by the slightly less “friendly” xT ȳ. When F = R, these
two definitions are equivalent, given the symmetry property hy, xi = hx, yi.)
Example A.4 Let V be (real and) finite-dimensional, and let {bi }ni=1 be a basis. Then
n
P
hx, yi = ξi ηi , where ξ ∈ Rn and η ∈ Rn are the vectors of coordinates of x and y in basis
i=1
{bi }ni=1 , is an inner product. It is known as the Euclidean inner product associated to basis
{bi }ni=1 .
The following exercise characterizes all inner products on finite-dimensional vector spaces.
Exercise A.8 Let V be an n-dimensional inner-product space, with a basis {bi }. Prove the
following statement. A mapping h·, ·i : V × V → R is an inner product on V if and only if
there exists a symmetric positive definite matrix M such that
hx, yi = ξ T Mη ∀x, y ∈ V,
Example A.5 V = C[t0 , tf ], the space of all continuous functions from [t0 , tf ] to R, with
Ztf
hx, yi = x(t)y(t) dt.
t0
Example A.6 V = C[t0 , tf ]m , the space of continuous functions from [t0 , tf ] to Rm . For
x(·) = (ξ1 (·), . . . , ξm (·)), y(·) = (η1 (·), . . . , ηm (·))
Ztf X
m Ztf
hx, yi = ξi (t)ηi (t) dt = x(t)T y(t) dt.
t0 i=1 t0
This inner product is again known as the L2 inner product. The same inner product is valid
for the space of piecewise-continuous functions U considered in Chapter 2.
Exercise A.9 (Gram matrix). Let V be an inner-product space, let v1 , . . . , vk ∈ V and let
G be a k × k matrix with (i, j) entry given by Gij := hvi , vj i. Then G θ, and G ≻ θ if and
only if the vi s are linearly independent.
Exercise A.10 Let V be the vector space of univariate quadratic polynomials (more pre-
cisely, polynomials of degree no higher than two) over [0, 1], endowed with the inner product
Z 1
hp, qi := p(t)q(t)dt ∀p, q ∈ V.
0
Exercise A.11 Prove the CBS inequality. [Hint: hx + αy, x + αyi ≥ 0 ∀α ∈ R.]
Exercise. Prove that for all y ∈ V , h·, yi is continuous on V (so that, if {xk } → x∗ ,
hxk , yi → hx∗ , yi).
Theorem A.2 (Parallelogram law.) In an inner-product space V , the sum of the squares
of the norms of the two diagonals of a parallelogram is equal to the sum of the squares of the
norms of its four sides, i.e., for every x, y ∈ V ,
Example A.7 Equality may not hold even when S is a subspace. E.g., let V be the space
of continuous functions with the L2 inner product, and S ⊂ V the set of all polynomials.
Then S 6= (S ⊥ )⊥ = V . (Indeed, S is not closed.)
Exercise A.15 Consider a plane (e.g., a blackboard or sheet of paper) together with a point
in that plane declared to be the origin. With an origin in hand, we can add vectors (points)
in the plane using the parallelogram rule, and multiply vectors by scalars, and it is readily
checked that all vector space axioms are satisfied; hence we have a vector space V . Two non-
collinear vectors e1 and e2 of V form a basis for V . Any vector x ∈ V is now uniquely specified
by its components in this basis; let us denote by xE the column vector of its components. Now,
let us say that two vectors x, y ∈ V are perpendicular if the angle θ(x, y) between them (e.g.,
measured with a protractor on your sheet of paper) is π/2, i.e., if cos θ(x, y) = 0. Clearly,
in general, (xE )T y E = 0 is not equivalent to x and y being perpendicular. (In particular,
of course, (eE T E E T E T
1 ) e2 = 0 (since e1 = [1, 0] and e2 = [0, 1] ), while e1 and e2 may not be
perpendicular to each other.) Question: Determine a symmetric positive-definite matrix S
such that hx, yiS := (xE )T Sy E = 0 if and only if x and y are perpendicular.
Then {e1 , . . . , en } is an orthonormal basis for V , i.e., kei k2 = 1 for all i, and hei , ej i = 0 for
all i 6= j (Check it).
Exercise A.16 Prove the following, which shows that Definition A.12 is valid. The inter-
section ∩α Sα of an arbitrary (possibly uncountable) family of closed sets is closed. The union
∪α Sα of an arbitrary (possibly uncountable) family of open sets is open.
Exercise A.18 Let V be a normed vector space and let S ⊂ V . Show that the closure of S
is the set of all limit points of sequences of S that converge in V .
Exercise A.19 Show that a subset S of a normed vector space is open if and only if given
any x̂ ∈ S there exists ǫ > 0 such that {x : kx − x̂k < ǫ} ⊂ S.
Exercise A.20 Show that, in a normed linear space, every finite-dimensional subspace is
closed. In particular, all subspaces of Rn are closed.
Example A.8 Given a positive integer n, the set of polynomials of degree ≤ n in one vari-
able over [0,1] is a finite-dimensional subspace of C[0, 1]. The set of all univariate polynomials
over [0,1] is an infinite-dimensional subspace of C[0, 1]; it is not closed in either of the norms
of Example A.3 (prove it).
Exercise A.21 Given any set E in an inner product space, E ⊥ is a closed subspace (in the
norm derived from the inner product).
Definition A.13 A set S in a normed vector space is bounded if there exists ρ > 0 s.t.
S ⊂ {x : kxk ≤ ρ}
Remark A.3 The concept of compact set is also used in more general “topological spaces”
than normed vector spaces, but with a different definition (“Every open cover includes a
finite sub-cover”). In such general context, the concept introduced in Definition A.14 is
referred to as “sequential compactness” and is weaker than compactness. In the case of
normed vector spaces (or, indeed, of general “metric spaces”), compactness and sequential
compactness are equivalent.
Example A.9 The “simplest” infinite-dimensional vector space may be the space P of
univariate polynomials (of arbitrary degrees), or equivalently the space of finite-length se-
quences (infinite sequences with finitely many nonzero entries). Consider P together with
the ℓ∞ norm (maximum absolute value among the (finitely many) non-zero entries). The
closed unit ball in P is not compact. For example, the sequence xk , where xk is the monomial
z k , z being the unknown, which clearly belongs to the unit ball, does not have a converging
sub-sequence. Similarly, the close unit ball B in ℓ1 (absolutely summable real sequences) is
not compact. For example, the following continuous function is unbounded over B (example
due to Nuno Martins):
1 1 1
f (x) = max{xn } if xn ≤ ∀n, and + max{n(xn − )} otherwise.
2 2 2
In fact, it is a important result due to Riesz that the closed unit ball of a normed vector
space is compact if and only if the space if finite-dimensional. (See, e.g., [?, Theorem 6,
Ch. 5].)
Definition A.16 Let (V, k · kV ) and (W, k · kW ) be normed spaces, and let f : V → W . Then
f is continuous at x̂ ∈ V if for every ǫ > 0, there exists δ > 0 such that kf (x) − f (x̂)kW < ǫ
for all x such that kx − x̂kV < δ. If f is continuous at x̂ for all x̂ ∈ V , it is said to be
continuous.
Exercise A.23 Prove that, in any normed vector space, the norm is continuous with respect
to itself.
Exercise A.24 Let V be a normed space and let S be a compact set in V . Let f : V → R
be continuous. Then there exists x, x̄ ∈ S such that
Exercise A.25 Let f : V → R be continuous, V a normed vector space. Then, for all
α ∈ R, the sub-level set {x : f (x) ≤ α} is closed.
For a given vector space, it is generally possible to define many different norms.
Norm equivalence
Definition A.18 Two norms k · ka and k · kb on a same vector space V are equivalent if
there exist N, M > 0 such that ∀x ∈ V, N||x||a ≤ ||x||b ≤ M||x||a .
Exercise A.27 Verify that the above is a bona fide equivalence relation, i.e., that it is
reflexive, symmetric and transitive. (Example: Similarity of n × n matrices is an equivalence
relation.)
We will see that equivalent norms can often be used interchangeably. The following result
is thus of great importance.
Exercise A.28 Prove that, if V is a finite-dimensional vector space, all norms on V are
equivalent. [Hint. First select an arbitrary basis {bi }ni=1 for V . Then show that k · k∞ :
V → R, defined by kxk∞ := max |xi |, where the xi ’s are the coordinates of x in basis {bi },
is a norm. Next, show that, if k · k is an arbitrary norm, it is a continuous function from
(V, k · k∞ ) to (R, | · |). Finally, conclude by invoking Exercise A.24. ]
Exercise A.29 Does the result of Exercise A.28 extend to some infinite-dimensional con-
text, say, to the space of univariate polynomials of arbitrary degrees? If not, where does your
proof break down?
Exercise A.30 Suppose that k · ka and k · kb are two equivalent norms on a vector space
1/k
V and let the sequence {xk } ⊂ V be such that the sequence {kxk ka } converges. Then
1/k
the sequence {kxk kb } also converges and both limits are equal. Moreover, if V is a space
of matrices and xk is the kth power of a given matrix A, then the limit exists and is the
spectral radius ρ(A), i.e., the radius of the smallest disk centered at the origin containing all
eigenvalues of A.
Exercise A.31 Let {xi } ⊂ V and k.ka and k.kb be 2 equivalent norms on V . Then a set
S us open (resp. closed) w.r.t. norm k.ka if and only if it is open (resp. closed) w.r.t. norm
k.kb . Furthermore
(i) {xi } converges to x∗ with respect to norm a if and only if it converges to x∗ with respect
to norm b.
(ii) {xi } is Cauchy w.r.t. norm a if and only if it is Cauchy w.r.t. norm b
Hence, in Rn , we can talk about converging sequences and Cauchy sequences without
specifying the norm.
Exercise A.32 Suppose {xk } ⊂ Rn is such that, for some b ∈ Rn and α > 0, kxk+1 −xk k ≤
αbT (xk+1 − xkP
) for all k. Prove that, if {bT xk } is bounded, then {xk } converges. Hint: Show
that the sum N k=0 kx
k+1
− xk k remains bounded as N → ∞, and that this implies that {xk }
is Cauchy. Such situation may arise when attempting to construct a maximizing sequence
for the maximization of bT x over a certain set.
Hence every finite-dimensional vector space is complete. Complete normed spaces are
known as Banach spaces (Stefan Banach, Polish mathematician, 1892–1945). Complete
inner product spaces (with norm derived from the inner product) are known as Hilbert
spaces (David Hilbert, German mathematician, 1862–1943). Rn is a Hilbert space.
Example A.10 C[0, 1] with the sup norm is Banach. The vector space of polynomials over
[0,1], with the sup norm, is not Banach, nor is C[0, 1] with an Lp norm, p finite. The space
of square-summable real sequences, with norm derived from the inner product
v
u∞
uX
hx, yi = t xi yi
i=1
is a Hilbert space.
Exercise A.34 Exhibit an example showing that the inner product space of Example A.5
is not a Hilbert space. (Hence the set U of admissible controls is not complete. Even when
enlarged to include piecewise-continuous functions it is still not complete.)
While the concepts of completeness and closedness are somewhat similar in spirit, they
are clearly distinct. In particular, completeness applies to vector spaces and closedness
applies to subsets of vectors spaces. Yet, for example, the vector space P of univariate
polynomials is not complete under the sup norm, but it is closed (as a subset of itself), and
its closure (in itself) is itself; indeed, all vector spaces are closed subsets of themselves. Note
however that P can also be thought of as a subspace of the (complete under the sup norm)
space C([0, 1]) of continuous functions over [0, 1]. Under the sup norm, P is not a closed (in
C([0, 1])) subspace. (Prove it.) More generally, closedness and completeness are related by
the following result.
Theorem A.3 Let V be a normed vector space, and let W be a Banach space that contains
a subspace V ′ with the properly that V and V ′ are isometric normed vector spaces. (Two
normed vector spaces are isometric if they are isomorphic as vector spaces and the isomor-
phism leaves the norm invariant.) Then V ′ is closed (in W ) if and only if V is complete.
Furthermore, given any such V there exists such W and V ′ such that the closure of V ′ (in
W ) is W itself. (Such W is known as the completion of V . It is isomorphic to a certain
normed space of equivalence classes of Cauchy sequences in V .) In particular, a subspace S
of a Banach space V is closed if and only if it is complete as a vector space (i.e., if and only
if it is a Banach space).
You may think of incomplete vector spaces as being “porous”, with pores being elements of
the completion of the space. You may also think of non-closed subspaces as being porous;
pores are elements of the “mother” space whenever that space is complete.
Exercise A.35 Given two subspaces S and T of V , V = S ⊕ T if and only if for every
v ∈ V there is a unique decomposition v = s + t such that s ∈ S and t ∈ T .
H = S ⊕ S ⊥.
Linear maps
Definition A.21 Let V, W be vector spaces. A map L : V → W is said to be linear if
R(L) = {Lx : x ∈ V } ⊆ W
N (L) = {x ∈ V : Lx = θW } ⊆ V.
Exercise A.39 Let V and W be vector spaces, with V finite-dimensional, and let L : V →
W be linear. Then R(L) is also finite-dimensional, of dimension no larger than that of V .
Exercise A.40 Prove that a linear map A : Rn → Rm is surjective if and only if the
matrix that represents it has full row rank, and that it is injective if and only if the matrix
that represents is has full column rank.
The set of bounded linear maps from V to W is a vector space. It is denoted by B(V, W ).
Let V be C[0, 1] with the L1 norm, let W = R, and let Lx = x(0); L is a linear map.
Then, kLxk reaches arbitrarily large values without kxk being large, for instance, on the unit
ball in L1 : with xk (t) := k exp(−kt), kxk k1 = 1 − exp(−k) < 1 for all k > 0, but x(0) = k
becomes arbitrarily large as k increases. Such linear map is said to be “unbounded”. For
another example, let V be the vector space of continuously differentiable functions on [0, 1]
with kxk = max |x(t)|. Let W = R and let L be defined to Lx = x′ (0). Then L is an
t∈[0,1]
unbounded linear map. (Think of the sequence xk (t) = sin(kt).)
Exercise A.42 Let V be a finite-dimensional normed vector space, and let L be a linear
map over V . Prove that L is bounded.
Unbounded linear maps exist whenever that space is infinite dimensional, as shown with
the following example with the “smallest” infinite-dimensional space.
Example A.11 [?, Example 4, p.105] On the space of finitely nonzero infinite sequences
with norm equal to the maximum of the absolute values of the entries, define, for x :
{ξ1 , . . . , ξn , 0, 0, . . .},
∞
X
f (x) = kξk .
k=1
The functional f is clearly linear but unbounded.
Now for an example from linear system theory.
Example A.12 Let L be a linear time-invariant dynamical input-output system, say with
scalar input and scalar output. If the input space and output space both are endowed with
the ∞-norm, then the induced norm of L is
Z
kLk = |h(t)|dt
where h is the system’s unit impulse response. L is bounded if and only if h is absolutely
integrable, which is the case if and only if the system is bounded-input/bounded-output
stable—i.e., if the ∞-norm of the output is finite whenever that of the input is.
An important characterization of bounded linear maps is as follows.
Exercise A.43 Let V, W be normed vector spaces and let L ∈ L(V, W ). The following are
equivalent: (i) L is bounded; (ii) L is continuous over V ; (iii) L is continuous at θV .
Moreover, if L is bounded then N (L) is closed.
Example A.13 Let V be the vector space of continuously differentiable functions on [0, 1]
with kxk = max |x(t)|. Let W = R and again let L be defined to Lx = x′ (0), an unbounded
t∈[0,1]
kt3
linear map. It can be verified that N (L) is not closed. For example, let xk (t) = 1+kt2
. Then
xk ∈ N (L) for all k and xk → x̂ with x̂(t) = t, but Lx̂ = 1.
with AB defined by
AB(x) = A(B(x)) ∀x ∈ V.
Theorem A.4 (Riesz–Fréchet Theorem) (e.g., [?, Theorem 4-12]). (Frigyes Riesz,
Hungarian mathematician, 1880–1956; Maurice R. Fréchet, French mathematician, 1898–
1973.) Let H be a Hilbert space and let L ∈ B(H, R) (i.e., L is a bounded linear functional
on H). Then there exists ℓ ∈ H such that
L(x) = hℓ, xi ∀x ∈ H.
Definition A.24 Let V, W be two spaces endowed with inner products h·, ·iV and h·, ·iW
respectively and let L ∈ L(V, W ). An adjoint map to L is a map L∗ : W → V satisfying
Exercise A.46 Suppose L has an ajoint map L∗ . Show that (i) L has no other adjoint map,
i.e., the adjoint map (when it exists) is unique; (ii) L∗ linear; (iii) L∗ has an adjoint, with
(L∗ )∗ = L; (iv) if L is bounded, then L∗ also is, and kL∗ k = kLk.
Exercise A.48 Let L be a linear map with adjoint L∗ . Show that hx, Lxi = 12 hx, (L + L∗ )xi
for all x.
Exercise A.49 Let L be a linear map from V to W , where V and W are finite-dimensional
vector spaces, and let ML be its matrix representation in certain bases {biV } and {biW }. Let
Sn and Sm be n × n and m × m symmetric positive definite matrices. Obtain the matrix
representation of L∗ under the inner products hx1 , x2 iV := ξ1T Sn ξ2 and hy1 , y2 iW := η1T Sm η2 ,
where ξk and ηk , k = 1, 2, are corresponding vectors of coordinates in bases {biV } and {biW }.
In particular show that if the Euclidean inner product is used for both spaces (i.e., Sn and
Sm are both the identity), then ML∗ = MLT , so that L is self-adjoint if and only if ML is
symmetric.
Exercise A.50 Let U be given by Example A.6. Consider the map L : U → Rn given by
Ztf
L(u) = G(σ)u(σ)dσ,
t0
n×m
R tf G T: [t0 , tf ] → R
with
n
continuous. Assume the inner product on U given by hu, viU :=
t0
u(t) v(t)dt and, in R , hx, yi := xT y. Then L is linear and bounded. Verify that L has
an adjoint L∗ : Rn → U given by
(L∗ x)(t) = G(t)T x.
[Proving boundedness of L takes some effort. Hint: If ϕ : [0, 1] → R is continuous (or
piecewise continuous), then kϕk1 ≤ kϕk2 , which can be proved by craftily invoking the CBS
inequality.]
Exercise A.51 Prove that the linear map L in Exercise A.50 is bounded. [Hint:
R1 R1
( 0 x(t)dt)2 ≤ 0 x(t)2 dt, which can be proved from Jensen’s inequality.]
Exercise A.52 Consider the linear time-invariant state-space model (A, B, and C are real)
ẋ = Ax + Bu (A.2)
y = Cx (A.3)
and the associated transfer-function matrix G(s) = C(sI − A)−1 B (for s ∈ C). The time-
invariant state-space model, with input y and output v,
ṗ = −AT p + C T y (A.4)
v = −B T p (A.5)
is said to be adjoint to (A.2)-(A.3). (Note the connection with system (2.19), when L =
C T C.) Show that the transfer-function matrix G∼ associated with the adjoint system (A.4)-
(A.5)√is given by G∼ (s) = G(−s)T ; in particular, for every ω ∈ R, G∼ (jω) = G(jω)H , where
j := −1 and a H superscript denotes the complex conjugate transpose of a matrix (which
is the adjoint with respect to the complex Euclidean inner product hu, vi = ξ H η, where ξ and
η are the vectors of coordinates of u and v, and ξ H is the complex conjugate transpose of ξ).
This justifies referring to p as the adjoint variable, or co-state. The triple (−AT , C T , −B T )
is also said to be dual to (A, B, C).
Exercise A.53 Let G be a linear map from C[0, 1]m to C[0, 1]p , m and p positive integers,
defined by Z t
(Gu)(t) = G(t, τ )u(τ )dτ, t ∈ [0, 1], (A.6)
0
where the matrix G(t, τ ) depends continuouslyRon t and τ . Let C[0, 1]m and C[0, 1]p be en-
1
dowed with the L2 inner product, i.e., hr, si = 0 r(t)T s(t)dt. Then G is linear and bounded.
Prove that G has an adjoint G ∗ given by
Z 1
∗
(G y)(t) = G(τ, t)T y(τ )dτ, t ∈ [0, 1]. (A.7)
t
where 1(t) is the unit step and Φ(t, τ ) is the state-transition matrix associated with a cer-
tain matrix A(t), or equivalently, since G(t, τ ) only affects (A.6) for τ < t, G(t, τ ) =
C(t)Φ(t, τ )B(τ ). Then G is the mapping from u to y generated by
Observe from (A.7) that G ∗ is anticausal, i.e., the value of the output at any given time in
[0, 1] depends only on present and future values of the input. Also note that, when A, B, and
C are constant, the transfer function matrix associated with G is G(s) = C(sI − A)−1 B and
that associated with G ∗ is G∼ (s), discussed in Exercise A.52.
Remark A.4 In connection with Exercise A.53, note that, with z := y, u := −v is the
optimal control for problem (P) of section 2.1.1, with t0 = 0, tf = 1, L = C T C, and Q = 0.
Hence the optimal control can be automatically generated by the simple feedback loop.
Theorem A.5 (Fundamental Theorem of linear algebra) Let V, W be inner product spaces,
let L ∈ L(V, W ), with adjoint L∗ . Then N (L) and N (L∗ ) are closed and
(c) cl(R(L)) = cl(R(LL∗ )), and if R(LL∗ ) is closed, then R(L) = R(LL∗ );
(d) (from (a) and (c):) if R(L) = R(LL∗ ), then V = R(L) ⊕ R(L)⊥ = R(L∗ ) ⊕ N (L).
(a)
y ∈ N (L∗ ) ⇔ L∗ y = θV
⇔ hL∗ y, xi = 0 ∀x ∈ V
⇔ hy, Lxi = 0 ∀x ∈ V
⇔ y ∈ R(L)⊥ .
(We have used the fact that, if hL∗ y, xi = 0 ∀x ∈ V , then, in particular, hL∗ y, L∗ yi =
0, so that L∗ y = θV .)
(b)
and
(c) R(L)⊥ = N (L∗ ) = N (LL∗ ) = R(LL∗ )⊥ . Thus R(L)⊥⊥ = R(LL∗ )⊥⊥ . The result
follows. Finally, if R(LL∗ ) is closed, then
Now let L ∈ L(V, W ), with adjoint L∗ , and suppose that R(L) = R(LL∗ ). Let ŵ ∈
R(L) (= R(LL∗ )). Then there exists v̂ ∈ R(L∗ ) such that Lv̂ = ŵ. Further, v ∈ V satisfies
the equation Lv = ŵ if and only if v − v̂ ∈ N (L) (= R(L∗ )⊥ ). Hence, for any such v, v̂ is
the orthogonal projection of v (i.e., of the solution set of Lv = ŵ) on the subspace R(L∗ ),
which implies that, unless v = v̂, hv̂, v̂i < hv, vi. (Indeed, since hv − v̂, v̂i = 0,
hv, vi = hv̂ − (v̂ − v), v̂ − (v̂ − v)i = hv̂, v̂i + hv̂ − v, v̂ − vi > hv̂, v̂i .)
This leads to the solution of the linear least squares problem, stated next.
Theorem A.6 Let V, W be inner-product spaces and let L ∈ L(v, w), with adjoint L∗ .
Suppose that R(L) = R(LL∗ ). Let w ∈ R(L). Then the problem
Proof. Let v ∈ V . Since R(L) = R(LL∗ ), Lv = LL∗ ξ for some ξ; with v0 := L∗ ξ, we have
Lv0 = LL∗ ξ = Lv and hence v − v0 ∈ N (L) = R(L∗ )⊥ and v = v0 + (v − v0 ).
Moore-Penrose pseudo-inverse
Let L ∈ L(V, W ), V and W inner-product spaces, with adjoint L∗ . Suppose that R(L) =
R(LL∗ ). It follows from the above that L|R(L∗ ) : R(L∗ ) → R(L) is a bijection. Let L† |R(L) :
R(L) → R(L∗ ) denote its inverse. Further, define L† on N (L∗ ) by
L† w = θV ∀w ∈ N (L∗ ).
Exercise A.54 Suppose W = R(L) ⊕ N (L∗ ). (For instance, W is Hilbert and R(L) is
closed.) Prove that L† has a unique linear extension to W .
L
ℜ(L*) ℜ(L)
L*
θv θw
N(L) N(L* )
B.1 Differentiability
[?, ?, ?]
First, let f : R → R. We know that f is differentiable at x∗ if
f (x∗ + t) − f (x∗ )
lim
t→0 t
exists, i.e. if there exists a ∈ R such that
f (x∗ + t) − f (x∗ )
= a + ϕ(t)
t
with ϕ(t) → 0 as → 0, i.e., if there exists a ∈ R such that
f (x∗ + t) − f (x∗ )
f ′ (x∗ ) = lim .
t→0 t
Equation (B.1) shows that f ′ (x∗ )t (= at) is a linear (in t) approximation to f (x∗ + t) −
f (x∗ ). Our first goal in this appendix is to generalize this to f : V → W , with V and W
more general (than R) vector spaces. In such context, according to a formula such as (B.1)
(with a := f ′ (x∗ )) for t ∈ V , f ′ (x∗ )t will lie in W . Hence it is natural to view f ′ (x∗ ) (value
of the derivative of f at a given point of domain V ) as a linear map from V to W .
While it is typical to write the derivative of f at a point x∗ as ∂f ∂x
(x∗ ), in these notes
we leave out the (meaningless) “x” in the denominator and write instead Df (p) for the
derivative of f at p ∈ V (e.g., Df (x∗ ) is the derivative a f at x∗ ), such notation being
simpler and in some instances (e.g., when invoking the chain rule) clearer than ∂f ∂x
(x∗ ).
n m
As a next step we consider the case of f : R → R .
We will note the “partial derivatives” aij of f at x∗ by Dj fi (x∗ ). Note that existence of all
partial derivatives at a point does not imply continuity at that point, as seen in the next
example.
Example B.1 Let f : R2 → R be defined by
0 if xy = 0
f (x, y) =
1 elsewhere
Then f has partial derivatives at (0, 0), yet it is not continuous at (0,0).
Hence, existence of partial derivatives at x∗ does not imply continuity at x∗ . Also, the
notion of partial derivative does not readily extend to functions whose domain is infinite-
dimensional. For both of these reasons, we next consider notions of differentiability which,
while being more restrictive than mere existence of partial derivatives, readily generalize to
more general domains (and codomains) for which partial derivatives can’t even be defined.
Before doing so, we note the following fact, which applies when f has finite-dimensional
domain and co-domain.
Fact. (e.g., [?, Theorem 13.20]) Let f : Rn → Rm , and let Ω ⊆ Rn open set. If the
partial derivatives of (the components of) f exist and are continuous throughout Ω, then f
is continuous on Ω.
We now consider f : V → W , where V and W are vector spaces, and W is equipped
with a norm.
Definition B.2 f is 1-sided (2-sided) directionally differentiable at x∗ ∈ V if for all h ∈ V
there exists ah ∈ W such that
with
1
koh (t)kW → 0 as t → 0 (for any given h) (2 − sided)
t
1
koh (t)kW → 0 as t ↓ 0 (for any given h) (1 − sided)
t
ah is the directional derivative of f at x∗ in direction h, often denoted f ′ (x∗ ; h).
Definition B.3 f is Gâteaux– (or G–) differentiable at x∗ if there exists a linear map A ∈
L(V, W ) such that
Definition B.4 f is Fréchet– (or F–) differentiable at x∗ if there exists a continuous linear
map A ∈ B(V, W ) such that
with
ko(h)kW
→ 0 as h → 0V .
khkV
Linear map A is termed F-derivative of f at x∗ and denoted Df (x∗ ) in these notes.
1
(f (x∗ + h) − f (x∗ ) − Ah) → 0W as h → 0V .
khk
whenever f : V → W is F-differentiable at x∗ .
If f : Rn → Rm is F-differentiable at x∗ then, given bases for Rn and Rm , Df (x∗ ) can
be represented by a matrix (as any linear map from Rn to Rm ).
and thus that f is 2-sided directionally differentiable at 0, 0, but that f is not G-differentiable
at 0, 0.
Show that f is G-differentiable at (0, 0), but that f is not continuous (and thus not F-
differentiable) at (0, 0).
Df (x)h = hg, hi = ∀h ∈ H.
When H = Rn and h·, ·i is the Euclidean inner product hx, yi = xT y, we will often denote
the gradient of f at x by ∇f (x∗ ).
Exercise B.6 Note that the gradient depends on the inner product to which it is associated.
For example, suppose f : Rn → R. Let S be a symmetric positive definite n × n matrix, and
define hx, yi = xT Sy. Prove that gradf (x) = S −1 Df (x)T . In particular, under the Euclidean
inner product, ∇f (x) = Df (x)T .
Dh(x) = Dθ(φ(x))Dφ(x) ∀x ∈ X.
Exercise B.7 Prove this fact using the notation used in these notes.
Exercise B.8 Express the “total” derivative of θ(φ(x), ψ(x)) with respect to x, with θ, φ,
and ψ F-differentiable maps between appropriate spaces.
Exercise B.9 Let Q be an n × n (not necessarily symmetric) matrix and let b ∈ Rn . Let
f (x) = 12 hx, Qxi + hb, xi, where hx, yi = xT Sy, with S = S T > 0. Show that f is
F-differentiable and obtain its gradient with respect to the same inner product.
Remark B.2
1. We will say that a function is differentiable (in any of the previous senses) if it is
differentiable everywhere.
Df : V → B(V, W ), x 7→ Df (x).
i.e.,
φ(a + h) − φ(a) = φ′ (a + th)h, for some t ∈ (0, 1) (B.6)
Proof. Consider φ : R → R defined by φ(s) : f (x + sh). By the result above there exists
t ∈ (0, 1) such that
It is important to note that this result is generally not valid for f : V → Rm , m > 1, because
to different components of f will correspond different values of t. For this reason, we will
often make use, as a substitute, of the fundamental theorem of integral calculus, which
requires continuous differentiability (though the weaker condition of “absolute continuity”,
which implies existence of the derivative almost everywhere, is sufficient):
The following fact strengthens the result we quoted earlier that, when f maps Rn to Rm ,
continuity of its partial derivatives implies its own continuity.
Fact. (E.g., [?], Theorem 2.5.) Let f : Rn → Rm , and let Ω be an open subset of Rn . If the
partial derivatives of (the components of) f exist on Ω and are continuous at x̂ ∈ Ω, then f
is continuously (Fréchet) differentiable at x̂.
Now, if φ : R → R is continuously differentiable on [a, b] ⊂ R, then the fundamental
theorem of integral calculus asserts that
Z b
φ(b) − φ(a) = φ′ (ξ)dξ. (B.9)
a
Z1
f (x + h) − f (x) = Df (x + th)h dt
0
Proof. Define φ : R1 → Rm by φ(s) = fi (x + sh). Apply (B.9), (B.10) and the chain rule.
Note. For f : V → W , W a Banach space, the same result holds, with a suitable definition
of the integral (of “integral-regulated” functions, see [?]).
Further, if V is finite-dimensional, then given any ρ > 0, and any r > 0, there exists β > 0
such that (B.11) holds for all x ∈ B(x∗ , ρ) and all h ∈ V with khk ≤ r.
A stronger and more general version of the second statement in Corollary B.1 is as follows.
(See, e.g, [?], Theorem 2.3.)
Fact. Let V and W be normed vector spaces, and let B be an open ball in V . Let f : V → W
be differentiable on B, and suppose ∂f
∂x
(x) is bounded on B. Then there exists β > 0 such
that, for all x ∈ B, h ∈ V such that x + h ∈ B,
kf (x + h) − f (x)k ≤ βkhk .
Second derivatives
Definition B.6 Suppose f : V → W is differentiable on V and use the induced norm for
B(V, W ). If
Df : V → B(V, W ), x 7→ Df (x)
is itself differentiable, then f is twice differentiable and the derivative of Df at x ∈ V is
noted D2f (x) and is called second derivative of f at x. Thus
and
D2 f : V → B(V, B(V, W )), x 7→ D2 f (x).
[Note: the reader may want to resist the temptation of viewing D2 f (x) as a “cube” matrix.
It is simpler to think about it as an abstract linear map.]
Now let f : H → R, where H is a Hilbert space, be twice differentiable. Then, in view
of the Riess-Fréchet Theorem, B(H, R) is isomorphic to H, and in view of (B.12) D2 f (x)
can be thought of as a bounded linear map Hessf (x) : H → H. This can be made precise
as follows. For any x ∈ H, Df (x) : H → R is a bounded linear functional and, for any
u ∈ H, D2 f (x)u : H → R is also a bounded linear functional. Thus in view of the Riesz-
Fréchet representation Theorem, there exists a unique ψu ∈ H such that
D2 (x)u v = hψu , vi ∀v ∈ H.
For given x ∈ H, The map from u ∈ H to ψu ∈ H is linear and bounded (why?). Let
us denote this map by Hessf (x) ∈ B(H, H) (after L. Otto Hesse, German mathematician,
1811–1874), i.e., ψu = Hessf (x)u. We get
D2 f (x)u v = hHessf (x)u, vi ∀x, u, v ∈ H.
Exercise B.11 Prove the above in the case W = Rn . Hint: first use Theorem B.1.
Check it by integrating by parts. Let φ(s) = fi (x + s(y − x)) to prove the theorem.)
Further, if V is finite-dimensional, then given any ρ > 0, and any r > 0, there exists β > 0
such that (B.16) holds for all x ∈ B(x∗ , ρ) and all h ∈ V with khk ≤ r.
Again, a more general version of this result holds. (See, e.g, [?], Theorem 4.8.)
Fact. Let V and W be normed vector spaces, and let B be an open ball in W . Let
f : W → W be twice differentiable on B, and suppose D2 f (x) is bounded on B. Then there
exists β > 0 such that, for all x ∈ B, h ∈ V such that x + h ∈ B,
λx + (1 − λ)y ∈ S. (B.17)
i.e., if the arc lies below the chord (see Figure B.1).
However, this definition may fail (in the sense of the right-hand side of (B.18) not being well
defined) when f is allowed to take on values of both −∞ and +∞, which is typical in convex
analysis. (The definition is valid if f is “proper”: see below.) A more general definition is
as follows.
is a convex set.
The (effective) domain domf of a convex function f : S → R ∪ {±∞} is the set of points
x ∈ S such that f (x) < ∞; f is proper if (i) its domain is non-empty and (ii) for all x ∈ S,
f (x) 6= −∞.
Fact. Let S be a convex open subset of a finite-dimensional vector space. If f : S → R is
convex on S, then it is continuous on S. More generally, if f : S → R ∪ {±∞} is convex
and proper, then it is continuous over the relative interior of its domain (in particular, over
the interior of its domain). See, e.g., [?], section 1.4 and [?].
Definition B.9 Let V be a normed vector space. Then S ⊆ V is strictly convex if, ∀x, y ∈
S, x 6= y, ∀λ ∈ (0, 1),
λx + (1 − λ)y ∈ int(S),
where int(S) denotes the interior of S. A function f : S → R is said to be strictly convex
on the convex set S ⊆ V if its epigraph is strictly convex.
k
P
with λi ≥ 0, for i = 1, . . . , k and λi = 1.
i=1
Exercise B.12 Show that a set S is convex if and only if it contains the convex combinations
of all its finite subsets. Hint: use induction.
f(y)+λ(f(x)-f(y))
f =λf(x)+(1-λ)f(y)
•
•
• • f(λx+(1-λ)y)
x λx+(1-λ)y y
=y+λ(x-y)
Figure B.1:
Exercise B.13 Prove the above. (Hint: Use Exercise B.12 and mathematical induction.)
Convex Hull
Definition B.11 The convex hull of a set S, denoted coS, is the smallest convex set con-
taining S. The following exercise shows that it makes sense to talk about the “smallest” such
set.
Exercise B.14 Show that ∩{Y : Y convex, S ⊆ Y } is convex and contains S. Since it is
contained in every convex set containing S, it is the ‘smallest’ such set.
In other words, coX is the set of all convex combinations of finite subsets of X. In particular,
if X is finite, X = {x1 , . . . , xℓ }
( ℓ ℓ
)
X X
coX = λi xi : λi ≥ 0 ∀i, λi = 1
i=1 i=1
(Hint: To prove ⊆, show that X ⊆ RHS (right-hand side) and that RHS is convex. To
prove ⊇, use mathematical induction.)
Exercise B.17 Prove that the convex hull of a compact subset of Rn is compact and that
the closure of a convex set is convex. Show by example that the convex hull of a closed subset
of Rn need not be closed.
Proof. (only if) (see Figure B.2). Suppose f is convex. Then, ∀x, y ∈ S, λ ∈ [0, 1],
f(y)
f(x)+λ(f(y)-f(x)) f(x) + f(x+λ(y-x))-f(x)
• λ
•
f(x+λ(y-x))
x y
λ
0 1
Figure B.2:
f (x + λ(y − x)) = f (λy + (1 − λ)x) ≤ λf (y) + (1 − λ)f (x) = f (x) + λ(f (y) − f (x))(B.21)
i.e.
f (x + λ(y − x)) − f (x)
f (y) − f (x) ≥ ∀λ ∈ (0, 1], ∀x, y ∈ V (B.22)
λ
and, when λ ց 0, since f is differentiable,
(if) (see Figure B.3). Suppose (B.20) holds ∀x, y ∈ V . Then, for given x, y ∈ V and
z = λx + (1 − λ)y
Fact. Moreover, f is strictly convex if and only if inequality (B.20) is strict whenever x 6= y
(see [?]).
Definition B.12 f : V → R, V a normed space, is said to be strongly convex over a convex
set S if f is differentiable on S and there exists m > 0 s.t. ∀x, y ∈ S
m
f (y) ≥ f (x) + Df (x)(y − x) + ky − xk2 .
2
Proposition B.2 If f : V → R is strongly convex, it is strictly convex and, for any x0 ∈ V ,
the sub-level set
{x : f (x) ≤ f (x0 )}
is bounded.
Proof. The first claim follows from Definition B.12 and the fact preceding it. Now, let h be
an arbitrary unit vector in Rn . Then
1
f (x0 + h) ≥ f (x0 ) + Df (x0 )h + mkhk2
2
1
≥ f (x0 ) − kDf (x0 )k khk + mkhk2
m 2
= f (x0 ) + khk − kDf (x0 )k khk
2
> f (x0 ) whenever khk > (2/m) kDf (x0 )k .
Hence {x : f (x) ≤ f (x0 )} ⊆ B (x0 , (2/m) kDf (x0 )k), which is a bounded set.
A above A1 ⇒ C above C1
C B B above B1
A
C1 B1
A
x z y
Figure B.3:
Proposition B.3 Suppose that f : V → R is twice continuously differentiable (so that its
Hessian is symmetric). Then f is convex on V if and only if its Hessian D2 f (x) is positive
semi-definite for all x ∈ V .
Exercise B.19 Show that if f is twice continuously differentiable and D2 f is positive definite
on V , then f is strictly convex. Show by example that the converse does not hold in general.
Exercise B.21 Let V = Rn . Show that (B.26) holds if, and only if, the eigenvalues of
∇2 f (x) (they are real, why ?) are all positive and bounded away from zero, i.e., there exists
m > 0 such that for all x ∈ Rn all eigenvalues of ∇2 f (x) are larger than m.
P (a, α) := {x ∈ H : ha, xi = α}
• ξa
1a • ξa+x
x
H
Figure B.4:
Let us check, for n = 2, that this corresponds to the intuitive notion we have of a hyperplane,
i.e., a straight line in this case. Such straight line can be expressed, for a given scalar ξ and
vector a orthogonal to the straight line, as the set of all x of the form x = ξa + v for some
v⊥a; see Figure B.4, where x should be v, which should be orthogonal to a, and H should
be P (a, α). Hence
ha, xi ≥ (>)α ∀x ∈ X
ha, yi ≤ (<)α ∀y ∈ Y
This means that X is entirely in one of the half spaces and Y entirely in the other. Examples
are given in Figure B.5.
x x′
H
y
H′
y
Figure B.5: X and Y are separated by H and strictly separated by H′ . X ′ and Y ′ are not
separated by any hyperplane (i.e., cannot be separated).
Note. X and Y can be separated without being disjoint. Any hyperplane is even separated
from itself (by itself!)
The idea of separability is strongly related to that of convexity. For instance, it can be shown
that 2 disjoint convex sets can be separated. We will present here only one of the numerous
separation theorems; this theorem will be used in connection with constrained optimization.
x
• ∧ X
x
•
∧ ∧ 2∆
〈 x, x 〉=x = H1
•
0
∧ ∧ 2∆
〈 x, x 〉 = 1−
2 x = H2
Figure B.6:
Theorem B.3 Suppose X ⊂ H is nonempty, closed and convex and suppose that 0 6∈ X.
Then there exists a ∈ H, a 6= 0, and α > 0 such that
hence (B.28) holds since ||x̂|| ≤ ρ and ||x|| > ρ for all x 6∈ B̄(0, ρ). We now show that
x̂ is normal to a hyperplane that strictly separates X from the origin. We first show that
P (x̂, kx̂k2 ), which containts x̂, (non-strictly) separates X from θ. Clearly, hθ, x̂i < kx̂k2 . We
show by contradiction that
hx, x̂i ≥ kx̂k2 ∀x ∈ X, (B.30)
proving the separation. Thus suppose there exists x ∈ X such that
Further
||xλ ||2 = ||x̂||2 + λ2 ||x − x̂||2 + 2λ(hx̂, xi − ||x̂||2) ∀λ ∈ [0, 1]
i.e. using (??),
||xλ ||2 = ||x̂||2 + λ2 ||x − x̂||2 − 2λ ǫ,
so that
holds for λ > 0 small enough (since ǫ > 0), which contradicts (B.28). Hence, (B.30) must
hold. Since x̂ 6= θ, it follows that, with α := kx̂k2 /2,
kxk ≥ δ ∀x ∈ X,
kxi k → δ as i → ∞. (B.33)
Since X is convex, (xi + xj )/2 also belongs to X, so that k(xi + xj )/2k ≥ δ, implying
The sequence {xi } is Cauchy, hence (since H is complete) convergent, to some x̂ ∈ X since
X is closed. From continuity of the norm, we conclude that kx̂k = δ, concluding the proof.
Corollary B.3 If X is closed and convex and b 6∈ X, then b and X are strictly separated.
Remark B.3 Theorem B.3 also holds more generally on Banach spaces V ; see, e.g., [?,
Section 5.12]. In this context (there is no inner product), hyperplanes are more generally
defined by
P (ℓ, α) := {x ∈ V : ℓx = α}
where ℓ : V → V is a continuous linear map. The proof is based on the celebrated Hahn-
Banach theorem.
Fact. If X and Y are nonempty disjoint and convex, with X compact and Y closed, then
X and Y are strictly separated.
Exercise B.24 Prove the Fact. Hint: first show that Y − X, defined as {z|z = y − x, y ∈
Y, x ∈ X}, is closed, convex and does not contain 0.
Exercise B.25 Show by an example that if in the above theorem, X is merely closed, X
and Y may not be strictly separated. (In particular, the difference of 2 closed sets, defined
as above, may not be closed.)
Exercise B.26 Prove that, if C is a closed convex cone and x 6∈ C, then there exists h such
that hT x > 0 and hT v ≤ 0 for all v ∈ C.
Acknowledgment
The author wishes to thank the numerous students who have contributed constructive com-
ments towards improving these notes over the years. In addition, special thanks are addressed
to Ji-Woong Lee, who used these notes when he taught an optimal control course at Penn
State University in the Spring 2008 semester and, after the semester was over, provided
many helpful comments towards improving the notes.
[1] B.D.O. Anderson and J.B. Moore. Optimal Control: Linear Quadratic Methods. Pren-
tice Hall, 1990.
[3] D.P. Bertsekas. Constrained Optimization and Lagrange Multiplier Methods. Academic
Press, New York, 1982.
[4] D.P. Bertsekas. Dynamic Programming and Optimal Control, Vol. 1. Athena Scientific,
Belmont, Massachusetts, 2017.
[6] S.P. Bertsekas, A. Nedic, and A.E. Ozdaglar. Convex Analysis and Optimization.
Athena Scientific, Belmont, Massachusetts, 2003.
[7] R.W. Brockett. Finite Dimensional Linear Systems. J. Wiley and Sons, 1970.
[8] F.M. Callier and C.A. Desoer. Linear System Theory. Springer-Verlag, New York, 1991.
[9] M.D. Canon, JR. C.D. Cullum, and E. Polak. Theory of Optimal Control and
Mathematical Programming. McGraw-Hill Book Company, New York, 1970.
[10] M.D. Canon, C.D. Cullum, and E.Polak. Theory of Optimal Control and Mathematical
Programming. McGraw-Hill, 1970.
[11] F.H. Clarke. Optimization and Nonsmooth Analysis. Wiley Interscience, 1983.
[12] V.F. Dem’yanov and L.V. Vasil’ev. Nondifferentiable Optimization. Translations Series
in Mathematics and Engineering. Springer-Verlag, New York, Berlin, Heidelberg, Tokyo,
1985.
[14] W.H. Fleming and R.W. Rishel. Deterministic and Stochastic Optimal Control.
Springer-Verlag, New York, 1975.
[15] F.J. Gould and J.W. Tolle. A necessary and sufficient qualification for constrained
optimization. SIAM J. on Applied Mathematics, 20, 1971.