Optimization of Quadratic Functions

Similar documents
Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

This can be accomplished by left matrix multiplication as follows: I

Lecture notes: Applied linear algebra Part 1. Version 2

1. General Vector Spaces

Review of Matrices and Block Structures

Study Guide for Linear Algebra Exam 2

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

Eigenvalues and Eigenvectors

May 9, 2014 MATH 408 MIDTERM EXAM OUTLINE. Sample Questions

Chapter 3 Transformations

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Lecture 2: Linear Algebra Review

Numerical Methods - Numerical Linear Algebra

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

Math 407: Linear Optimization

Chapter 5 Eigenvalues and Eigenvectors

Math 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

MTH 464: Computational Linear Algebra

1. What is the determinant of the following matrix? a 1 a 2 4a 3 2a 2 b 1 b 2 4b 3 2b c 1. = 4, then det

B553 Lecture 5: Matrix Algebra Review

Notes on Eigenvalues, Singular Values and QR

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

The Conjugate Gradient Algorithm

Solutions to Final Practice Problems Written by Victoria Kala Last updated 12/5/2015

Linear Algebra Primer

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

2. Linear algebra. matrices and vectors. linear equations. range and nullspace of matrices. function of vectors, gradient and Hessian

Lecture 7: Positive Semidefinite Matrices

Orthogonality. 6.1 Orthogonal Vectors and Subspaces. Chapter 6

G1110 & 852G1 Numerical Linear Algebra

MA 265 FINAL EXAM Fall 2012

Symmetric Matrices and Eigendecomposition

Duke University, Department of Electrical and Computer Engineering Optimization for Scientists and Engineers c Alex Bronstein, 2014

MAT Linear Algebra Collection of sample exams

Mathematical foundations - linear algebra

Linear Algebra Massoud Malek

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

2. Every linear system with the same number of equations as unknowns has a unique solution.

Cheat Sheet for MATH461

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Solution of Linear Equations

Final Review Written by Victoria Kala SH 6432u Office Hours R 12:30 1:30pm Last Updated 11/30/2015

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

Review problems for MA 54, Fall 2004.

Chapter 6 - Orthogonality

Linear Algebra Lecture Notes-II

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

Vector Spaces, Orthogonality, and Linear Least Squares

Designing Information Devices and Systems II

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

MATH 423 Linear Algebra II Lecture 33: Diagonalization of normal operators.

University of Colorado at Denver Mathematics Department Applied Linear Algebra Preliminary Exam With Solutions 16 January 2009, 10:00 am 2:00 pm

UNDERGROUND LECTURE NOTES 1: Optimality Conditions for Constrained Optimization Problems

EE/ACM Applications of Convex Optimization in Signal Processing and Communications Lecture 2

Numerical Linear Algebra Homework Assignment - Week 2

The value of a problem is not so much coming up with the answer as in the ideas and attempted ideas it forces on the would be solver I.N.

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

Knowledge Discovery and Data Mining 1 (VO) ( )

Econ Slides from Lecture 7

Foundations of Matrix Analysis

Calculating determinants for larger matrices

7. Symmetric Matrices and Quadratic Forms

MIT Final Exam Solutions, Spring 2017

Notes on Linear Algebra

Recall the convention that, for us, all vectors are column vectors.

Ir O D = D = ( ) Section 2.6 Example 1. (Bottom of page 119) dim(v ) = dim(l(v, W )) = dim(v ) dim(f ) = dim(v )

4. Determinants.

The following definition is fundamental.

March 5, 2012 MATH 408 FINAL EXAM SAMPLE

Math Introduction to Numerical Analysis - Class Notes. Fernando Guevara Vasquez. Version Date: January 17, 2012.

MTH 5102 Linear Algebra Practice Final Exam April 26, 2016

5.6. PSEUDOINVERSES 101. A H w.

University of Colorado Denver Department of Mathematical and Statistical Sciences Applied Linear Algebra Ph.D. Preliminary Exam June 8, 2012

Optimization Theory. A Concise Introduction. Jiongmin Yong

STAT200C: Review of Linear Algebra

Linear Algebra: Matrix Eigenvalue Problems

Algebra C Numerical Linear Algebra Sample Exam Problems

av 1 x 2 + 4y 2 + xy + 4z 2 = 16.

Chapter 3. Determinants and Eigenvalues

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

Math 108b: Notes on the Spectral Theorem

1 9/5 Matrices, vectors, and their applications

Matrix Factorization and Analysis

Stat 159/259: Linear Algebra Notes

CS 246 Review of Linear Algebra 01/17/19

CS 143 Linear Algebra Review

Chapter 6: Orthogonality

Math Linear Algebra Final Exam Review Sheet

Elementary linear algebra

Chapter 7: Symmetric Matrices and Quadratic Forms

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

3 Matrix Algebra. 3.1 Operations on matrices

MATRICES ARE SIMILAR TO TRIANGULAR MATRICES

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Bastian Steder

1 Determinants. 1.1 Determinant

LINEAR ALGEBRA SUMMARY SHEET.

EE731 Lecture Notes: Matrix Computations for Signal Processing

Transcription:

36

