 Now, what if suppose if I gave you two affine sets, suppose S1 is an affine set, S2 is an affine set. So, these are affine sets. What can you say about the intersection, S1 intersection S2? What can you say about the intersection S1 intersection S2? Think about it, think about it this way. Suppose we know this wall is an affine set, now say there is another, consider another wall perpendicular to it, so the wall behind that is also an affine set. When these, where do these two intersect? They intersect at that corner line there, just imagine that is extended from in both directions all the way till infinity, then now that intersection, is that an affine set? That is also an affine set, so the intersection, so if I take any two affine sets, this is also an affine, so if the intersection of two affine sets is affine, what about the intersection of, so the intersection of any number of affine sets is actually affine. So, now if I give you a set C, some sets C in Rn and then I look at the following quantity. The intersection of all sets S, such that S contain C and S is affine, so ranging over all affine sets that contain C, if I take the intersection, what can you say about this particular object, so you are taking some body like this, some body C that lies some set C like this and then you are taking all affine sets that contain C, so the thing that I have boxed here, that is itself an affine set, because it is an intersection of affine set, so this is itself an affine set and in fact, so since it is itself an affine set and it must contain C because all of the, all the S's also contain C, so it is an affine set that contains C, so it is in fact included in this list here, with the list when you run over all the affine sets that contain C, this intersection that is also one of them, so what does that mean, this intersection is actually the smallest affine set containing C. So, let us try to imagine what this sort of thing looks like, there is a name for it, let me tell you the name, this is what is called the affine hull of C, so what does this set look like, so suppose we were in R2, the way I have drawn it here, we were in R2 and this is my set C, what is the, give me one affine set that contains this set C, the plain R2 itself, that is one example of an affine set that contains C, is there any other affine set that contains C, if you think about it you, in R2 there is just not enough space to fit in another affine set, which is not R2 itself, so let me draw another figure for you just to make this easier, consider suppose just this little segment here, what is the affine hull of this, it is the line that passes through these points, so why would this be the affine hull, give me an example, can you tell me an affine sets that contain this segment, R2 itself is one of them, then this line is also one of them, that is also an affine set, so R2 itself and this line, so as you go about taking the intersection of all the affine sets that contain it, what you will be left with is just this line segment. Now suppose instead of having, instead of this being a line segment, this was not, it was not a line but say a pipe like this at some thickness, some slight thickness, so it is now actually a rectangle, now what is the affine hull of this, R2, the minute it acquire some thickness basically even however small, the only way you can contain it in an affine set is to put it into the is to contain the affine set as the full space, so in this case the affine hull would become the full space, so what is the affine hull capturing, the affine hull is capturing what the essential dimension of that particular object is, so you can take an object and immerse it into any high dimensional space by assigning it as many coordinates as you like, but really what is this true intrinsic dimension, you will know that only when you look at the smallest affine set that you need, so that the object lies in it, so the thin segment that I had first drawn, it had drawn it in R2 but it is actually a one dimensional object but that little square or rectangle that is actually a two dimensional object, I need an additional dimension in order to describe it, so the dimension of a set, because of this we can now talk of the dimension of a set, the dimension of C is simply the dimension of the affine hull of C which is the same as the dimension of the subspace, the subspace V that you would get by shifting the affine hull, by shifting that affine set, subspace V, we wrote this subspace V here which was by just simply shifting the space, shifting the affine set, that is the dimension of that subspace is the dimension, it can be taken as the dimension of the set C, this also let us define things like when does the set have an interior, so this relates to another concept called the relative interior, relative interior of a set C is defined this way, so we remember what the interior of a set C was defined as, what was the interior of a set C, hint of C or we denoted also by C with a circle on top, what was this, this was all points X, X in C such that you could find a radius R around that point such that if you took the ball of radius R around it, that ball completely lied in C, this was the interior of a set, it is also the same as taking the union of all open sets that contain that are contained in C, this was the definition of the interior of C, so by this definition if I took a little segment like this, this segment like this in R2, does this if I take this as my set C, does this segment have an interior, because if I take any point here on it and take a ball around it, however small I make the radius, the ball will always spill outside the outside the set, so this sort of segment does not have an interior in R2, but we can define what is called the relative interior, the relative interior of C is all those points in C such that there exists an R greater than 0, such that you do, you look at the ball of radius R, but intersect that ball with the affine hull of C, that ball, so you take the ball in the full space then intersect it with the affine hull, that will basically slice, that will slice through the ball and what you will get is you can say a lower dimensional disc or something like that, that must lie in C, so this is what is called the relative interior, so now let us look at this example, so take this point here again, take a ball around it, this point, so you take a ball around it, what is the affine hull of C, it was this line here, so I took the ball, I take the ball intersected with this line, what am I left with, a little segment, so this was my ball, intersected with this line, I am left with just a segment like this and that segment does lie in C, so what the relative interior is capturing is again as I said the, whether the object essentially has an interior irrespective of which, what kind of space you have immersed it in or what kind of space you have used to express it, so the ball is tied to the dimension of the ambient space which is the number of coordinates you have chosen, but it is possible that the object has an interior if you leave us, if you leave a few coordinates, if you express it only fewer coordinates and the fewest number of coordinates you need is captured by the affine hull of C, so this is important because many times you can, in optimization problems when you, it is possible that your optimization problem has an interior or does not have an interior, whether it has an interior or not depends on whether you have introduced additional variables for example, so when you introduce additional variables what you do is you are expressing the problem in a higher dimensional space than you need to, so it is possible that in a difference, in a larger, the higher dimensional space it does not have an interior, but if you, but in a lower dimensional space it does and then that structure can be exploited, so this is what is called the relative interior. So then the most important concept for us is what is the concept of a convex set, so S is said to be let us call it, this is a set in R n is said to be a convex set if for all x, y in S and for all alpha belonging to 0, 1 alpha x plus 1 minus alpha y belongs to S, so I am sure you have seen this at some point of time, so take any two points in the set, take the line segment joining the two points, the entire line segment must, then the set is said to be convex, so convex set for example, looks like this, this is an example of a convex set, take two points here, the entire segment lies in it, these two points, this entire segment lies in it and so on. So let me ask you a few simple things, is a convex, is an affine set a convex set? An affine set is always a convex set, because of course it contains not only the segment, but the entire line joining the, passing through the two points, so an affine set is a convex set, is it possible for a convex set to be say open for example? No, there is no problem at all, convex set can be open, convex set can be closed, so openness and closeness has nothing to do with whether it is convex or not, these are completely separate properties. What if I take the intersection of two convex sets, so suppose C 1, C 2 are convex, then what about C 1 intersection C 2, always convex, here is a convex set for example, I intersected with another convex set, the intersection is also convex. So if C is convex and I take and let X 1 till X k be points in C, then this thing here, again let us call this Y again, so alpha i X i, i ranging from 1 to k, where now alpha is sum to 1 as before, so this if I left it as summing to 1, then this would be an affine combination of points X 1 till X k. So now in this case I am going, they are going to sum to 1 and in addition to that I am also going to impose that alpha is are all greater than equal to 0, so these are non-negative and sum to 1. Then in this case this is called a convex combination, so if C is convex then what can you say about convex combinations of points in C, so you take some k points, take any convex combination of those k points, what can you say about the convex combination Y, also lie in C, so you can imagine it is not, so C is, so it is not very hard to imagine, let me just show you. So take two points here, say let us take three points for example, the convex combination of these two points, any convex combination which will make the segment that lies in C, this segment lies in C, this segment lies in C, all three of those segments lie in C, now I can do more, now that I know the center segment lies in C, I can take this sort of thing and take this sort of thing, eventually start taking any of these kind of segments and I would have covered the entire triangle. So the every possible convex combination of the three vertices of these triangles would be covered by this, so this is not very hard to see, what is more interesting is actually the following, so C is actually the same as C is equal to the set of all convex combinations of points in C. So if you take all possible convex combinations of points in C, of course they lie in C, but C does not contain any additional points on top of that, C is the set of all convex combination of points in C. So now since arbitrary intersections of convex sets are convex, we can again do what we did with an affine hull, so let us S be any set, let S be any set in Rn and now I will define this thing, this is the intersection of all sets C, C that contain S and C is convex, so this is the intersection of all convex sets that contain S. So what sort of set is this, this is itself a convex set, moreover it is a convex set that contains S, so it is also the smallest convex set that contains S. So this is actually equal to, this is the smallest convex set containing S and there is a name for this, this is what is called the convex hull of S. So can you describe for me the convex hull of a set in a different way, can you describe for me the convex hull of a set in a different way, one way is to take the intersection of all convex sets that contain that set. So you put together all the convex sets, keep taking the common whatever is the area that is common in it, that will give you a smallest convex set that contains the set that is that is one way of defining the convex hull is in S. So that is correct, so this is also the set of all convex combinations points in S. So which is another way of saying the same thing is this is the summation Xi alpha i, i ranging from 1, let me write this on the other side, the set of vectors like this summation alpha Xi i ranging from 1 till k. Now my alphas are, I need to make sure this is a convex combination, so my alphas sum to 1, i ranging from 1 to k, this sums to 1, my alphas are also non-negative, this ensures that I have a convex combination. Does this, is this it, does this define for me, yeah I need to also allow for choosing any Xi that belong to the set S. So X1 till Xk all belong to S, what else is that it, without saying that X1 till Xk if I belong to S, if I remove this, if I remove the constraint this requirement at X1 till Xk belong to S, then I will be looking at the all convex combinations of specific k point X1 till Xk, that is not what we are looking for, we want all possible convex combinations of any number of any point. So I need to allow for X1 to Xk to also vary, but is that all, if I stop at this, this would be in convex combinations of just k point, it will not include k plus 1 point, convex combination of k plus 1, k plus 3, etc, right. So I also need to let k be in it, yes, yeah it could be different. So there is another result actually what is called Carretholder's theorem, which gives you a bound on how many k do you need, so that we do not have time to discuss that, it turns out you do not need to take too many more than the dimension of this. So that is a separate result altogether, but prior if without any, without that result, I cannot say anything, see for one way to check this is to say if k is 2 for example, I will get convex individual segments, right. So just in the k, let us suppose if I took 3 points X1, X2, X3, I will get 3 segments like this, okay. But now if I took, but then you are, if you allow the excess to vary, then I can start generating of some additional segments. So it turns out so in, since we are in 2 dimensions here, 2 is enough, okay, you do not need to take 3 at a time. But then this is, this is, yeah it is much more complicated than, I mean it takes some, it requires a separate result altogether, okay.