[Music] today we are going to start this exciting Journey on a subject called convex optimization convex optimization involves the minimization of a convex function subject to a convex set C now of course this is a very special class of optimization problems this class is special and why it is important to applications and why good algorithms can be constructed about it that would be essentially the matter of this course so we would now like to refresh our knowledge about Maxima and Minima so in doing so we'll go back to high school once again and we'll concentrate
on a function say from R to R and let us see what we have learned in high school and let us see what we mean by a minimum of f of course this meaning of minimum is clearly understood because a point x of R is called minimum if f of x is bigger than F of xar for every X in RN for every X INR so you see here let us draw a diagram to show you one such example so this function FX is a parabola x square where you can see at xal to 0
the function reaches a minimum this function FX is the absolute value of x and at this point x xar equal to Z this also achieves a minimum both of these two functions though we have not defined convex functions yet are also convex functions but this is not the only part of the story because one has to remember that I can give you a function where this might not always be true for example let me look into this function this function is nice continuous but here I pull it down so this function becomes unbounded below so
there is no lower bound so we cannot really speak about a global minimum or the minimum the as the way we had defined earlier so the question uh now arises can can anything be extracted from this picture if you look at this picture carefully look at this point xar if I want to call it xar look at this range so for all X which is bigger than x Tilda here f ofx is bigger than F of xar this xar is not really the global minimum but then it could be helpful in many other ways and
we call such an xar a local minimum more clearly if we if I want to define a local minimum then let us do it in a more U audite question a point xar in R is called a local minimum a local minimum of f over r if there exists Delta greater than zero such that I'm writing a short hand St for such that f of x is bigger in value than F of xar for every X this is the mathematics symbol of for all the word for all is symbolized like this for all X in
the open interval xar minus Delta to xar + Delta for all X in this open interval excluding these two points xar minus Delta and xar plus Delta now this definition is there and I would uh request you to look into this inter interesting thing where I have a function which does not have either a local Minima or a local Maxima it is both unbounded below and above this function FX is equal to x a cube this function does not have a local Minima a local Maxima nothing in fact nor Global Minima nor Global Maxima of
course you you might ask me I've have been using the term local Maxima without defining it but you can define local Maxima in the way I have defined local Minima or and global global Maxima in the way I have defined Global Maxima but there are certain functions which can be both unbounded below and bounded above and does not have any such things like local or Global Maxima once we have said this let us observe one little fact that if from R to r that we have defined is minimized or maximized over R can this Max
maximization and minimization be done if we restrict it to restrict this function over a subset the answer is very simple but before I go into anything else let me tell you in the whole course we would be essentially talking about minimization of a function because minimizing a function f x over X belonging to RN sorry X belonging to R is same as taking the Maxima of the negative and then take a Maxima again to take a Maxima over the negative and then take a negative again to get the minimum so it is enough to speak
about the minimum once you talk about the minimum you can also talk about the maximum now let me tell you something uh interesting in the the sense that let us look back again at this function FX = x² so if I talk about this class of functions FX = to x² then 0 was the minimum over whole of R but now let me say let me pose you the problem of minimizing this function FX = to x² over X restricted say to with the interval one two so basically now I now you can easily see
the minimum value here is achieved at x equal to 1 is a actually the global minimum now let us do a thing let us go back look at again at this function FX equal to xq if I restrict if I now call for minimizing FX of equal to X Cube over the same interval 1 2 you will immediately see that the minimum is achieved in fact the global minimum is achieved at x equal to 1 so it clearly shows that the same problem which did not have a global Maxima Global Minima local Maxima local Minima
has a global minimum at xal to 1 and has a global maximum at xal to 2 so the whole problem Paradigm changes once you add certain restrictions on the variables such restrictions are called constraints restrictions on the variable are called constraints so with this very basic idea we will now expand our dimensions in the sense that we will now look at the problem of min mizing a function f over X in RN of course you know RN the N dimensional ukian space is a collection of vectors X where X is represented through a npple of
n numbers or rather a coordinate of n numbers where each of these XI belongs to the real number set that is each of the XI are real numbers RN as you know is an important space and is equipped with the inner product so take any X in RN and any Y in RN this inner product is defined as follows that is you take the first component of X multiply it with the first component of Y and then take the second component of Y multiply them add them together and keep on doing so so this inner
product is basically a generalization of multiplication of two real numbers we must now go and try to Define what is the meaning of a local Minima we you know what how to define a global Minima I need not to stress this issue of global Minima we need to define a local Minima for a function from RN to R but before doing so we need to speak about the notion of neighborhood in RN I understand that this course uh or these lectures are been followed by a wide category of people rather it's not that it is
just been observed by mathematicians or people interested in mathematical optimization I believe that it is also see been seen by engineers and engineering students and uh people working in operations research people working in industrial engineering so the idea here is not to be too mathematically correct to say a neighborhood in RN we can say mathematically as follows that if I take a point xbar in RN then any open set which contains xar can is defined as a neighborhood in Orin but instead of doing so we will be slightly not so rigorous but for us largely
neighborhood would mean the following ball a ball of radius R centered at xbar this consists of all Zed in RN whose distance from xbar is this is strictly less than r R now you might call suddenly I have given these two signs and I'm calling this as distance between xar and Zed now this distance the distance of a point x from the origin of the space RN is often written like this and referred to as the norm of X but this Norm actually of point in RN actually means the distance of x from zero so
how the norm is defined so for our case what we Define would be called a ukian norm or a two Norm in doing so how do we Define the equan norm and that is done again through an inner product suppose I take the inner product of X with respect to X so this would become the def by definition this is simply a repeated application of the Pythagorean theorem and that would lead to the definition of Norm X because you see this is nothing but the distance of x from zero calculated via the Pythagorean theorem a
celebrated result in ukian Geometry which everybody seeing this course would know because it is taught in the school level now the very definition of the norm is because it's a length We cannot put plus minus root over we just have to put the positive sign so the norm has every criteria of a distance because certain properties of Norm I want to write down so nor of X is equal to0 if and only if x is the zero Vector if you scale up the vector X whether you scale it up through a negative number or positive
number the answer is that the length of the new Vector is the absolute value of Lambda times the norm of X and then there's this famous rule which says that the triangle inequality which is based on the fact that sum of two angles sum of two sides of a triangle is always greater than the third this is called the triangle inequality quite it would be quite helpful now once I have this idea of distance from zero of course we can Define the distance between two points X and Zed or X and Y distance between X
and Y in RN is given as so once this is done once you know this you can actually draw a ball now let me take xar equal to0 and let me take R sorry r equal to 1 this is sometimes called as the unit ball so how would it look like and of course take RN to be R2 basically I am taking n = 2 so if you look at this pict picture so you have zero and anything which is within the distance one but it should not be exactly one so it is you look
at this circular part the circle so points on the circle are not in the neighborhood because the neighborhood has to be an open set I'm assuming that you have some idea about open and closed sets any point here this this dotted part apart from the boundary this dotted part is what is called sometimes just denoted as this bold B so this is called the unit ball so if you take any ball centered at any other xar it would look like this of any radius R of course you can Define the closed ball which is defined
like this is the closure of the ball that we have defined it will be set of all Zed such that Z minus xar of course z is in RN less than or equal to R we me means that we are now considering the boundary also so then this whole thing would become this one now how do I go about defining a local minimum the definition of a local Minima goes as follows a point see we are now what is a neighborhood as such neighborhood is nothing but generalization of the notion of a interval open interval
around the point like like we had said xar plus Delta and xar minus Delta is just the generalization of that in a higher dimensional space a point xar in RN is a local minimum of f if there exists Delta greater than zero such that the functional value of x is bigger than the functional value at xar for all X in the open ball centered at X of radius Delta just remember when we write this we always say these balls this is the center of the ball now once you know this you could now come and
write down the definition for a local Maxima you could now try to write down the definition of a local minimum for constraint problem that is now we put restrictions on x so you might ask me what is your convex optimization where has your convex functions Etc all these things vanished see convex optimization mean a subass of optimization problems a very very important subass but however it is imperative on us that we have a look at the basic facts about Maxima and Minima because without understanding these very basic things it's not really possible to go get
into the depth of convex optimization uh a good news is that when we do convex optimization we need not think about local Minima we just have to think about global Minima because the importance of convex City or convex optimization stems from the fact that whenever we minimize a convex function over a convex set every local minimiz is a global Minima there is nothing called a local Minima in convex optimalization and that is why the subject is so powerful so important so important in applications now we go for a local minimum for a constraint problem so
here we are looking at a problem of minimizing FX over X element of some s where s is a subset of RN which could be whole of RN it could be a proper subset and f as before a function from R in to R so you see these functions are always mapping an element in RN to R because then we can actually new do the comparison of course there's a wealth of literature wealth of optimization which talks about minimization of functions when functions are defined from RN to say RM so that's a whole gamut of
a different subject called Vector optimization which we won't discuss so here what we do is we have to observe that when we talk about a local minimum we need to restrict ourselves to the set s suppose this is my set s suppose this is not really the thing because this is just an abstract discussion the interesting part of mathematics is that just by doing certain abstract discussions you can bring up on certain very important points immediately to the focus of the discussion you see if this is my xar and I want to say it is
a local minimum then obviously you are sure that for every X in the set s FX bar need not be smaller than FX so what we do is to show that there would be a ball of radius Delta such that for this intersection of of the ball with s that is on this part for every X in this part function value at X here would be bigger than FX bar that is xar is a local minimum if there exists Delta greater than Z such that for all X in the ball surrounding xar of radius Delta
that is centered at xar and of radius Delta s and also in C so all X which is in the this particular set which is intersection of B Delta xar and C F ofx goes over xar so you now take the responsibility of defining local Maxima and a global Maxima Global Maxima is obviously when you have this definition over all X belonging to RN so uh once these basic facts are known let us go ahead and ask this question how do we find a minimum so in order to find a minimum we must first know
how does a minimum behave that if I have a local minimum does it has have some property if it has some property does it allow us to compute easily such a point which satisfies the property then the point that we get is it really a minimum so there are few steps in finding a minimum the first thing we have to know how does a minimum behave means that is does it necessarily follow certain conditions when we compute such a point which satisfies such a condition the necessary condition we cannot just declare it to be a
minimum unless we have certain additional checks can we have additional checks on the point which satisfies the necessory condition to determine whether it is actually a minimum or not these leads us to certain questions the questions are just given an F it's very difficult to say what sort of a condition this minimum local minimum or even the global one would follow so what we want to say is that if you put certain additional conditions on F something more you know about f it might help one such condition is differentiability now when we are talking about
differentiability it is very very important to note the following that here we are going to talk about differentiability of a function from RN to R but most of us are usually habituated in talking about the differentiability of a function from R to R now how do we manage to by some intution to move from the definition of a derivative from R to R to the definition of a derivative in R to R so let us just go back and for the time mean consider the standard case of R2 R then the derivative of this function
if that exists at xbar is defined as a limit as H tends to zero where H is the increment of xar okay now I can write this thing in slightly more more compact way I can say that okay look I can just bring in here because now this is a constant function it the limit will have no effect on it so I can write down the whole thing as this is very clear this manipulation is simple and now observe one thing that if this quantity when divided by H and as H tends to zero in
the limit gives me zero such a quantity is called the small o of H that is f of xar + H minus FX bar minus f- xar H is called the small o of H this is the called the small O So In general the derivative for a function from R to R would satisfy this expression now how do I generalize this idea to a function for from RN to R that's the question so it's all about generalizing this idea now let me tell you at the very beginning I'm not being extremely rigorous one can
be extremely rigorous and defining G derivative fresher derivative and doing a lot of other things and showing relations between them but in instead of that I prefer to go by the intution and that would uh really help you have some fun and really get on get a hang of the answer before you have really figured logically figured things out so that's a bit of fun we can always do now here I would go back just go back for a second I would generalize this part for this case Okay instead of going back to a different
page let me generalize it from here how do I generalize now instead of H going to zero because H would be now a vector not a real number I can just take okay the norm of H is going to zero and then I have F of xar + 8 H minus F of xar minus some vector v which we call the derivative of F at xar now here instead of multiplication here would be changed to inner product because multiplication is generalized as inner product in RN for higher Dimensions this divided by Norm AG this limit
should be equal to zero this the same thing we now writing this is equal to zero now let us uh note a certain thing this V here is called the derivative of the function from R into R so we have just generalized this fact just put in here so you can also write it like this you can also put F of xar + H minus F of xar or equal to F of xar + VH plus small o of Norm of H so you can say okay this is the definition that there must be a
vector v which satisfies this condition and that V is called the derivative of F at xar now how does f of xar look like so that's a very important question F of xar now the derivative of F at xar which is V how does it look like like it would be a small exercise for you to compute that this is a vector consisting of the partial derivatives because there n variables which we write and that this partial derivative is evaluated at xbar and this is given as a symbol gradient of F at xar this is
a standard thing known to most of us so this is what the derivative is and most more uh precisely it is called the fresher derivative from a more mathematical point of view fresh a derivative after named after the French mathematician morce freser so we will not get into so much of details so much of but just for us this is what we would use as the derivative so here you can now replace V with grad of f of xar now let us show something what now if I have this definition of grad of f of
xar can I say something about the local Minima if xar is a local Minima now let us look at local Minima see every drawing has to be in R2 drawings cannot be in R3 or RN R3 sometimes but it's quite difficult to uh really get a hang off because we are ourselves in three-dimensional spaces we can only visualize things in threedimensional spaces but it is better to visualize thing the thing we can much easily visualize things in two Dimension so that is why most of this drawings where even when people draw abstract sets in say
banak spaces or topological Vector spaces they think in pictures in r two so so xar is a local minimum now you have a open neighborhood Delta that is open Ball P Delta X such that for every X inside this f of x is bigger than f of x bar now what does this mean so this is your vector xar now take any Direction w now move a certain distance along the direction W from X so that is xar plus Lambda W but I can make such a small movement so that I can remain I can
make take Lambda greater than zero to be small so that I can remain within this set you can take it less than zero and come this side also doesn't matter because of the symmetry of the ball so let me take Lambda greater than Zer whatever w i take I can always move in the direction W because you see I'm moving in a direction parallel so I am parallel to W so I can move along the direction W from xar but I can choose my Lambda so small that I can still remain in the ball B
Delta X bar so this is my so what I can do is that this thing can Al always be kept in B Delta xar xar plus Lambda W so when I choose my Lambda sufficiently small I can always keep this xar plus Lambda W which is this ve Point inside the ball so by definition of a local minimum F of xar + Lambda W minus FX bar R must be greater than equal to zero but then you must observe a fact that now I can apply the definition of differentiation once I apply the definition of
differentiation I will have from here gradient of xar xar plus Lambda W minus xar which will just leave me with Lambda W plus order small o of Norm of Lambda W that is greater than equal to zero so this would imply gradient of FX bar Lambda W plus o of Lambda now you might ask me where did this W vanish you see how does what are these uh o functions or small o functions so small o h functions suppose I have function like this H squ + H so this is a small H function because
if I divide by H this becomes H into H + sorry I'll just uh h² + H H so take the function h s + H Cub so now what I can do do I can take H and here keep H Square now if I divide by H and take take limit as H tends to zero this will go to zero because here H will go to zero and H Square will go to zero so this is an O quantity now if you see if I make multiply this by Lambda here o o Lambda H
here I'll have Lambda Square H square and Lambda Cube H Cub so I can just just take the Lambda out in the similar fashion and divide by Lambda and take Lambda to 0 and get the same answer so instead of writing whenever you have Lambda multiplied with a vector it is same as writing the as if the order quantity is same as the order quantity of Lambda so you can always do this trick now what I do because Lambda is strictly bigger than zero I can divide by Lambda to get this condition now I will
take Lambda going to Zero from the positive side because Lambda is positive this is U modern symbolism Lambda going down arrow zero now this quantity by the very definition will vanish we'll go to zero as we take the limit so as Lambda tends to zero we have now you must note that this thing that grad FX bar W is greater than equal to zero but you should also note that this W was arbitrary I could have taken any other W I could have taken any other W and I could have gone and have the same
sort of argument and did the same calculations so that would lead to the fact that this is true for every W you have in RN so now I will put W equal to minus grad of FX bar so that would give me grad of FX bar minus grad of FX bar to be greater than equal to zero but do you see I can take the minus sign out just by with the very definition of the very definition of inner product I can take the minus sign out and then what you can do is that you
can now observe that this is once you forget the minus here this is the inner product of x x and x means not x and x two same vectors so this is by definition is the norm square of FX bar this implies that grad of FX bar but the distance is always non- negative Norm of X has to be neg non- negative because it's the distance from zero so which means gr of FX bar Square here because it cannot be less than equal to zero if it is less than equal to Z the only option
left is it has to be zero and this would imply that grad of FX bar equal to zero and this would imply grad of FX bar equal to Z because Norm of x equal to 0 if and only if x is equal to Z so so grad of FX bar has to be the zero vector and this is what is called the necessary optimality condition or the pharma's necessary optimality condition or the pha's rule so if xar is a local minimum then now one has to remember certain things here that this condition is a necessary
condition I can show you a function like FX = to X Cube whose derivative is zero at a point but that point is not a local minimum because Here If You observe if you calculate f- 0 it is nothing but zero for this function but 0 is not a local or Global minimum so this condition is necessary it is not always sufficient but for some cases yes if you take FX = to x² you see in this case when FX is x square you have f- 0 is equal to 0 and 0 is the global
minimum so if f is from R to R it is left to you to decide what is this condition this is the standard thing that you have learned in school F High School rather f-x equal to Z so this condition is necessary this is very very important not sufficient so any point which satisfies this condition need not be a minimum you have to put additional conditions to show that it is a minimum those conditions Etc will not be as per say the discussion of our story because for a convex case this condition becomes necessary and
sufficient ient so tomorrow we are going to talk about convex functions and convex sets and we shall show we shall prove that if for a convex function every local minimum is global and then show the certain additional properties which makes convexity important so with this very basic idea about Maxima Minima and the derivation of the necessary condition and with the knowledge of the differentiability of a function we will stop our discussion for today and tomorrow we'll start our discussion on convex optimization so before I go uh I would say that uh you might ask me
about some books to have a general idea about Maxima Minima uh the book that I would really prefer is a book called stories about Maxima and Minima by Vladimir Tio Vladimir Tio is a great optimization theorist Russian optimization theorist stories about Maxima and Minima published by AMS now a cheaper Edition is also available but mind you you need to have some sort of little mathematical maturity at least at the high school level to understand this book so thank you very much for your attention and we hope to continue tomorrow with convex optimization in proper thank
you [Music] [Music] [Music]