CHAPER 4 Optimization of Quadratic Functions In this chapter we study the problem (4) minimize x R n x Hx + g x + β, where H R n n is symmetric, g R n, and β R. It has already been observed that we may as well assume that H is symmetric since x Hx x Hx + (x Hx) x [ (H + H ) ] x, where (H + H ) is called the symmetric part of H. herefore, in this chapter we assume that H is symmetric. In addition, we have also noted that an objective function can always be shifted by a constant value without changing the solution set to the optimization problem. herefore, we assume that β 0 for most of our discussion. However, just as in the case of integration theory where it is often helpful to choose a particular constant of integration, in many applications there is a natural choice for β that helps one interpret the problem as well as its solution. he class of problems (4) is important for many reasons. Perhaps the most common instance of this problem is the linear least squares problem: (43) minimize x R n Ax b, where A R m n, and b R m. By expanding the objective function in (43), we see that (44) Ax b x (A A)x (A b) x + b x Hx + g x + β, where H A A, g A b, and β b. his connection to the linear least squares problem will be explored in detail later in this chapter. For the moment, we continue to exam the general problem (4). As in the case of the linear least squares problem, we begin by discussing characterizations of the solutions as well as their existence and uniqueness. In this discussion we try to follow the approach taken for the the linear least squares problem. However, in the case of (43), the matrix H : A A and the vector g A b possess special features that allowed us to establish very strong results on optimality conditions as well as on the existence and uniqueness of solutions. In the case of a general symmetric matrix H and vector g it is possible to obtain similar results, but there are some twists. Symmetric matrices have many special properties that can be exploited to help us achieve our goal. herefore, we begin by recalling a few of these properties, specifically those related to eigenvalue decomposition.. Eigenvalue Decomposition of Symmetric Matrices Given a matrix A R n n, we say that the scalar λ is an eigenvalue of A if there is a non-zero vector x such that Ax λx, or equivalently, Null(λI A) {0}. Observe that Null(λI A) {0} if and only if (λi A) is singular, that is, det(λi A) 0. Consequently, λ is an eigenvalue of A if and only if det(λi A) 0. If we now think of λ as a variable, this says that we can find all eigenvalues of A by finding all roots of the equation det(λi A) 0. he function p(λ) : det(λi A) is easily seen to be a polynomial of degree n in λ which we call the characteristic polynomial of A. By the Fundamental heorem of Algebra, we know that p(λ) has n roots over the complex numbers if we count the multiplicities of these roots. Hence, when we discuss eigenvalues and eigenvectors we are forced in the setting of complex numbers. For this reason we may as well assume that A C n n. Working on C n requires us to re-examine our notion of the Euclidean norm and its associated dot product. Recall that for a complex number ζ : x+iy, with x, y R and i :, the magnitude of ζ is given by ζ ζζ, where ζ : x iy is the complex conjugate of ζ. If we now define the Euclidean norm of a vector z C n to be the square root of the sum of the squares of magnitude of its components, then n n z z k z k z k k k 37 z z z z,

38 4. OPIMIZAION OF QUADRAIC FUNCIONS where we define z z (z) z, that is, z takes z to its conjugate transpose. When z R n, we have z z, and we recover the usual formulas. With the operation, we can extend our notion of dot product (or, inner product) by writing z, y : z y C. When z and y are real vectors we recover usual notion of dot product for such vectors. Finally, for matrices A C n n, we define A : A, that is, we conjugate every element of A and then take the transpose. his notation is very helpful in a number of ways. For example, we have Ay, x (Ay) x y A x and Ax x A Ax. We call A the adjoint of A. Recall that a matrix H R n n is said to be symmetric of H H. By extension, we say that an matrix Q C n n is self-adjoint if Q Q. hus, in particular, every real symmetric matrix is self adjoint. We have the following remarkable fact about self-adjoint matrices. Lemma.. If Q C n n is self-adjoint, then Q has only real eigenvalues. In particular, if H is a real symmetric matrix, then H has only real eigenvalues and for each such eigenvalue there is a real eigenvector. Moreover, if (λ, v ) and (λ, v ) are two eigenvalue-eigenvectors pairs for H with λ λ, then (v ) v 0. Proof. Let λ C be an eigenvalue of Q. hen there is a non-zero eigenvector x C n such that Qx λx. herefore, λ x λx x x Qx x Q x (x Qx) (λ x ) λ x, so that λ λ which can only occur if λ is a real number. If H is real symmetrix, then it is self adjoint so all of its eigenvalues are real. If λ is one such eigenvalue with associated eigenvector z x + iy with x, y R n, then Hx + ihy Hz λz λx + iλy. Consequently, Hx λx and Hy λy since both Hx and Hy are real vectors. Since z 0, either x or y or both are non-zero, in any case we have a real eigenvector for H corresponding to λ. Next let (λ, v ) and (λ, v ) be eigenvalue-eigenvectors pairs for H with λ λ. hen since λ λ, we must have (v ) v 0. λ (v ) v (Hv ) v (v ) Hv λ (v ) v, Next, suppose λ is an eigenvalue for the real symmetric matrix H R n n and let the columns of the matrix U R n k form an orthonormal basis for the subspace Null(λ I H), where k dim(null(λ I H)). Let the columns of U R n (n k) form an orthonormal basis for the subspace Null(λ I H) and set Ũ [U U ] R n n. hen Ũ Ũ I, that is, Ũ is a unitary matrix. In particular, Ũ Ũ and so ŨŨ I as well. We have the following relationships between U, U, and H: Consequently, HU λ U, U HU λ U U λ I k and (U HU ) U HU λ U U 0 (n k) k. (45) Ũ HŨ [ U U ] H [ U U ] [ U U ] [ ] [ ] [HU ] U HU HU U HU λ I U HU U k 0 HU 0 U, HU and so (46) H ŨŨ HŨŨ [ ] [ ] [ λ U U I k 0 U 0 U HU hese observations provide the foundation for the following eigenvalue theorem for real symmetric matrices. heorem.. [Eigenvalue Decomposition for Symmetric Matrices] Let H R n n be a real symmetric matrix. hen there is a unitary matrix U such that H UΛU, where Λ : diag(λ, λ,..., λ n ) with λ, λ,..., λ n being the eigenvalues of H repeated according to multiplicity. U ].

