3.2 Linear Programming
A linear cost, linear inequalities, and a dual that is also an LP.
These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.
The figures follow Deisenroth, Faisal, and Ong, Mathematics for Machine Learning.
1. Linear cost, linear inequalities
A linear program is the special case where and the constraints are linear. In machine learning that is how you optimize a linear model under linear limits, and how you write some feature-selection and dimension-reduction tasks so a solver can hit the feasible set.
Level sets of a linear cost are parallel hyperplanes. Inequality constraints are half-spaces. The feasible set is a polyhedron (shaded). The min, if it exists, sits at a vertex or on a face.

2. The primal
with and . That is variables and linear constraints.
3. Dual of an LP
Lagrangian, with ,
Collect terms in :
Stationarity in forces
Then , and the dual is itself an LP with variables:
Solve the primal if is small. Solve the dual if is small. Same optimal value when the LP is feasible and bounded.
4. Practice
-
In the figure, why is the minimizer of a feasible bounded LP at a vertex (or on a face), not in the interior of the polyhedron?
-
After forming the Lagrangian, what equation knocks out and leaves a dual only in ?
-
You have few variables and many constraints. Do you prefer the primal or the dual, and why?