Okay, so let us take a look at convex analysis. So we always start by defining comeback sets and convex functions. So let us start with comeback sets. Let us say there is a set F this said in general, maybe a space in the R N space. Okay, so somehow there are If there is a point in this set, f is a vector with elements. Okay, so a set is convex if the following. All right. So if for any given X one next to that is already in the state f given any longer within zero and one if you do some kind of restricted linear combination between X one and X two and if all those things that are combined through this way is also in F, then we say you are convex. So that is first graphically understand this. Suppose we are talking about a two dimensional world, then given a point and another point inside the set. If you do this kind of combination, we are going to connect these two points with the line segment. So the condition really says if you have two points that are in a set and then that implies the line segment is also in the set for all possible two points. Then you are having a comeback set. Okay, so this one, this one, This one, This one. This one. Whatever. Two points you select in the set. The connecting line segment also lies in the set. Then we know this is a convex set. So another example is here. Suppose we have this particular set? Okay, then when you choose X one, the next to the line segment does not entirely lie in the set. Then the second set here is not a comeback set. So in general, you may not draw graphs for one dimensional problems, but that's not a big deal, because your ex one pretty much is a vector. Okay, so there are several elements. Your X two is also a vector. Pretty much there are elements. So this is nothing but a way to do linear combination. It is just that the long dark, the coefficient is required to be within zero and one. So that is how you are getting the connecting segment instead of having all other things that are outside the line segment of X one next to okay, this has a special name. This is called a convex combination. Well, when you are doing the near combination where you restrict the coefficient lambda to be within zero and one, then you are doing a convex combination. So the convex said is really said in the following thing. He says that if you have two vectors in the given set and then they are convex combination, all lies in the set. Then that particular set is a convex set. So then a very similar thing can be defined as convex functions. Suppose we are talking about a function where the domain is a convex set. Okay, so the domain is in iron. So that means we are talking about several functions where the input, our inputs, maybe vectors with elements. Okay, so a function which converts those un dimensional vectors into a real number. A function is convex over this F Okay, if the following thing is true, So what is this? This is saying that we are having two vectors. The first factor is X one. The second factor is X two. These two vectors lie in the set and then for any possible way to do a convex combination. We have this dance than or equal to condition the thing that you first combined the two vector and then input that into the function would be destined. Recall to you first, evaluate the height of these two functions, and then you do a complex combination. Okay, the second one would be higher than the first one. So again, let us take a look at the graph to get some intuition. That is a we have a function which look like this. Okay, so in that sense, if we have x one and x two, the left hand side says that is first combined X one next to, for example, let us use 1/4 when one third to combine X one x two Okay, so that is one thing. And after we do the combination, we may take a look at how high that particular value is. Okay, we may plugging along the x one plus one minutes from the X two and then get the height. Okay, which is here. On the contrary, we may evaluate f of x one x f of x two f of x y is here f of X to be there. If we do a linear combination of the function values okay, then the height is here after the combination, so we may see that here the second height is higher than the first height. So that is why we say this inequality is true. So intuitively. Actually, it is very simple. As long as your function looks like having an upward curvature, Then whenever you take two points, if you connect that functional points, if you connect their objective values, then the line segment connecting the two objective values should lie both your functional values. Okay, If that line segment lies above your function values, then this is a complex set. Okay, so you are come back, said pretty much always have an upward curvature so that if you cut here, the line segment is always above the function. If you cut here, cut here, you cut there. Are having this property. Okay, your line segment should lie both your functional points. All right, so your comebacks function Maybe of all kinds of shapes like this, like that, or like this. So as long as it has an upward curvature or it opens part is to the top, pretty much you are talking about a complex function. This is actually another example showing you what function is not convex. So for this particular example, if you take one value s X one the other value also explains here the other value X tools here. And then if you connect the tool, functional values, then you are going to see that the line segment sometimes lies below your functional values. And if that is the case, then we do not say this is convex function. Okay, so we may see that the left hand side, this one is a convex function. And the right hand side one is not a convex function simply by drawing a cutting line and then see whether you're lying lies completely above your functional values. So that is the intuition. So we we will have another condition which is called concave functions. So given the same conditions, the function is concave over the set F if it is a negation, is convex. Okay, so that is the definition. So if you are having convex functions like this, then you are concave function would be having downward curvature. Pretty much so. Here are some examples that I will quickly go through. This is a complex set, because if you take any two points within 10 and 20. Let us say 11 and 12. You connect that line segment all the points there lie within 10 and 20. So this is convex. Okay. The open interval of 10 and 20 is also convex. The set of all integers. This is not I mean positive integers. This is not a convex set because if you take one and the two you connect them. You get something like one 0.5. This is not in the set. So the set of all natural numbers. This is not convex. The set of all real numbers is convex. Okay, the set X five here is simply a graph where you have a circle here. Okay, so if you are talking about a circle like this, then you are going to have a comeback set. Okay, so it the set does not just include the circle. It also include the whole area inside the circle, then is convex right? The last one is the opposite. So we have everything except the area inside the circle. Okay. In that case, if you take two points like this and then you connect them, the connecting line segment does not completely lie inside the set. That is why it is non convex. Okay, so that is about comebacks. Sets for complex functions. This one looks like a straight line. All right, so whenever you take two points here and there, if you make a connection there, the connecting line segment does not lie below the set below the function point. So this is convex, even if it does not lie, really, both that particular functional values. But you may, you may already remember that we are talking about this than or equal to. So this satisfies the condition. So the next one is you will have X Square plus to something like this. So obviously, this is comebacks, and then you have your favorite sine function. Okay, so for sine function, probably you still remember that is something like this. All right, so you do not really need to memorize the details. All you need to know is that sign function pretty much look like waves. Okay. And here, when your X is zero, your side function is zero. When his pie, it goes back to zero again. When it is two pi, it goes back to zero again. So obviously, this is not just a curve having upward curvature. So this is not a comeback set. But if you focus on the region between Pi and two pi, this is having an upward curvature. Right? So this is comebacks. The next one is about the lock function. So the log function is here pretty much like this. Okay, so it does not really matter which region you are talking about. It has downward curvature is not convex. But if you want, you may say it is concave. Okay, this is indeed a concave function. But somehow our problem ask you about whether it's convex. No, it is not convex. So the last one is something that is harder to draw because it is a two dimensional function. All right, so the two dimensional function maps two dimensional point to some kind of Z values. Okay, But you may still imagine that if you have a three dimensional illustration, then pretty much we are having a ball that is having an upward curvature. Okay, so in that case, when we have this ball which has an upward curvature, then this is also convex. Okay, so these are some definitions and examples of convex sets and convex functions