. EIGENVALUE DECOMPOSIION OF SYMMERIC MARICES 39 Proof. We proceed by induction on the dimension. he result is trivially true for n. Assume that the result is true for all dimensions k < n with n > and show it is true for all n n symmetric matrices. Let H R n n be symmetric and let λ be any eigenvalue of H with k dim(null(λ I H)). Let U R n k and U R n (n k) be as in (45) and (46) above. If k n, the result follows from (45) so we can assume that k < n. Since (45) is a similarity transformation of H, Ũ HŨ has the same characteristic polynomial as H: det(λi n H) (λ λ ) k q(λ), where q(λ) det(λi n k U HU ). herefore, the eigenvalues of U HU are necessarily those of H that are not equal to λ and each has the same multiplicity as they have for H. Apply the induction hypothesis to the (n k) (n k) matrix U HU to obtain a real unitary matrix V R (n k) (n k) such that U HU V ΛV, where Λ diag(µ, µ,..., µ (n k) ) with µ, µ,..., µ (n k) being the eigenvalues of H that are not equal to λ with each having the same multiplicity as they have for H. hen, by (46) H [ ] [ ] [ ] λ U U I k 0 U 0 U HU U [ ] [ ] [ ] [ ] [ ] I U U k 0 λ I k 0 Ik 0 U 0 V 0 Λ 0 V U. he result is obtained by setting and observing that U U I. U [ ] [ ] I U U k 0 [ U 0 V U V ] One important consequence of this result is the following theorem heorem.. [he Rayleigh-Ritz heorem] Let the symmetric matrix H R n n have smallest eigenvalue λ min (H) and largest eigenvalue λ max (H). hen, for all u R n, λ min (H) u u Hu λ max (H) u, with equality holding on the left for every eigenvector u for λ min (H) and equality holding on the right for every eigenvector u for λ max (H). Proof. Let H UΛU be the eigenvalue decomposition of H in heorem. with Λ diag(λ, λ,..., λ n ). hen the columns of U form an orthonormal basis for R n. herefore, given any u R n \ {0}, there is a z R n \ {0} such that u Uz. Hence n u Hu (Uz) UΛU (Uz) z Λz λ j zj. Clearly, λ min (H) z n j λ min (H)z j n λ j zj he result now follows since z z z z U Uz u u u. j j n λ max (H)zj λ max (H) z. he following definition describes some important concepts associated with symmetric matrices that are important for optimization. Definition.. Let H R n n. () H is said to be positive definite if x Hx > 0 for all x R n \ {0}. () H is said to be positive semi-definite if x Hx 0 for all x R n. (3) H is said to be negative definite if x Hx < 0 for all x R n \ {0}. (4) H is said to be positive semi-definite if x Hx 0 for all x R n. (5) H is said to be indefinite if H is none of the above. We denote the set of real n n symmetric matrices by S n, the set of positive semi-definite real n n symmetric matrices by S n +, and the set of positive definite real n n symmetric matrices by S n ++. It is easily seen that S n is a vector space. heorem. provides necessary and sufficient conditions under which a symmetric matrix H is positive/negative definite/semi-definite. For example, since λ min (H) u u Hu with equality when u is an eigenvector associted j

40 4. OPIMIZAION OF QUADRAIC FUNCIONS with λ min (H), we have that H is positive definite if and only if λ min (H) > 0. Similar results can be obtained for the other cases. An additional property of positive semi-definite matrices is that they possess square roots. If H R n n is symmetric and positive semi-definite, then heorem. tells us that H UΛU, where U is unitary and Λ diag(λ,..., λ n ) with λ i 0, i,..., n. If we define Λ / : diag( λ,..., λ n ) and H / UΛ / U, then H UΛU UΛ / U H / H /, so H / provides a natural notion of the square root of a matrix. However, H / is not uniquely defined since we can always re-order the diagonal elements and their corresponding columns to produce the same effect. In addition, H / is always symmetric while in some instances choosing a nonsymmetric square root may be beneficial. For example, if we consider the linear least squares problem (43), then H A A. Should A be considered a square root of H? In order to cover the full range of possible considerations, we make the following definition for the square root of a symmetric matrix. Definition.. [Square Roots of Positive Semi-Definite Matrices] Let H R n n be a symmetric positive semi-definite matrix. We say that the matrix L R n n is a square root of H if H LL.. Optimality Properties of Quadratic Functions Recall that for the linear least squares problem, we were able to establish a necessary and sufficient condition for optimality, namely the normal equations, by working backward from a known solution. We now try to apply this same approach to quadratic functions, in particular, we try to extend the derivation in (3) to the objective function in (47). Suppose x is a local solution to the quadratic optimization problem (47) minimize x R n x Hx + g x, where H R n n is symmetric and g R n, i.e., there is an ɛ > 0 such that (48) x Hx + g x x Hx + g x x x + ɛb, where x + ɛb : {x + ɛu u B } and B : u u (hence, x + ɛb {x x x ɛ}). Note that, for all x R n, (49) herefore, for all x x + ɛb, x Hx (x + (x x)) H(x + (x x)) x Hx + x H(x x) + (x x) H(x x) x Hx + (x + (x x)) H(x x) + (x x) H(x x) x Hx + x H(x x) + (x x) H(x x) + (x x) H(x x) x Hx + x H(x x) (x x) H(x x). x Hx + g x ( x Hx + g x) + (Hx + g) (x x) (x x) H(x x) and so ( x Hx + g x) + (Hx + g) (x x) (x x) H(x x), (50) (x x) H(x x) (Hx + g) (x x) x x + ɛb. Let 0 t ɛ and v B and define x x + tv x + ɛb. If we plug x x + tv into (50), then (since x is a local solution) (5) t v Hv t(hx + g) v. Dividing this expression by t > 0 and taking the limit as t 0 tells us that 0 (Hx + g) v v B, which implies that Hx + g 0. Plugging this information back into (5) gives t v Hv 0 v B. Dividing by t / for t 0 tells us that v Hv 0 v B or equivalently, that H is positive semi-definite. hese observations motivate the following theorem.

