The Geometry of Linear Programming
The Geometry of Linear Programming
Linear Optimization
Based on the book Introduction to Linear Optimization by D. Bertsimas and J.N. Tsitsiklis
Outline
Definition
The problem is infeasible if S = ∅.
Definition
The problem is unbounded if for each real number K there
exists x ∈ S such that f(x) < K.
Definition
The problem has an optimal solution if there exists x∗ ∈ S
such that f(x∗ ) ≤ f(x) for all x ∈ S.
General Optimization Problem
▶ In general, an optimization problem can be neither infeasible,
nor unbounded, nor have an optimal solution.
▶ Example:
minimize 1/x
subject to x ≥ 1.
LP Problem
Consider the LP problem
minimize c′ x
subject to Ax ≥ b,
where c ∈ Rn , b ∈ Rm and A ∈ Rm×n .
Property 1:
Any LP problem is either infeasible, or it is unbounded, or it
has an optimal solution.
Local vs Global optimal solutions
Consider the optimization problem
minimize f(x)
subject to x ∈ S,
where f : Rn → R and S ⊆ Rn .
Definition
A vector x∗ ∈ S is called a (global) optimal solution if
Definition
A vector x∗ ∈ S is called a local optimal solution if ∃ϵ > 0
and a neighborhood N(x∗ , ϵ) = {x ∈ Rn : ∥x∗ − x∥ ≤ ϵ} of
x∗ such that f(x∗ ) ≤ f(x) for all x ∈ S ∩ N(x∗ , ϵ).
Local vs Global optimal solutions
Consider the optimization problem
minimize f(x)
subject to x ∈ S,
where f : Rn → R and S ⊆ Rn .
Property 2:
In a LP problem each local optimal solution is also a global
optimal solution.
2.1 Polyhedra and convex sets
Hyperplanes, halfspaces, and polyhedra
Hyperplanes and halfspaces
Definition 2.3
Let a be a nonzero vector in Rn and
let b be a scalar.
(a) The set {x ∈ Rn | a′ x = b} is
called a hyperplane.
(b) The set {x ∈ Rn | a′ x ≥ b} is
called a halfspace.
Definition 2.1
A polyhedron is a set that can be described in the form
{x ∈ Rn | Ax ≥ b},
Definition 2.1
A polyhedron is a set that can be described in the form
{x ∈ Rn | Ax ≥ b},
{x ∈ Rn | Ax = b, x ≥ 0}
Definition 2.2
A set S ⊂ Rn is bounded if there exists a constant K such
that the absolute value of every component of every element
of S is less than or equal to K.
x2
O K x1
Bounded Sets and Polytopes
A set can either “extend to infinity” or be confined in a finite
region.
Definition 2.2
A set S ⊂ Rn is bounded if there exists a constant K such
that the absolute value of every component of every element
of S is less than or equal to K.
Definition
A bounded polyhedron is called a polytope.
Why is LP special?
[spoilers ahead...]
Property 1:
Any LP problem is either infeasible, or it is unbounded, or it
has an optimal solution.
Property 2:
In a LP problem each local optimal solution is also a global
optimal solution.
Why is LP special?
[spoilers ahead...]
Property 1:
Any LP problem is either infeasible, or it is unbounded, or it
has an optimal solution.
Property 2:
In a LP problem each local optimal solution is also a global
optimal solution.
Property 3:
If the feasible region of a LP problem is a nonempty polytope,
then there exists an optimal solution that is a ‘corner point’.
2.2 Extreme points, vertices, and basic feasible
solutions
Extreme points, vertices, and basic feasible solutions
Definition 2.6
Let P be a polyhedron. A vector x ∈ P is an extreme point of
P if we cannot find two vectors y, z ∈ P, both different from x,
and a scalar λ ∈ [0, 1], such that x = λy + (1 − λ)z.
Definition 2.7
Let P be a polyhedron. A vector x ∈ P is a vertex of P if
there exists some c such that c′ x < c′ y for all y satisfying
y ∈ P and y ̸= x.
▶ A vertex of a polyhedron P
is the unique optimal
solution to some LP
problem with feasible set P.
a′i x ≥ bi , i ∈ M1 ,
a′i x ≤ bi , i ∈ M2 ,
a′i x = bi , i ∈ M3 ,
Definition 2.8
If a vector x∗ satisfies a′i x∗ = bi for i
in M1 , M2 , or M3 , we say that
constraint i is active at x∗ .
Definition 2.9
Consider a polyhedron P defined by linear equality and
inequality constraints, and let x∗ be an element of Rn .
(a) The vector x∗ is a basic solution if:
(i) All equality constraints are active;
(ii) Out of the constraints that are active at x∗ , there are n
of them that are linearly independent.
(b) If x∗ is a basic solution that satisfies all of the
constraints, we say that it is a basic feasible solution.
Definition 2.9
Consider a polyhedron P defined by linear equality and
inequality constraints, and let x∗ be an element of Rn .
(a) The vector x∗ is a basic solution if:
(i) All equality constraints are active;
(ii) Out of the constraints that are active at x∗ , there are n
of them that are linearly independent.
(b) If x∗ is a basic solution that satisfies all of the
constraints, we say that it is a basic feasible solution.
Example:
P = {(x1 , x2 , x3 ) : x1 + x2 + x3 = 1, x1 , x2 , x3 ≥ 0}.
Basic (feasible) solutions
Definition 2.9
Consider a polyhedron P defined by linear equality and
inequality constraints, and let x∗ be an element of Rn .
(a) The vector x∗ is a basic solution if:
(i) All equality constraints are active;
(ii) Out of the constraints that are active at x∗ , there are n
of them that are linearly independent.
(b) If x∗ is a basic solution that satisfies all of the
constraints, we say that it is a basic feasible solution.
Basic (feasible) solutions
Theorem 2.3
Let P be a nonempty polyhedron and let x∗ ∈ P. Then, the
following are equivalent:
(a) x∗ is a vertex;
(b) x∗ is an extreme point;
(c) x∗ is a basic feasible solution.
Equivalence of definitions
▶ To prove Theorem 2.3 we need the following result.
Proof: Exercise. You can prove Theorem 2.2 using basic facts from
linear algebra (Theorem 1.3(a) in Section 1.5).
Now let’s prove Theorem 2.3!
Equivalence of definitions
Corollary 2.1
Given a finite number of linear inequality constraints, there
can only be a finite number of basic or basic feasible
solutions.
Proof.
▶ Consider a system of m linear inequality constraints in Rn .
▶ At any basic solution, there are n linearly independent
active constraints that define it.
▶ Therefore, the number of basic solutions is bounded above
by the number of ways that we can choose n constraints
out of m.
▶ This number is finite.
Equivalence of definitions
Corollary 2.1
Given a finite number of linear inequality constraints, there
can only be a finite number of basic or basic feasible
solutions.
{x ∈ Rn | 0 ≤ xi ≤ 1, i = 1, . . . , n}
P = {x ∈ Rn | Ax = b, x ≥ 0}.
Theorem 2.5
Let P = {x | Ax = b, x ≥ 0} be a nonempty polyhedron,
where A is a matrix of dimensions m × n, with rows a′1 , . . . , a′m .
Suppose that rank(A) = k < m and that the rows a′i1 , . . . , a′ik
are linearly independent. Consider the polyhedron
Then Q = P.
2x1 + x2 + x3 = 2
x1 + x2 = 1
x1 + x3 = 1
x1 , x2 , x3 ≥ 0.
Example 2.3
2x1 + x2 + x3 = 2
x1 + x2 = 1
x1 + x3 = 1
x1 , x2 , x3 ≥ 0.
2x1 + x2 + x3 = 2
x1 + x2 = 1
x1 + x3 = 1
x1 , x2 , x3 ≥ 0.
P = {x ∈ Rn | Ax = b, x ≥ 0}.
Theorem 2.4
Consider the constraints Ax = b and x ≥ 0 and assume that
the m × n matrix A has linearly independent rows. A vector
x ∈ Rn is a basic solution if and only if we have Ax = b, and
there exist distinct indices B(1), . . . , B(m) ∈ {1, . . . , n} such
that:
(a) The columns AB(1) , . . . , AB(m) of A are linearly
independent;
(b) If i ̸= B(1), . . . , B(m), then xi = 0.
Proof idea:
n m n−m
( ) ( )
m A m B C
Active constraints: =
n−m 0 I n−m 0 I
Polyhedra in standard form: basic solutions
xB(1) , . . . , xB(m)
xB = B−1 b.
Example 2.1
1 1 2 1 0 0 0 8
0 1 6 0 1 0
0 12
x= .
1 0 0 0 0 1 0 4
0 1 0 0 0 0 1 6
Definition 2.10
A basic solution x ∈ Rn is said to be degenerate if more than n
of the constraints are active at x.
Degeneracy
▶ If n = 2, a degenerate basic
solution is at the intersection of
three or more lines.
Degeneracy
▶ If n = 3, a degenerate basic
solution is at the intersection of
four or more planes.
x1 + x2 + 2x3 ≤ 8 (1)
x2 + 6x3 ≤ 12 (2)
x1 ≤ 4 (3)
x2 ≤ 6 (4)
x1 , x2 , x3 ≥ 0.
Example 2.4
Consider the polyhedron P defined by the constraints
x1 + x2 + 2x3 ≤ 8 (1)
x2 + 6x3 ≤ 12 (2)
x1 ≤ 4 (3)
x2 ≤ 6 (4)
x1 , x2 , x3 ≥ 0.
x1 + x2 + 2x3 ≤ 8 (1)
x2 + 6x3 ≤ 12 (2)
x1 ≤ 4 (3)
x2 ≤ 6 (4)
x1 , x2 , x3 ≥ 0.
x1 + x2 + 2x3 ≤ 8 (1)
x2 + 6x3 ≤ 12 (2)
x1 ≤ 4 (3)
x2 ≤ 6 (4)
x1 , x2 , x3 ≥ 0.
x1 + x2 + 2x3 ≤ 8 (1)
x2 + 6x3 ≤ 12 (2)
x1 ≤ 4 (3)
x2 ≤ 6 (4)
x1 , x2 , x3 ≥ 0.
x1 + x2 + 2x3 ≤ 8 (1)
x2 + 6x3 ≤ 12 (2)
x1 ≤ 4 (3)
x2 ≤ 6 (4)
x1 , x2 , x3 ≥ 0.
x1 + x2 + 2x3 ≤ 8 (1)
x2 + 6x3 ≤ 12 (2)
x1 ≤ 4 (3)
x2 ≤ 6 (4)
x1 , x2 , x3 ≥ 0.
Definition 2.11
Consider the standard form polyhedron
P = {x ∈ Rn | Ax = b, x ≥ 0}
0 1 0 0 0 0 1 6
Example 2.5
0 1 0 0 0 0 1 6
0 1 0 0 0 0 1 6
Example:
n=3
m=1
Example:
n=6
m=4
Example:
n=6
m=4
▶ n = 3, m = 2, n − m = 1.
▶ (1, 1, 0) is a nondegenerate basic feasible solution because
only one variable is zero.
▶ (0, 0, 1) is a degenerate basic feasible solution because two
variables are zero.
Degeneracy is not a purely geometric property
P = {x | Ax = b, x ≥ 0}.
▶ Let x∗ be a nondegenerate basic feasible solution.
▶ Exactly n − m of the variables x∗i are equal to zero.
Degeneracy is not a purely geometric property
▶ Example: consider a standard form polyhedron
P = {x | Ax = b, x ≥ 0}.
▶ Let x∗ be a nondegenerate basic feasible solution.
▶ Exactly n − m of the variables x∗i are equal to zero.
Definition 2.12
A polyhedron P ⊂ Rn contains a line if there exists a vector
x ∈ P and a nonzero vector d ∈ Rn such that x + λd ∈ P for
all λ ∈ R.
P = {x ∈ Rn | a′i x ≥ bi , i = 1, . . . , m}
Proof idea:
▶ (a) ⇒ (c): Immediate, from definition of basic solution.
▶ (c) ⇒ (b): By contradiction. Assume P contains a line
{x + λd | λ ∈ R}. Then d must be orthogonal to each vector ai .
Existence of extreme points
Theorem 2.6
Suppose that the polyhedron
P = {x ∈ Rn | a′i x ≥ bi , i = 1, . . . , m}
Proof idea:
▶ (b) ⇒ (a): Constructive:
1. Start from x ∈ P and move along a direction d
where all active constraints remain active.
2. Stop when a new constraint is about to be violated.
3. Now there is one more linearly independent
active constraint. Repeat.
Exercise: Write a complete proof.
Existence of extreme points
Corollary 2.2
Every nonempty bounded polyhedron and every nonempty
polyhedron in standard form has at least one basic feasible
solution.
2.6 Optimality of extreme points
Optimality of extreme points
▶ We have established the conditions for the existence of
extreme points.
▶ We now confirm the intuition developed in Chapter 1:
Theorem 2.7
Consider the LP problem of minimizing c′ x over a
polyhedron P. Suppose that P has at least one extreme
point and that there exists an optimal solution. Then, there
exists an optimal solution which is an extreme point of P.
Theorem 2.7
Consider the LP problem of minimizing c′ x over a
polyhedron P. Suppose that P has at least one extreme
point and that there exists an optimal solution. Then, there
exists an optimal solution which is an extreme point of P.
Theorem 2.8
Consider the LP problem of minimizing c′ x over a
polyhedron P. Suppose that P has at least one extreme
point. Then, either the optimal cost is equal to −∞, or
there exists an extreme point which is optimal.
Proof idea:
▶ Similar to the proof of Theorem 2.6 (b) ⇒ (a).
The difference is that we also make sure that
the cost does not increase.
▶ This shows that ∀x ∈ P, either the optimal cost
is −∞, or ∃ extreme point with cost ≤.
▶ Exercise: Write a complete proof.
Optimality of extreme points
▶ The next result is stronger than Theorem 2.7.
▶ It shows that the existence of an optimal solution can be
taken for granted, as long as the optimal cost is not −∞.
Theorem 2.8
Consider the LP problem of minimizing c′ x over a
polyhedron P. Suppose that P has at least one extreme
point. Then, either the optimal cost is equal to −∞, or
there exists an extreme point which is optimal.
Corollary 2.3
Consider the LP problem of minimizing c′ x over a nonempty
polyhedron. Then, either the optimal cost is equal to −∞ or
there exists an optimal solution.
Optimality of extreme points
▶ The result in Corollary 2.3 should be contrasted with what
may happen with a nonlinear cost function.
▶ For example, in the problem
minimize 1/x
subject to x ≥ 1,
the optimal cost is not −∞, but an optimal solution does not
exist.
Why is LP special?
[2/3 spoilers understood...]
Property 2:
In a LP problem each local optimal solution is also a global
optimal solution.
Definition 2.5
Let x1 , . . . , xk ∈ R n
∑kand λ1 , . . . , λk ∈ R be such that λi ≥ 0 for
i = 1, . . . , k and i=1 λi = 1.
∑
(a) The vector ki=1 λi xi is said to be a convex combination
of x1 , . . . , xk .
(b) The convex hull of x1 , . . . , xk is the set of all possible
convex combinations of x1 , . . . , xk .
Theorem 2.9
A nonempty polytope is the convex hull of its extreme points.
Theorem 2.9
A nonempty polytope is the convex hull of its extreme points.
1 1 1 1
x = xA + xB + xC + xD .
4 3 3 12
Example 2.6
1 A 1 B 1 C 1 D (1 1 1)
x + x + x + x = , , .
3 6 6 3 6 6 3
▶ It can be checked that it belongs to P.
2.8 Projections of polyhedra: Fourier-Motzkin
elimination
Projections of polyhedra: Fourier-Motzkin elimination
▶ An equivalent definition is
Elimination algorithm
∑n
1. Rewrite each constraint j=1 aij xj ≥ bi in the form
∑
n−1
ain xn ≥ − aij xj + bi , i = 1, . . . , m.
j=1
Elimination algorithm
▶ By letting x̄ = (x1 , . . . , xn−1 ), we obtain an equivalent
representation of P:
xn ≥ di + f′i x̄ if ain > 0,
dj + f′j x̄ ≥ xn if ajn < 0, (*)
0 ≥ dk + f′k x̄ if akn = 0.
Here, each di , dj , dk ∈ R, and each fi , fj , fk ∈ Rn−1 .
2. Let Q be the polyhedron in Rn−1 defined by the
constraints
dj + f′j x̄ ≥ di + f′i x̄ if ain > 0 and ajn < 0,
0 ≥ dk + f′k x̄ if akn = 0. (**)
Example 2.7
Consider the polyhedron defined by the constraints
x1 + x2 ≥ 1
x1 + x2 + 2x3 ≥ 2
2x1 + 3x3 ≥ 3
x1 − 4x3 ≥ 4
−2x1 + x2 − x3 ≥ 5.
Example 2.7
Consider the polyhedron defined by the constraints
x1 + x2 ≥ 1
x1 + x2 + 2x3 ≥ 2
2x1 + 3x3 ≥ 3
x1 − 4x3 ≥ 4
−2x1 + x2 − x3 ≥ 5.
0 ≥ 1 − x1 − x2
−1 + x1 /4 ≥ 1 − x1 /2 − x2 /2
−1 + x1 /4 ≥ 1 − 2x1 /3
−5 − 2x1 + x2 ≥ 1 − x1 /2 − x2 /2
−5 − 2x1 + x2 ≥ 1 − 2x1 /3.
Theorem 2.10
The polyhedron Q constructed by the elimination algorithm is
equal to the projection Πn−1 (P) of P.
Corollary 2.4
Let P ⊂ Rn+k be a polyhedron. Then, the set
is also a polyhedron.
Projections of polyhedra: Fourier-Motzkin elimination
Corollary 2.6
The convex hull of a finite number of vectors is a polyhedron.
Proof:
▶ The convex hull of x1 , . . . , xk is the set
min{c′ x | Ax ≥ b}.
{(x0 , x) | Ax ≥ b, x0 = c′ x}.