[example: A Two-Dimensional Linear Program]
Minimise $-(x_1 + x_2)$ subject to
\begin{align*}
x_1 + 2x_2 &\leq 6, \\
x_1 - x_2 &\leq 3, \\
x_1, x_2 &\geq 0.
\end{align*}
Because this is a two-dimensional problem, the feasible region — the set of $(x_1, x_2)$ satisfying all constraints — is a convex polygon. Its corners are found by solving pairs of binding constraints. The origin $(0,0)$ is the intersection of $x_1 = 0$ and $x_2 = 0$. The point $(3,0)$ is the intersection of $x_1 - x_2 = 3$ and $x_2 = 0$: substituting $x_2 = 0$ gives $x_1 = 3$. The point $(0,3)$ is the intersection of $x_1 + 2x_2 = 6$ and $x_1 = 0$: substituting $x_1 = 0$ gives $x_2 = 3$. The point $(4,1)$ is the intersection of the two non-trivial constraints $x_1 + 2x_2 = 6$ and $x_1 - x_2 = 3$: subtracting the second from the first gives $3x_2 = 3$, so $x_2 = 1$ and $x_1 = 4$. Thus the four corners are $(0,0)$, $(3,0)$, $(4,1)$, and $(0,3)$.
The objective function $-(x_1 + x_2)$ defines level curves $x_1 + x_2 = k$ (lines with slope $-1$), and its gradient (the cost vector $c = (-1,-1)^\top$) points in the direction of steepest decrease of the objective. To minimise $-(x_1 + x_2)$, we push the level curve $x_1 + x_2 = k$ as far as possible in the direction of $c$, i.e.\ we want the largest value of $x_1 + x_2$. The objective values at the corners are: $(0,0) \mapsto 0$, $(3,0) \mapsto -3$, $(4,1) \mapsto -5$, $(0,3) \mapsto -3$. The minimum value $-5$ is attained at $x^* = (4,1)$.
[/example]