. OPIMALIY PROPERIES OF QUADRAIC FUNCIONS 4 heorem.. [Existence and Uniqueness in Quadratic Optimization] Let H R n n and g R n be as in (47). () A local solution to the problem (47) exists if and only if H is positive semi-defnite and there exists a solution x to the equation Hx + g 0 in which case x is a local solution to (47). () If x is a local solution to (47), then it is a global solution to (47). (3) he problem (47) has a unique global solution if and only if H is positive definite in which case this solution is given by x H g. (4) If either H is not positive semi-definite or there is no solution to the equation Hx + g 0 (or both), then inf x R n x Hx + g x. Proof. () We have already shown that if a local solution x to (47) exists, then Hx + g 0 and H is positive semi-definite. On the other hand, suppose that H is positive semi-definite and x is a solution to Hx + g 0. hen, for all x R n, we can interchange the roles of x and x in the second line of (49) to obtain Hence, for all x R n, x Hx x Hx + x H(x x) + (x x) H(x x). x Hx + g x x Hx + g x + (Hx + g) (x x) + (x x) H(x x) x Hx + g x, since Hx + g 0 and H is positive semi-definite. hat is, x is a global solution to (47) and hence a local solution. () Suppose x is a local solution to (47) so that, by Part (), H is positive semi-definite and Hx + g 0, and there is an ɛ > 0 such that (48) holds. Next observe that, for all x, y R n and λ R, we have (( λ)x + λy) H(( λ)x + λy) ( λ)x Hx λy Hy or equivalently, ( λ) x Hx + λ( λ)x Hy + λ y Hy ( λ)x Hx λy Hy λ( λ)x Hx + λ( λ)x Hy λ( λ)y Hy λ( λ)(x y) H(x y), (5) (( λ)x + λy) H(( λ)x + λy) ( λ)x Hx + λy Hy λ( λ)(x y) H(x y). Since H is positive semi-definite, this implies that (53) (( λ)x + λy) H(( λ)x + λy) ( λ)x Hx + λy Hy λ [0, ]. If x is not a global solution, then there is an ˆx such that f(ˆx) < f(x), where f(x) : x Hx + g x. By (48), we ɛ must have x ˆx > ɛ. Set λ : x ˆx so that 0 < λ <, and define x λ : ( λ)x + λˆx x + λ(ˆx x) so that x λ x + ɛb. But then, by (53), f(x λ ) ( λ)f(x) + λf(ˆx) < ( λ)f(x) + λf(x) f(x), which contradicts (48). Hence, no such ˆx can exist so that x is a global solution to (47). (3) If (47) has a unique global solution x, then x must be the unique solution to the equation Hx + g 0. his can only happen if H is invertible. Hence, H is invertible and positive semi-definite which implies that H is positive definite. On the other hand, if H is positive definite, then it is positive semi-definite and there is a unique solution to the equation Hx + g 0, i.e., (49) has a unique global solution. (4) he result follows if we can show that f(x) : x Hx + g x is unbounded below when either H is not positive semi-definite of there is no solution to the equation Hx+g 0 (or both). Let us first suppose that H is not positive semi-definite, or equivalently, λ min (H) < 0. Let u R n be an eigenvector associated with the eigenvalue λ min (H) with u. hen, for x : tu with t > 0, we have f(tu) λ min (H) t + tg u t since λ min (H) < 0, so f is unbounded below. Next suppose that there is no solution to the equation Hx + g 0. In particular, g 0 and g / Ran(H) Null(H). hen the orthogonal projection of g onto Null(H) cannot be zero: ĝ : P Null(H) (g) 0. Hence, for x : tĝ with t > 0, we have f( tĝ) t ĝ t, so again f is unbounded below.

4 4. OPIMIZAION OF QUADRAIC FUNCIONS he identity (5) is a very powerful tool in the analysis of quadratic functions. It was the key tool in showing that every local solution to (47) is necessarily a global solution. It is also remarkable, that a local solution exists if and only if H is positive definite and there is a solution to the equation Hx + g 0. We now show how these results can be extended to problems with linear equality constraints. (54) In this section we consider the problem 3. Minimization of a Quadratic Function on an Affine Set minimize x Hx + g x subject to Ax b, where H R n n is symmetric, g R n, A R m n, and b R m. We assume that the system Ax b is consistent. hat is, there exists ˆx R n such that Aˆx b in which case Consequently, the problem (54) is of the form (55) minimize x ˆx+S {x Ax b} ˆx + Null(A). x Hx + g x, where S is a subspace of R n. his representation of the problem shows that the problem (54) is trivial if Null(A) {0} since then the unique solution ˆx to Ax b is the unique solution to (54). Hence, when considering the problem (54) it is always assumed that Null(A) {0}, and furthermore, that m < n. Definition 3.. [Affine Sets] A subset K of R n is said to be an affine set if there exists a point ˆx R n and a subspace S R n such that K ˆx + S {ˆx + u u S }. We now develop necessary and sufficient optimality conditions for the problem (55), that is, for the minimization of a quadratic function over an affine set. For this we assume that we have a basis v, v,..., v k for S so that dim(s) k. Let V R n k be the matrix whose columns are the vectors v, v,..., v k so that S Ran(V ). hen ˆx + S {ˆx + V z z R k }. his allows us to rewrite the problem (55) as (56) minimize z R k (ˆx + V z) H(ˆx + V z) + g (ˆx + V z). Proposition 3.. Consider the two problems (55) and (56), where the columns of the matrix V form a basis for the subspace S. he set of optimal solution to these problems are related as follows: {x x solves (55)} {ˆx + V z z solves (56)}. By expanding the objective function in (56), we obtain (ˆx + V z) H(ˆx + V z) + g (ˆx + V z) z V HV z + (V (H ˆx + g)) v + f(ˆx), where f(x) : x Hx + g x. If we now set Ĥ : V HV, ĝ : V (H ˆx + g), and β : f(ˆx), then problem (56) has the form of (4): (57) minimize z R k z Ĥz + ĝ z, where, as usual, we have dropped the constant term β f(ˆx). Since we have already developed necessary and sufficient conditions for optimality in this problem, we can use them to state similar conditions for the problem (55). heorem 3.. [Optimization of Quadratics on Affine Sets] Consider the problem (55). () A local solution to the problem (55) exists if and only if u Hu 0 for all u S and there exists a vector x ˆx + S such that Hx + g S, in which case x is a local solution to (55). () If x is a local solution to (55), then it is a global solution. (3) he problem (55) has a unique global solution if and only if u Hu > 0 for all u S \ {0}. Moreover, if V R n k is any matrix such that Ran(V ) S where k dim(s), then a unique solution to (55) exists if and only if the matrix V HV is positive definite in which case the unique solution x is given by x [I V (V HV ) V H]ˆx V (V HV ) V g.

