Now we consider a constrained optimization problems. I would say that the applicability of these material concerning constrained optimization is much broader than in case or the unconstrained. So the majority I would say 99% of all problems in economics where we need to apply calculus they belong to this type of problems with constraints. I'll provide examples from microeconomics for instance. Let's suppose we have a utility maximization problem. Then we deal with the objective function which is utility function of a consumer and this function should be maximized subject to the budget constraint which looks like no greater than the income or the consumer. But also we include the non-negativity constraints for the variables in the form of- or we can choose a problem from production theory. For example, let us assume a case over two factor production function. This is a cost minimization problem which looks like, we'll take the wage rate multiplied by the labor employed, the rental rate of capital times capital. This amount should be minimized subject to the production function. So the costs should be minimized but the output should be equal to q and also non-negativity constraints for the factors and these two examples show us that the constraints may differ. So the budget constraint here in utility maximization problem looks like an inequality. Non-negativity constraints they're all inequalities. The same true for labor capital constraints no-negativity constraints. But the production function which provides the output in the amount of Q is equality. So we start with the equality constraints which are easier to consider. And let us consider the simplest, probably the simplest constrained optimization problem for a function of two variables with one constraint. We have two functions, function f and function g which continuous differentiable for all x and y values and we're considering. Let's choose the maximization case to be concrete. So let us consider the problem where we are looking for the maximum values of the function which is subject to a constraint and here we have b which is b is a real number. Well introducing b in this equation gives us a more flexible approach which will be used later will see. And I'll draw the diagram on which, first of all I'll draw the graph or this equation. So here this graph as a curve consists of all (x,y) coordinates satisfying this equation. To be more specific, let's suppose that below this curve g is less than b. Above this curve, g is greater than b. How to draw, how to represent graphically the objective function f. It can be done with the help of the level curves. For instance, this is a level curve at each point of which a function takes some value C and we have a variety of such curves. For example this is also a curve and this is also a curve and let's suppose that the level curves with a greater values or the function. They are situated in the how to say geographically North Eastern direction. That means that if we would like to draw the gradient vector or the function f at this particular point. This is a point where a level curve of f and the curve representing the equation is a constraint. They touch each other. So there is a common tangent line which passes through this point and which is tangent both to the both curves. So in terms of the gradient of f, since as I said, the value of the function grows in the North Eastern direction, the gradient will look like that. And I'll be using a shorthand which is nabla f. Nabla f is the same as grad f but more convenient because it's a shorthand. So this is nabla f. But at the same time this curve representing this equation is a specific level curve for the function g and we know it was a proposition proven earlier when we considered the implicit function theorem that a gradient at a point which belongs to a level curve is perpendicular to this level curve at this point. That means that the gradient over g is also perpendicular to this common tangent line so they're both parallel to each other and well not necessarily they have the same length. So these longer arrow will be an indication of gradient of g. Once again I'm using nabla as notation for the gradient. So we can tell that unless gradient is zero but since I have drawn this vector it's not. There exists as we see from this drawing, from this diagram, there exists lambda star. First of all let me introduce the coordinate of this point where two level curves touch each other by x star y star. Then there exists lambda star which is a multiplier connecting two gradients and we can write that the gradient of f taking at this a point x star y star equals the product. This is a vector lambda star multiplied by the gradient of g at this point.