TITLE: Why does the maximum/minimum of linear programming occurs at a vertex?
QUESTION [24 upvotes]: I'm in high-school and I'm told that the maximum/minimum of a linear programming occurs at the vertex.For more info see the chapter here. For convinience I'm putting relevant excerpt here:

Now, we see that every point in the feasible region satisfies all the constraints, and since there are infinitely many points, it is not evident how
  we should go about finding a point that gives a maximum value of the objective function. To handle this situation, we use the following theorems which are fundamental in solving linear programming problems. The proofs of these theorems
  are beyond the scope of the book.
Theorem 1 Let R be the feasible region (convex polygon) for a linear programming
  problem and let Z = ax + by be the objective function. When Z has an optimal value
  (maximum or minimum), where the variables x and y are subject to constraints described
  by linear inequalities, this optimal value must occur at a corner point (vertex) of the
  feasible region.
Theorem 2 Let R be the feasible region for a linear programming problem, and let
  Z = ax + by be the objective function. If R is bounded, then the objective function
  Z has both a maximum and a minimum value on R and each of these occurs at a
  corner point (vertex) of R

I searched wikipedia here to get under Optimal vertices (and rays) of polyhedra:

"..then the optimum value is always attained on ... This principle underlies the simplex algorithm for solving linear programs.."

But I couldn't understand it. Can someone explain?It might be helful to add that I have studied basic Calculus.

REPLY [9 votes]: Suppose you are not at a vertex of the convex region. If you are in the strict interior of the convex region, then you can move a little bit in any direction you want. In particular, if your objective is $ax + by$ then you can move a little bit in the direction of $(a,b)$ and get a higher objective function value. Similarly, if you are on an edge, let $(a_1,b_1)$ be a vector parallel to the edge. Then either the dot product of $(a_1,b_1)$ with $(a,b)$ is greater than or equal to zero, or less than or equal to zero. In the first case, you can move along the edge in direction $(a_1,b_1)$ until you hit a vertex and get at least as good of a solution, and in the second case you can move along the edge in direction $(-a_1,-b_1)$ until you hit a vertex and you will get at least as good of a solution. Put all the pieces together and you get that some vertex provides the optimal solution.