3. MINIMIZAION OF A QUADRAIC FUNCION ON AN AFFINE SE 43 (4) If either there exists u S such that u Hu < 0 or there does not exist x ˆx + S such that Hx + g S (or both), then inf x ˆx+S x Hx + g x. Proof. () By Proposition 3., a solution to (55) exists if and only if a solution to (56) exists. By heorem., a solution to (56) exists if and only if V HV is positive semi-definite and there is a solution z to the equation V (H(ˆx + V z) + g) 0 in which case z solves (56), or equivalently, by Proposition 3., x ˆx + V z solves (55). he condition that V HV is positive semi-definite is equivalent to the statement that z V HV z 0 for all z R k, or equivalently, u Hu 0 for all u S. he condition, V (H(ˆx + V z) + g) 0 is equivalent to Hx + g Null(V ) Ran(V ) S. () his is an immediate consequence of Proposition 3. and Part () of heorem.. (3) By heorem., the problem (56) has a unique solution if and only if V HV is positive definite in which case the solution is given by z (V HV ) V (H ˆx + g). Note that V HV is positive definite if and only if u Hu > 0 for all u S \ {0} which proves that this condition is necessary and sufficient. In addition, by Proposition 3., x ˆx + V z [I V (V HV ) V H]ˆx V (V HV ) V g is the unique solution to (55). (4) his follows the same pattern of proof using Part (4) of heorem.. heorem 3.. [Optimization of Quadratics Subject to Linear Equality Constraints] Consider the problem (54). () A local solution to the problem (54) exists if and only if u Hu 0 for all u Null(A) and there exists a vector pair (x, y) R n R m such that Hx + A y + g 0, in which case x is a local solution to (55). () If x is a local solution to (55), then it is a global solution. (3) he problem (55) has a unique global solution if and only if u Hu > 0 for all u Null(A) \ {0}. (4) If u Hu > 0 for all u Null(A) \ {0} and rank (A) m, the matrix [ ] [ [ ] H A x M : is invertible, and the vector M A 0 y] g b has x as the unique global solution to (55). (5) If either there exists u Null(A) such that u Hu < 0 or there does not exist a vector pair (x, y) R n R m such that Hx + A y + g 0 (or both), then inf x ˆx+S x Hx + g x. Remark 3.. he condition that rank (A) m in Part (4) of the theorem can always be satisfied by replacing A by first row reducing A to echelon form. Proof. () Recall that Null(A) Ran(A ). Hence, w Null(A) if and only if there exists y R m such that w A y. By setting w Hx + g the result follows from Part () of heorem 3.. () Again, this is an immediate consequence of Proposition 3. and Part () of heorem.. (3) his is just Part (3) of heorem 3.. [ [ x 0 (4) Suppose M, then Hx + A y] 0] y 0 and Ax 0. If we multiply Hx + A y on the left by x, we obtain 0 x Hx + x A y x Hx which implies that x 0 since x Null(A). But then A y 0, so that y 0 since rank (A) m. Consequently, Null(M) {0}, i.e., M is invertible. he result now follows from Part (). (5) By Part (), this is just a restatement of heorem 3. Part (4). he vector y appearing in this heorem is call a Lagrange multiplier vector. Lagrange multiplier vectors play an essential role in constrained optimization and lie at the heart of what is called duality theory. his theory is more fully developed in Chapter??. We now study how one might check when H is positive semi-definite as well as solving the equation Hx + g 0 when H is positive semi-definite.

44 4. OPIMIZAION OF QUADRAIC FUNCIONS 4. he Principal Minor est for Positive Definiteness Let H S n. We wish to obtain a test of when H is positive definite without having to compute its eigenvalue decomposition. First note that H ii e i He i, so that H can be positive definite only if H ii > 0. his is only a sanity check for whether a matrix is positive definite. hat is, if any diagonal element of H is not positive, then H cannot be positive definite. In this section we develop a necessary and sufficient condition for H to be positive definite that makes use of the determinant. We begin with the following lemma. Lemma 4.. Let H S n, u R n, and α R, and consider the block matrix [ ] H u Ĥ : u S (n+). α () he matrix Ĥ is positive semi-definite if and only if H is positive semi-definite and there exists a vector z R n such that u Hz and α z Hz. () he matrix Ĥ is positive definite if and only if H is positive definite and α > u H u. Proof. [ ]() Suppose H is positive semi-definite, and there exists z such that u Hz and α z Hz. hen for x any ˆx where x n R and x R n, we have x n ˆx Ĥ ˆx x Hx + x Hx n z + x nα (x + x n z) H(x + x n z) + x n(α z Hz) 0. Hence, Ĥ is positive semi-definite. Conversely, suppose that Ĥ is positive semi-definite. Write u u + u where ( u Ran(H) and u x Ran(H) Null(H), so that there is a z R n such that u Hz. hen, for all ˆx R xn) (n+), 0 ˆx Ĥ ˆx x Hx + x n u x + αx n x Hx + x n (u + u ) x + αx n x Hx + x n z Hx + x nz Hz + x n(α z Hz) + x n u x (x + x n z) H(x + x n z) + x n(α z Hz) + x n u x. ( ) tu aking x n 0 tells us that H is positive semi-definite, and taking ˆx for t R gives α t u 0 for all t R, ( ) z which implies that u 0. Finally, taking ˆx, tells us that z Hz α which proves the result. () he proof follows the pattern of Part () but now we can take z H u. If the matrix H is invertible, we can apply a kind of block Gaussian elimination to the matrix Ĥ in the lemma to obtain a matrix with block upper triangular structure: [ ] [ ] [ ] I 0 H u H u ( H u) u α 0 (α u H. u) One consequence of this relationship is that [ ] [ ] [ ] H u I 0 H u det u det α ( H u) det u α ([ ] [ ]) I 0 H u det (58) ( H u) u α [ ] H u det 0 (α u H u) det(h)(α u H u). We use this determinant identity in conjunction with the previous lemma to establish a test for whether a matrix is positive definite based on determinants. he test requires us to introduce the following elementary definition.

