



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




RAPHAEL HAUSER MATHEMATICAL INSTITUTE, UNIVERSITY OF OXFORD
(P) min x∈Rn^
f (x) = xTBx + bTx + a,
where B is a symmetric positive definite matrix. Using the first order necessary
optimality conditions from Lecture 2, we find that (P) is equivalent to the problem of solving the linear system 2Bx = −b. Here are a few facts about real symmetric matrices that you should remem- ber from your course on linear algebra: let A ∈ Rn×n. If A is symmetric, then A can be written in decomposed form as A = QDQT, where QTQ = I (that is, Q is orthogonal), and D is the diagonal matrix D = Diag(λ(A)) which has the vector λ(A) = [ λ 1 (A)^ ... λn(A)^ ]T^ ∈ Rn^ of eigenvalues of A on its diagonal, and where the com- ponents of λ(A) are ordered in nonincreasing order: λ 1 (A) ≥ · · · ≥ λn(A). All eigen- values are real. The columns of Q form an orthogonal basis of eigenvectors of A. A is invertible if and only if D is, and then A−^1 = QD−^1 QT, where D−^1 = Diag(λ(A)−^1 ) is simply obtained as the component-wise inverse of D. A is positive semidefinite (respectively positive definite) if and only if λi(A) ≥ 0 (respectively λi(A) > 0) for all i. In these cases the matrix D (^12) := Diag(
λ(A)), obtained as the component-wise square root of D, is well-defined, and we can set A (^12) := QD (^12) QT. A (^12) is the unique symmetric positive semidefinite matrix for which the identity A (^12) A (^12) = A holds. Let us now return to our optimisation problem (P) and observe that an additive constant in the objective function does not change its minimiser. Therefore, we can reformulate the problem as
(P’) min f (x) = (x − x∗)TB(x − x∗) = yTy = g(y),
where x∗^ = −(1/2)B−^1 b and y = B (^12) (x − x∗). Thus, the objective function of our minimisation problem looks particularly simple in the transformed variables y. Of course, transforming the problem into y-coordinates is the same as solving the original problem: we would first have to find x∗, which is precisely the minimiser of (P)! So, there seems to be no gain from considering (P’). Nevertheless, we can use y-coordinates conceptually to understand how the con- jugate gradient algorithm works in the original coordinates x: we would like to construct an iterative sequence (xk)k∈N such that the corresponding sequence of yk = B (^12) (xk − x∗) behaves sensibly. Let us assume that the current iterate is xk and that the search direction dk has been computed. The exact line search αk = arg minα f (xk +αdk) is the same as αk = arg minα g(yk +αpk), where pk = B
1 (^2) dk is the search direction in y-coordinates. Therefore,
αk = arg min α ‖yk‖^2 + 2αpT k yk + α^2 ‖pk‖^2.
Since this is a univariate quadratic minimisation problem, it is trivial to establish that
αk = −
pT k yk ‖pk‖^2
If we set yk+1 = yk + αkpk, then we find
yT k+1pk =
y −
pT k yk ‖pk‖^2
pk
pk = yT k pk − y kT pk = 0. (2.1)
2.1. A key observation. A key observation is that the relation (2.1) is inde- pendent of the location of xk: as long as we use the same search direction d = ±dk but an arbitrary starting point x ∈ Rn^ for the line search
α∗^ = arg min α∈R
f (x + αd),
Theorem 2.1. Let f (x) = xTBx + bTx + a be defined on Rn^ with B ≻ 0 , let x 0 ∈ Rn^ be a starting point and dk ∈ Rn^ \ { 0 } (k = 0,... , n − 1) mutually B-conjugate search directions. Furthermore, for (k = 0,... , n − 1) let xk+1 = xk + αkdk, where αk = arg minα∈R f (xk + αdk). Then xn is the global minimiser of f.
Note that since B is nonsingular, there cannot exist more than n mutually B- conjugate search directions dk. This yields an alternative argument for the proof of termination after n steps.
2.2. How to choose B-conjugate search directions. So far we have a finite termination result for a family of algorithms that iterate over exact line searches along mutually conjugate search directions. We did not otherwise specify how to compute these directions. In general, we could do this by choosing any descent direction vk and then applying a procedure that corresponds to a Gram–Schmidt orthogonalisation in the transformed space:
Lemma 2.2. Let v 0 ,... , vn− 1 ∈ Rn^ be linearly independent vectors, and let d 0 ,... , dn− 1 be recursively defined as follows,
dk = vk −
k∑− 1
j=
dT j Bvk dT j Bdj
dj. (2.3)
Then dT i Bdk = 0 for all i 6 = k.
Proof. We proceed by induction over k and show that all distinct di with i ≤ k are mutually B-conjugate. For k = 0 there is nothing to prove. We may therefore assume that dT i Bdj = 0 for all i, j ∈ { 0 ,... , k − 1 }, i 6 = j. Let i < k. Then
dT i Bdk = dT i Bvk −
k∑− 1
j=
dT j Bvk dT j Bdj
dT i Bdj = dT i Bvk − dT i Bvk = 0.
Note that the linear independence of the vj guarantees that none of the dj is zero, and hence that dT j Bdj > 0 for all j.
Unfortunately, this procedure would require that we hold the vectors dj (j < k) in the computer memory. Thus, as k approaches n the method would require O(n^2 ) memory, defying one of the main purposes of the new algorithm. Luckily, a second key observation shows that we can get away with O(n) storage if we choose the steepest descent direction as vk:
Lemma 2.3. Let the procedure of Theorem 2.1 be applied to the B-conjugate search directions dk (k = 0,... , n − 1), where d 0 = −∇f (x 0 ) and dk is computed via (2.3) with vk = −∇f (xk) (k = 1,... , n − 1). Then ∇f (xj )T∇f (xk) = 0 for (j = 0,... , k − 1), and (k = 1,... , n − 1).
Proof. First, note that ∇f (xk) = 2Bxk + b for all k. We claim that this implies that dT j ∇f (xk) = 0 for (j = 0,... , k − 1). In order to prove this claim, we proceed by induction over k. The statement holds trivially true for k = 0. We can therefore
assume that it holds for k, and it suffices to prove that it holds for k + 1 too. By the induction hypothesis we have
dT j ∇f (xk+1) = dT j (2B(xk + αkdk) + b) = dT j ∇f (xk) + 2αkdT j Bdk = 0, (j = 0,... , k − 1).
On the other hand, dT k ∇f (xk+1) = 0 is the first order optimality condition for the line search minα f (xk + αdk) that defines xk+1. Hence, our claim is true. Next, note that (2.3) implies that
span(d 0 ,... , dk) = span(∇f (x 0 ),... , ∇f (xk)) (k = 0,... , n − 1).
For j < k there exist therefore λ 1 ,... , λj such that ∇f (xj ) =
∑j i=0 λidi, and we have
∇f (xj )T∇f (xk) =
∑^ j
i=
λdT i ∇f (xk) = 0.
We are now ready to put all the pieces of the conjugate gradient algorithm to- gether: substituting ∇f (xj+1) − ∇f (xj ) = 2αj Bdj into (2.3) with vk = −∇f (xk), we obtain
dk = −∇f (xk) +
k∑− 1
j=
∇f (xj+1)T∇f (xk) − ∇f (xj )T∇f (xk) ∇f (xj+1)Tdj − ∇f (xj )Tdj
dj.
Lemma 2.3 implies that all but the last summand in the the right hand side expression are zero. Moreover, multiplying Equation (2.3) by ∇f (xk)T^ and then replacing k by k − 1, we deduce from Lemma 2.3 that dT k− 1 ∇f (xk− 1 ) = −‖∇f (xk− 1 )‖^2. Together with dT k− 1 ∇f (xk) = 0 this implies that
dk = −∇f (xk) + ‖∇f (xk)‖^2 ‖∇f (xk− 1 )‖^2
dk− 1. (2.4)
This is the conjugate gradient rule for updating the search direction. Note that for the computation of dk we only need to keep two vectors and one number stored in the main memory: dk− 1 , xk and ‖∇f (xk− 1 )‖^2 , which can be over- written when the corresponding new data are computed. Let us now summarise the conjugate gradient algorithm: