Maximize a linear function
- A linear function is a function that can be written as a linear equation, which means that the graph of the function is a straight line.
- A linear function is also called an affine function.
Thus, the gradient vector points in a perpendicular direction relative to the level curves. The gradient of a vector has both direction and magnitude, and the magnitude of the vector’s gradient is also valuable. [Graph] But what is the magnitude of the gradient? So to talk about that, you can look at another warm-up problem about functions of the form Ax + By + C Imagine you have a linear function L of (x, y), which equals 3x plus 4y. L(x,y) = 3x + 4y Consider a simple example in which you start at 0, and then you can move in any direction by distance 1. You can pick any direction and move a distance 1. How can we maximize L? Therefore, here is a picture to illustrate the problem. [Graph] We can start with the number 0, and then take a distance of 1 from the origin. This will give us a point on our graph, which can be anywhere on the blue circle whose radius is 1. We would like to choose a direction so that the function L is as large as possible. The other thing you see in the picture is the level curves of the function L.