5. HE CHOLESKY FACORIZAIONS 45 Definition 4.. [Principal Minors] he kth principal minor of a matrix B R n n is the determinant of the upper left hand corner k k submatrix of B for k n. Proposition 4.. [he Principal Minor est] Let H S n. hen H is positive definite if and only if each of its principal minors is positive. Proof. he proof proceeds by induction on the dimension n of H. he result is clearly true for n. We now assume the result is true for k n and show it is true for dimension n +. Write [ ] Ĥ u H : u. α hen Lemma 4. tells us that H is positive definite if and only if Ĥ is positive definite and α > u Ĥ u. By the induction hypothesis, Ĥ is positive definite if and only if all of its principal minors are positive. If we now combine this with the expression (58), we get that H is positive definite if and only if all principal minors of Ĥ are positive and, by (58), det(h) det(ĥ)(α u Ĥ u) > 0, or equivalently, all principal minors of H are positive. his result only applies to positive definite matrices, and does not provide insight into how to solve linear equations involving H such as Hx + g 0. hese two issues can be addressed through the Cholesky factorization. 5. he Cholesky Factorizations We now consider how one might solve a quadratic optimization problem. Recall that a solution only exists when H is positive semi-definite and there is a solution to the equation Hx + g 0. Let us first consider solving the equation when H is positive definite. We use a procedure similar to the LU factorization but which also takes advantage of symmetry. Suppose [ α h ] H, where H S n. H h Note that α e He > 0 since H is positive definite (if α 0, then H cannot be positive definite), so there is no need to apply a permutation. Multiply H on the left by the Gaussian elimination matrix for the first column, we obtain [ ] [ 0 L H α h ] [ α h ] h I h H 0 H α h h. By symmetry, we have L HL α [ α h 0 H α h h ] [ h α 0 I ] [ α 0 0 H α h h Set H H α h h. Observe that for every non-zero vector v R (n, ( ) [ ] ( ) ( ( )) ( ( v 0 α 0 0 H v L 0 v 0 H v H L 0 v > 0, v)) which shows that H is positive definite. Decomposing H as we did H gives [ α h ] H, where H S (n ). H h Again, α > 0 since H is positive definite (if α 0, then H cannot be positive definite). Hence, can repeat the reduction process for H. But if at any stage we discover and α i 0, then we terminate, since H cannot be positive definite. If we can continue this process n times, we will have constructed a lower triangular matrix L : L L L n such that L HL D, where D : diag(α, α,..., α n ) is a diagonal matrix with strictly positive diagonal entries. On the other hand, if at some point in the process we discover an α i that is not positive, then H cannot be positive definite and the process terminates. hat is, this computational procedure simultaneously tests whether H is positive definite as it tries to diagonalize H. We will call this process the Cholesky diagonalization procedure. It is used to establish the following factorization theorem. ].

46 4. OPIMIZAION OF QUADRAIC FUNCIONS heorem 5.. [he Cholesky Factorization] Let H S n + have rank k. hen there is a lower triangular matrix L R n k such that H LL. Moreover, if the rank of H is n, then there is a positive diagonal matrix D and a lower triangular matrix L with ones on it diagonal such that H LD L. Proof. Let the columns of the matrix V R n k be an orthonormal basis for Ran(H) and the columns of V R n (n k) be an orthonormal basis for Null(H) and set V [V V ] R n n. hen [ ] V V HV V H[V V ] [ ] V HV V HV V HV V HV [ V HV 0 0 0 Since Ran(H) Null(H ) Null(H), V HV R k k is symmetric and positive definite. By applying the procedure described prior to the statement of the theorem, we construct a nonsingular lower triangular matrix L R k k and a diagonal matrix D diag(α, α,..., α k ), with α i > 0, i,..., k, such that V HV LD L. Set L LD / so that V HV L L. If k n, taking V I proves the theorem by setting L L. If k < n, ] [ ] [ L L 0 V H [V V ] (V L)(V L). 0 0 Let (V L) R k n have reduced QR factorization (V L) QR (see heorem 5.). Since L has rank k, Q R k k is unitary and R [R R ] with R R k k nonsingular and R R k (n k). herefore, he theorem follows by setting L R. V ]. H (V L)(V L) R Q QR R R. When H is positive definite, the factorization H LL is called the Cholesky factorization of H, and when rank (H) < n it is called the generalized Cholesky factorization of H. In the positive definite case, the Cholesky diagonalization procedure computes the Cholesky factorization of H. On the other hand, when H is only positive semi-definite, the proof of the theorem provides a guide for obtaining the generalized Cholesky factorization. 5.. Computing the Generalized Cholesky Factorization. Step: Initiate the Cholesky diagonalization procedure. If the procedure successfully completes n iterations, the Cholesky factorization has been obtained. Otherwise the procedure terminates at some iteration k + < n. If α k+ < 0, proceed no further since the matrix H is not positive semi-definite. If α k+ 0, proceed to Step. Step : In Step, the factorization [ ] D L H L 0, 0 Ĥ where ] [ L 0 L L I (n k) with L R k k lower triangular with ones on the diagonal, D diag(α, α,..., α k ) R k k with α i > 0 i,..., k, and Ĥ R(n k) (n k) with Ĥ symmetric has a nontrivial null space. Let the full QR factorization of Ĥ be given by [ ] [ ] R R Ĥ [U U] R U, 0 0 0 where - U [U U ] R k k is unitary, ) - the columns of U R k k form an orthonormal basis for Ran(Ĥ) with k rank (Ĥ < k, - the columns of U R k (k k) for an orthonormal basis for Null(Ĥ), - R R k k is upper triangular and nonsingular,

5. HE CHOLESKY FACORIZAIONS 47 - R R k (k k), and - R [R R ] R k k. Consequently, [ ] [ ] U ĤU 0 U ĤU U ĤU 0 0 U ĤU U ĤU U ĤU [ ] R [U 0 U ] [ ] RU RU, 0 0 and so RU 0 and U ĤU RU R k k is a nonsingular symmetric matrix. Note that only the reduced QR factorization of H U R is required since U ĤU RU. Step 4: Initiate the Cholesky diagonalization procedure on U ĤU. If the procedure successfully completes k iterations, the Cholesky factorization U ĤU L 3 L 3 has been obtained. If this does not occur, the procedure terminates at some iteration j < k with α j < 0 since U ĤU is nonsingular. In this case, terminate the process since H cannot be positive semi-definfite. Otherwise proceed to Step 5. Step 5: We now have ] [ ] ] [ L 0 D 0 [ L H L L I (n k) 0 Ĥ 0 I (n k) ] [I ] [ L [ ] [I ] ] 0 0 D 0 0 [ L L L I (n k) 0 U 0 U ĤU 0 U 0 I (n k) ] [ L D 0 0 L 0 0 L 0 L3 L L U U 3 0 0 U 0 0 0 0 U ] [ L D D/ 0 0 / L D/ L L D/ 0 L U L3 0 3 U 0 0 [ ] [ L 0 L L ] L U L3 0 L 3 U, where L L D/ R k k is lower triangular, L L D/ R (n k) k, and U L3 R (n k) k. In particular, k + k rank (H) since L has rank k and U L3 has rank k. Let L 3 U have QR factorization L 3 U V L 3, where V R k k is unitary and L 3 R k (n k) is lower triangular. hen [ ] [ L 0 L H L ] [ ] [ ] [ ] [ ] L 0 L L U L3 0 L 3 U L L L 3 V L 0 L 0 V L L 3 L L 3 0 L, 3 since V V I k. his is the generalized Cholesky factorization of H. 5.. Computing Solutions to the Quadratic Optimization Problem via Cholesky Factorizations. Step : Apply the procedure described in the previous section for computing the generalized Cholesky factorization of H. If it is determined that H is not positive definite, then proceed no further since the problem (4) has no solution and the optimal value is. Step : Step provides us with the generalized Cholesky factorization for H LL with L [L L ], where L R k k and L R (n k) k with k rank (H). Write ( ) g g, g

48 4. OPIMIZAION OF QUADRAIC FUNCIONS where g R k and g R (n k). Since Ran(H) Ran(L), the system Hx + g 0 is solvable if and only if g Ran(L). hat is, there exists w R k such that Lw g, or equivalently, L w g and L w g. Since L is invertible, the system L w g has as its unique solution w L g. Note that w is easy to compute by forward substitution since L is lower triangular. Having w check to see if L w g. If this is not the case, then proceed no further, since the system Hx + g 0 has no solution and so the optimal value in (4) is. Otherwise, proceed to Step 3. Step 3: Use back substitution to solve the equation L y w for y : L w and set ( ) y x. 0 hen Hx LL x [ L L ] ( ) [L L y ] 0 [ L L ] w g. Hence, x solves the equation Hx + g 0 and so is an optimal solution to the quadratic optimization problem (4). 6. Linear Least Squares Revisited We have already see that the least squares problem is a special case of the problem of minimizing a quadratic function. But what about the reverse? Part (4) of heorem. tells us that, in general, the reverse cannot be true since the linear least squares problem always has a solution. But what about the case when the quadratic optimization problem has a solution? In this case the matrix H is necessarily positive semi-definite and a solution to the system Hx+g 0 exists. By heorem 5., there is a lower triangular matrix L R n k, where k rank (H), such that H LL. Set A : L. In particular, this implies that Ran(H) Ran(L) Ran(A ). Since Hx+g 0, we know that g Ran(H) Ran(A ), and so there is a vector b R k such that g A b. Consider the linear least squares problem min x R n Ax b. As in (44), expand the objective in this problem to obtain Ax b x (A A)x (A b) x + b x LL x + g x + β x Hx + g x + β, where β b. We have just proved the following result. Proposition 6.. A quadratic optimization problem of the form (4) has an optimal solution if and only if it is equivalent to a linear least squares problem. 7. he Conjugate Gradient Algorithm he Cholesky factorization is an important and useful tool for computing solutions to the quadratic optimization problem, but it is too costly to be employed in many very large scale applications. In some applications, the matrix H is too large to be stored or it is not available as a data structure. However, in these problems it is often the case that the matrix vector product Hx can be obtained for a given vector x R n. his occurs, for example, in a signal processing applications. In this section, we develop an algorithm for solving the quadratic optimization problem (47) that only requires access to the matrix vector products Hx. Such an algorithm is called a matrix free method since knowledge the whole matrix H is not required. In such cases the Cholesky factorization is inefficient to compute. he focus of this section is the study of the matrix free method known as the conjugate gradient algorithm. hroughout this section we assume that the matrix H is positive definite.

7. HE CONJUGAE GRADIEN ALGORIHM 49 7.. Conjugate Direction Methods. Consider the problem (47) where it is known that H is symmetric and positive definite. In this case it is possible to define a notion of orthogonality or congugacy with respect to H. Definition 7. (Conjugacy). Let H S++. n H-orthogonal) if x Hy 0. We say that the vectors x, y R n \{0} are H-conjugate (or Proposition 7.. [Conjugacy implies Linear Independence] If H S n ++ and the set of nonzero vectors d 0, d,..., d k are (pairwise) H-conjugate, then these vectors are linearly independent. Proof. If 0 k µ i d i, then for ī {0,,..., k} i0 Hence µ i 0 for each i 0,..., k. 0 (dī) H[ k i0 µ i d i ] µ ī (dī) Hdī, Let x 0 R n and suppose that the vectors d 0, d,..., d k R n are H-conjugate. Set S Span(d 0, d,..., d k ). heorem 3. tells us that there is a unique optimal solution x to the problem min { x Hx g x x x 0 + S }, and that x is uniquely identified by the condition Hx + g S, or equivalently, 0 (d j ) (Hx + g), j 0,,..., k. Since x x 0 + S, there are scalars µ 0,..., µ n such that (59) x x 0 + µ 0 d 0 +... + µ k d k, and so, for each j 0,,..., k, herefore, 0 (d j ) (Hx + g) (d j ) ( H(x 0 + µ 0 d 0 +... + µ k d k ) + g ) (d j ) (Hx 0 + g) + µ 0 (d j ) Hd 0 +... + µ k (d j ) Hd k (d j ) (Hx 0 + g) + µ j (d j ) Hd j. (60) µ j (Hx0 + g) (d j ) (d j ) Hd j j 0,..., k. his observation motivates the following theorem. heorem 7.. [Expanding Subspace heorem] Consider the problem (47) with H S++, n and set f(x) x Hx + g x. Let {d i } n i0 be a sequence of nonzero H-conjugate vectors in R n. hen, for any x 0 R n the sequence {x k } generated according to with x k+ : x k + t k d k, t k : arg min{f(x k + td k ) : t R}, has the property that f(x) x Hx + g x attains its minimum value on the affine set x 0 + Span {d 0,..., d k } at the point x k. In particular, if k n, then x n is the unique global solution to the problem (47). Proof. Let us first compute the value of the t k s. For k 0,..., k, define ϕ k : R R by ϕ k (t) f(x k + td k ) t (dk ) Hd k + t(g k ) d k + f(x k ), where g k Hx k + g. hen, for k 0,..., k, ϕ k (t) t(dk ) Hd k + (g k ) d k and ϕ k (t) (dk ) Hd k > 0. Since ϕ k (t) > 0, our one dimensional calculus tells us that ϕ k attains its global minmimum value at the unique solution t k to the equation φ k (t) 0, i.e., tk (gk ) d k (d k ) Hd k. herefore, x k x 0 + t 0 d 0 + t d + + t k d k

50 4. OPIMIZAION OF QUADRAIC FUNCIONS with t k (gk ) d k (d k ) Hd k, k 0,,..., k. In the discussion preceding the theorem it was shown that if x is the solution to the problem min { f(x) x x 0 + Span(d 0, d,..., d k ) }, then x is given by (59) and (60). herefore, if we can now show that µ j t j, j 0,,..., k, then x x k proving the result. For each j {0,,..., k} we have (g j ) d j (Hx j + g) d j ( H(x 0 + t 0 d 0 + t d + + t j d j ) + g ) d j (Hx 0 + g) d j + t 0 (d 0 ) Hd j + t (d ) Hd j + + t j (d j ) Hd j (Hx 0 + g) d j (g 0 ) d j. herefore, for each j {0,,..., k}, which proves the result. t j (gj ) d j (d j ) Hd j (g0 ) d j (d j ) Qd j µ j, 7.. he Conjugate Gradient Algorithm. he major drawback of the Conjugate Direction Algorithm of the previous section is that it seems to require that a set of H-conjugate directions must be obtained before the algorithm can be implemented. his is in opposition to our working assumption that H is so large that it cannot be kept in storage since any set of H-conjugate directions requires the same amount of storage as H. However, it is possible to generate the directions d j one at a time and then discard them after each iteration of the algorithm. One example of such an algorithm is the Conjugate Gradient Algorithm. he C-G Algorithm: Initialization: x 0 R n, d 0 g 0 (Hx 0 + g). For k 0,,,... t k : (g k ) d k /(d k ) Hd k x k+ : x k + t k d k g k+ : Hx k+ + g (SOP if g k+ 0) β k : (g k+ ) Hd k /(d k ) Hd k d k+ : g k+ + β k d k k : k +. heorem 7.. [Conjugate Gradient heorem] he C-G algorithm is a conjugate direction method. If it does not terminate at x k (i.e. g k 0), then () Span [g 0, g,..., g k ] span [g 0, Hg 0,..., H k g 0 ] () Span [d 0, d,..., d k ] span [g 0, Hg 0,..., H k g 0 ] (3) (d k ) Qd i 0 for i k (4) t k (g k ) g k /(d k ) Hd k (5) β k (g k+ ) g k+ /(g k ) g k. Proof. We first prove ()-(3) by induction. he results are clearly true for k 0. Now suppose they are true for k, we show they are true for k +. First observe that g k+ g k + t k Hd k so that g k+ Span[g 0,..., H k+ g 0 ] by the induction hypothesis on () and (). Also g k+ / Span [d 0,..., d k ], otherwise, by heorem 3. Part (), g k+ Hx k+ + g 0 since the method is a conjugate direction method up to step k by the induction hypothesis. Hence g k+ / Span [g 0,..., H k g 0 ] and so Span [g 0, g,..., g k+ ] Span [g 0,..., H k+ g 0 ], which proves (). o prove () write d k+ g k+ + β k d k

7. HE CONJUGAE GRADIEN ALGORIHM 5 so that () follows from () and the induction hypothesis on (). o see (3) observe that (d k+ ) Hd i (g k+ ) Hd i + β k (d k ) Hd i. For i k the right hand side is zero by the definition of β k. For i < k both terms vanish. he term (g k+ ) Hd i 0 by heorem 7. since Hd i Span[d 0,..., d k ] by () and (). he term (d k ) Hd i vanishes by the induction hypothesis on (3). o prove (4) write (g k ) d k (g k ) g k β k (g k ) d k where (g k ) d k 0 by heorem 7.. o prove (5) note that (g k+ ) g k 0 by heorem 7. because g k Span[d 0,..., d k ]. Hence herefore, (g k+ ) Hd k t k (g k+ ) [g k+ g k ] t k (g k+ ) g k+. β k t k (g k+ ) g k+ (d k ) Hd k (gk+ ) g k+ (g k ) g k. Remarks: () he C G method is an example of a descent method since the values f(x 0 ), f(x ),..., f(x n ) form a decreasing sequence. () It should be observed that due to the occurrence of round-off error the C-G algorithm is best implemented as an iterative method. hat is, at the end of n steps, x n may not be the global optimal solution and the intervening directions d k may not be H-conjugate. Consequently, the algorithm is usually iterated until g k is sufficiently small. Due to the observations in the previous remark, this approach is guarenteed to continue to reduce the function value if possible since the overall method is a descent method. In this sense the C G algorithm is self correcting.