M4 · LP (simplex concepts) and QP, from zero

Chapters 8–9 · about 100–120 min · Goal: explain what each simplex step means and why it is right (he will not ask a numerical simplex run), write the proofs of "corner ⇔ BFS" and the fundamental theorem, and handle equality QP (KKT matrix, null space) and one active-set step, including the step rule $\min\{1,\alpha_k\}$.

How this page works

It's a story: each section uses only what came before. Every formula appears after the idea it expresses, usually after a small numerical example. Small Check boxes let you test yourself as you go (answers hidden). Part 1 (sections A–F) is Chapter 8, Part 2 (H–I) is Chapter 9, and G joins them. The one-page summary is at the very end; use it for revision, not for learning.

General notation. Vectors are columns; $x^T$ is the transpose. $x\ge0$ means every entry is $\ge0$. $x_j$ = entry $j$ of $x$. "Nonsingular" = square and invertible. Vectors are linearly independent if no one of them is a combination of the others. The null space $\ker A=\mathrm{null}(A)=\{d: Ad=0\}$ (all directions that do not change $Ax$). A symmetric matrix $M$ is positive definite (PD, $M\succ0$) if $v^TMv\gt0$ for every $v\ne0$, positive semidefinite ($M\succeq0$) if $v^TMv\ge0$. $B^{-T}$ means $(B^{-1})^T=(B^T)^{-1}$. A bar, as in $\bar x$, means "the value at the current point".

Part 1 notation (Chapter 8, LP). $n$ = number of variables, $m$ = number of equality constraints. $A$ = the $m\times n$ constraint matrix, assumed to have rank $m$ (no redundant rows); $b\in\mathbb R^m$; $c\in\mathbb R^n$ = cost vector. $a_j$ = column $j$ of $A$. $K=\{x: Ax=b,\ x\ge0\}$ = feasible set. $B$ = basis matrix ($m$ chosen columns), $N$ = the other columns; $x_B,x_N,c_B,c_N$ = the matching parts of $x$ and $c$. $\lambda\in\mathbb R^m$ = multipliers of $Ax=b$ ("prices"); $\mu\in\mathbb R^n$ = multipliers of $x\ge0$; $\mu_N$ = reduced costs. $q$ = index of the entering variable; $u=B^{-1}a_q$; $d$ = direction of motion; $\theta$ = step length; $r$ = the row (variable) that leaves; rows are counted in the fixed order of the basic variables (an ordered basis). $s_i$ = slack or surplus variable. $z_0$ = current cost (tableau).

Part 2 notation (Chapter 9, QP). $f(x)=\tfrac12x^TQx-c^Tx$ with $Q$ symmetric $n\times n$, so $\nabla f(x)=Qx-c$. Equality constraints $Ax=b$ ($m$ rows, rank $m$), multipliers $\lambda$, Lagrangian $\ell(x,\lambda)=f(x)+\lambda^T(Ax-b)$. $K$ = the KKT matrix $\begin{bmatrix}Q&A^T\\A&0\end{bmatrix}$. $Z$ = a matrix whose columns are a basis of $\ker A$; $x_p$ = any point with $Ax_p=b$; $z$ = coordinates along $Z$; $H_r=Z^TQZ$, $g_r=Z^T(Qx_p-c)$; $S=AQ^{-1}A^T$; $P$ = projector onto $\ker A$. Inequality QP: constraints $a_i^Tx\le b_i$, where now $a_i$ is the normal vector (row) of constraint $i$; $\mathcal A(x)$ = active set; $W_k$ = working set; $g_k=Qx_k-c$; $p_k$ = search direction; $\alpha_k$ = ratio-test bound; $i_k$ = the blocking constraint (the notes write $l_k$). In worked runs the iterates are written $x^{(0)},x^{(1)},\dots$ and $p^{(0)},p^{(1)},\dots$, so they can't be confused with the coordinates $x_1,x_2$.

Warning: the two chapters' notes reuse $a$, $b$, $c$, $A$, $K$, $\lambda$ with different meanings (and opposite $\lambda$ sign conventions, see H1). To avoid a three-way clash with the letter $\ell$: on this page $\ell$ is only the Ch 9 Lagrangian; the leaving row in Part 1 is $r$, the blocking constraint in Part 2 is $i_k$, and a lower bound in A2 is $h_j$. Inside each part one letter has one meaning. Inside a practice question, a letter the question defines takes that meaning.

0. Why this topic exists

A linear program (LP) asks: choose numbers $x_1,\dots,x_n$ to make a linear cost (like $-2x_1-3x_2$) as small as possible, subject to linear constraints (like $x_1+x_2\le4$). Shipping plans, production plans and diets are LPs.

The difficulty: the feasible set has infinitely many points. The big discovery of Chapter 8 is that you only need to look at the corners: if an LP has a best point, some corner is a best point, and there are only finitely many corners. The simplex method walks from corner to neighbouring corner, always downhill, until no neighbour is cheaper.

A quadratic program (QP) (Chapter 9) has a quadratic cost $\frac12x^TQx-c^Tx$ with linear constraints. Now the cost is curved like a bowl, so the best point can sit in the middle of an edge or face, not at a corner. The active-set method uses the same "walk and stop at the first blocking constraint" idea, but it may stop before reaching a constraint, because the bottom of the bowl came first.

The whole module in one sentence

Guess which constraints are tight, solve an easy equality problem with only those, then (1) if moving helps, move until the first new constraint blocks you (a ratio test), and (2) if moving doesn't help, check the signs of the multipliers and release a constraint with the wrong sign.

What the exam wants (his words in "What he said"): no numerical simplex; "concepts involved in each step"; the theorems "extreme point ⇔ BFS" and the fundamental theorem with their proofs (Ch 6 Problem Set 1); the QP KKT matrix, "Q positive definite on the null space of A", the null-space reduction $\phi(z)$; and the active-set step rule $\min\{1,\alpha_k\}$, "a very important point you have to remember".

  • A: write any LP in one standard form. B: corners, as pictures and as linear algebra. C: test whether a corner is optimal. D: move to a better corner. E: a complete run by hand. F: the tableau.
  • G: the bridge. H: QP with equalities. I: QP with inequalities (active set). J: exam recipe.

A. What an LP looks like

A1. The standard form

Chapter 8 writes every LP in one shape, the standard form:

$$\min_x\ c^Tx\quad\text{subject to}\quad Ax=b,\quad x\ge0.$$

Read it piece by piece: the cost $c^Tx=c_1x_1+\dots+c_nx_n$ is linear; there are $m$ equations $Ax=b$; and the only inequalities are the simple signs $x_j\ge0$. We assume rank $A=m$: no equation is a combination of the others (a redundant one could just be deleted).

Why this shape? Equations are easy (linear algebra solves them), and inequalities of the form "$x_j\ge0$" are the easiest kind to keep track of: a variable is either 0 (the inequality is tight) or positive. Everything in Part 1 is built on this split.

A2. Converting any LP to standard form

Four tricks, each with a small example first.

  • "$\le$" constraint → add a slack. $x_1+x_2\le4$ says "there is some leftover $s_1=4-x_1-x_2\ge0$". So write $x_1+x_2+s_1=4$, $s_1\ge0$. The slack $s_1$ measures how far you are from the boundary. Its cost is 0, and its column in $A$ is $+e_i$ (a 1 in row $i$).
  • "$\ge$" constraint → subtract a surplus. $x_1+x_2\ge1$ says "there is some excess $s_2=x_1+x_2-1\ge0$". So write $x_1+x_2-s_2=1$, $s_2\ge0$. Cost 0, column $-e_i$.
  • Free variable (any sign) → split it. Any number is a difference of two non-negative numbers: $-3=0-3=2-5$. So put $x_j=x_j^+-x_j^-$ with $x_j^\pm\ge0$ and substitute it everywhere (cost and constraints). The pair is not unique, and that's fine. The column of $x_j^-$ is minus the column of $x_j^+$, and so is its cost.
  • Other fixes. $\max c^Tx$ → $\min(-c)^Tx$. A bound $x_j\ge h_j$ → put $x_j=h_j+v_j$, $v_j\ge0$. A negative $b_i$ → multiply that row by $-1$ (a $\le$ becomes $\ge$). The notes then assume $b\ge0$.
Worked example $\max\ 3x_1+x_2$ s.t. $x_1-x_2\le2,\ x_1+x_2\ge1,\ x_1\ge0,\ x_2$ free.
  1. Max → min: $\min\ -3x_1-x_2$.
  2. Split $x_2=x_2^+-x_2^-$: objective $-3x_1-x_2^++x_2^-$.
  3. Row 1 ($\le$): add slack $s_1$: $x_1-x_2^++x_2^-+s_1=2$. Row 2 ($\ge$): subtract surplus $s_2$: $x_1+x_2^+-x_2^--s_2=1$.
  4. Variables $(x_1,x_2^+,x_2^-,s_1,s_2)\ge0$, $n=5,\ m=2$: $$A=\begin{bmatrix}1&-1&1&1&0\\1&1&-1&0&-1\end{bmatrix},\ b=\begin{bmatrix}2\\1\end{bmatrix},\ c=(-3,-1,1,0,0)^T.$$
Trap The column of $x_2^-$ is the negative of the column of $x_2^+$, and so is its cost. Slack/surplus costs are $0$. A surplus has coefficient $-1$, not $+1$ (with $+1$ you would have turned "$\ge$" into "$\le$").
Check A2. Put $\min\ x_1+x_2$ s.t. $2x_1-x_2\ge3$, $x_1\ge0$, $x_2$ free into standard form with variables $(x_1,x_2^+,x_2^-,s)$.
Show answer

$2x_1-x_2^++x_2^--s=3$, so $A=[2\ \ -1\ \ 1\ \ -1]$, $b=3$, $c=(1,1,-1,0)$, all four variables $\ge0$.

The running example for Part 1

$\min\ -2x_1-3x_2$ s.t. $x_1+x_2\le4$, $x_1+2x_2\le6$, $x_1,x_2\ge0$. Add slacks and (to keep one vector) call them $x_3,x_4$:

$$x_1+x_2+x_3=4,\qquad x_1+2x_2+x_4=6,\qquad x\ge0,$$ $$A=\begin{bmatrix}1&1&1&0\\1&2&0&1\end{bmatrix},\quad b=\begin{bmatrix}4\\6\end{bmatrix},\quad c=(-2,-3,0,0)^T,\quad n=4,\ m=2.$$

Columns: $a_1=(1,1)$, $a_2=(1,2)$, $a_3=(1,0)$, $a_4=(0,1)$. We'll use this example in B, C, D, E and F.

B. Corners: the picture and the algebra

B1. The picture: the best point is at a corner

Draw the running example in the $(x_1,x_2)$ plane. The feasible set is a polygon with four corners. The cost $-2x_1-3x_2$ is constant along parallel lines $2x_1+3x_2=k$. Lowering the cost means sliding that line in the direction $(2,3)$. The last point of the polygon the line touches is the best point, and it is a corner: $(2,2)$, cost $-10$.

x₁ x₂ x₁+x₂=4 (x₃=0) x₁+2x₂=6 (x₄=0) cost −10 cost ↓ (0,0): 0 (4,0): −8 (2,2): −10 best (0,3): −9 (6,0) x₃=−2 (0,4) x₄=−2
Blue region: feasible set. Dots: the four corners with their costs. Red circles: places where two boundary lines cross outside the region (they will be "basic but infeasible" in B2). Green: the simplex path of section E (Bland's rule): $(0,0)\to(4,0)\to(2,2)$. Purple dashed: the other possible path $(0,0)\to(0,3)\to(2,2)$. Dotted grey: the cost line through the best corner. Purple arrow: direction in which the cost decreases.

Why must a corner win? Along any straight segment the cost is linear, so it changes at a constant rate. Then one end of the segment is at least as good as every point in the middle. If the best point were in the middle of an edge, an end of that edge (a corner) would be at least as good. And if the cost is constant along the edge, the whole edge is optimal, corners included. This is the plain-words version of the fundamental theorem (B4).

The key observation for the algebra. Look at which of the four variables are zero at each corner:

corner $(x_1,x_2)$$x_3=4-x_1-x_2$$x_4=6-x_1-2x_2$zero variablescost
$(0,0)$46$x_1,x_2$0
$(4,0)$02$x_2,x_3$$-8$
$(2,2)$00$x_3,x_4$$-10$
$(0,3)$10$x_1,x_4$$-9$

At every corner exactly $n-m=2$ variables are zero and the other $m=2$ are determined by the equations. So a corner = a choice of which variables are switched off. That's the definition in B2.

B2. Corner = basic feasible solution (BFS)

Recipe for a basic solution (Def 8.2.1.1):

  1. Choose $m$ columns of $A$ that form a nonsingular $m\times m$ matrix $B$. Their variables are the basic variables $x_B$; all others are nonbasic, $x_N$, with the rest of the columns forming $N$. So $A=[B\ N]$ after reordering.
  2. Switch the nonbasic variables off: $x_N=0$.
  3. Then $Ax=Bx_B+Nx_N=b$ becomes $Bx_B=b$, so $x_B=B^{-1}b$ (one exact answer, because $B$ is invertible).

Why "basic"? $m$ independent columns in $\mathbb R^m$ form a basis of $\mathbb R^m$, so $b$ can be written in exactly one way as a combination of them. The numbers $x_B$ are exactly those coefficients.

A basic solution need not be feasible: $x_B=B^{-1}b$ might have a negative entry. If $x_B\ge0$, it is a basic feasible solution (BFS).

All six choices for the running example
basic variables$B$$x_B=B^{-1}b$full $x$verdict
$x_3,x_4$$I$$(4,6)$$(0,0,4,6)$BFS: corner $(0,0)$
$x_1,x_4$$[a_1\ a_4]$$(4,2)$$(4,0,0,2)$BFS: corner $(4,0)$
$x_1,x_2$$[a_1\ a_2]$$(2,2)$$(2,2,0,0)$BFS: corner $(2,2)$
$x_2,x_3$$[a_2\ a_3]$$(3,1)$$(0,3,1,0)$BFS: corner $(0,3)$
$x_1,x_3$$[a_1\ a_3]$$(6,-2)$$(6,0,-2,0)$basic, infeasible (red $(6,0)$)
$x_2,x_4$$[a_2\ a_4]$$(4,-2)$$(0,4,0,-2)$basic, infeasible (red $(0,4)$)

Example of step 3 for $\{x_1,x_4\}$: $x_2=x_3=0$ leaves $x_1=4$ (row 1) and $x_1+x_4=6$ (row 2), so $x_4=2$.

Four BFSs = the four corners. The two infeasible basic solutions are the red crossing points outside the polygon.

Since there are at most $\binom{n}{m}$ ways to choose $m$ columns, there are finitely many BFSs, hence finitely many corners. That's why a corner-to-corner walk can finish.

Support test (very useful in MCQs): a feasible $\bar x$ is a BFS iff the columns $a_j$ with $\bar x_j\gt0$ are linearly independent. Why: if $\bar x$ is basic, its positive entries are among the basic ones, whose columns are independent. Conversely, if the positive columns are independent, add more columns (rank $A=m$ makes this possible) to get $m$ independent ones; their extra variables are basic with value 0.

Check B2. (a) In the running example, is $x=(1,1,2,3)$ feasible? Is it a BFS? (b) A feasible point has 3 positive entries and $m=2$. Can it be a BFS?
Show answer

(a) $1+1+2=4$ ✓, $1+2+3=6$ ✓, all $\ge0$: feasible. All 4 entries are positive, and 4 columns in $\mathbb R^2$ are always dependent, so it is not a BFS (it's the interior point $(1,1)$ of the polygon). (b) No: 3 vectors in $\mathbb R^2$ are dependent. A BFS has at most $m$ positive entries.

B3. Degenerate corners

A BFS is degenerate if some basic variable happens to be 0, i.e. it has fewer than $m$ positive entries. $B$ is still nonsingular; the value 0 is just a coincidence of the numbers. Geometrically, more boundaries pass through that corner than are needed to pin it down, so several bases describe the same corner.

Worked example (slides p. 79) $\min\ -x_3$ s.t. $x_1+x_3=1,\ x_2+x_3=1,\ x\ge0$. So $a_1=(1,0)^T,\ a_2=(0,1)^T,\ a_3=(1,1)^T$, $m=2$.
  1. Basis $\{x_1,x_2\}$: $B=I$, $x_B=(1,1)$, point $(1,1,0)$: nondegenerate BFS (2 positive entries).
  2. Basis $\{x_3,x_2\}$: $B=\begin{bmatrix}1&0\\1&1\end{bmatrix}$, $x_B=B^{-1}b=(1,0)$, point $(0,0,1)$: a degenerate BFS (basic $x_2=0$).
  3. Basis $\{x_1,x_3\}$ gives $x_B=(0,1)$: the same point $(0,0,1)$. One corner, two bases.

Why care? In D4 we'll see that at a degenerate corner the simplex method can change basis without moving, which is where "cycling" and Bland's rule come from.

Check B3. True or false: "a degenerate BFS has a singular basis matrix".
Show answer

False. $B$ is nonsingular by definition of a basis; degenerate only means some entry of $B^{-1}b$ is 0 (Quiz 5 Q13).

B4. The two theorems (statements)

Extreme point (precise word for "corner"). $x\in K$ is an extreme point if it is not a strict average of two different points of $K$: there are no $y\ne z$ in $K$ and $0\lt\alpha\lt1$ with $x=\alpha y+(1-\alpha)z$. A point in the middle of an edge is such an average (of the edge's two ends), so it is not extreme.

The two theorems (statements)
  • Theorem 8.2.2: $x\in K$ is an extreme point $\iff$ $x$ is a BFS.
  • Theorem 8.2.1 (fundamental theorem of LP): (i) if $K$ is nonempty, a BFS exists; (ii) if an optimal solution exists, an optimal BFS exists.

Not claimed: "every optimum is a BFS" (two optimal corners → their midpoint is optimal but not a corner), nor "$K$ is bounded".

The proofs (he wants them) use the ratio test of section D2 and the first-order condition, so they come right after the ratio test, in D2b. Why are they in a Chapter 6 problem set? The professor set the Ch 8 proofs as exercises P11–P12 of Chapter 6 Problem Set 1, because they use Chapter 6's first-order condition for constrained minima.

Check B4. In the running example, $x=(3,1,0,1)$ is feasible. Show it is not extreme by writing it as an average of two corners.
Show answer

It has 3 positive entries ($m=2$), so it can't be a BFS. Indeed $(3,1,0,1)=\tfrac12(4,0,0,2)+\tfrac12(2,2,0,0)$: the midpoint of the edge from corner $(4,0)$ to corner $(2,2)$.

C. Is this corner optimal?

C1. The thought experiment: raise one switched-off variable

Stand at the corner $(4,0)$ of the running example: basic $x_1=4,\ x_4=2$; nonbasic $x_2=x_3=0$. The simplest moves away from this corner are to raise one nonbasic variable from 0; the equations then decide how the basic variables must change. (Every feasible move is a combination of these one-variable moves; the gap identity in C3 makes this precise.) Try both.

With numbers first

Raise $x_2$ to $t$ (keep $x_3=0$). Row 1: $x_1+t=4$, so $x_1=4-t$. Row 2: $x_1+2t+x_4=6$, so $x_4=6-2t-(4-t)=2-t$. Cost $=-2(4-t)-3t=-8-t$. Cost falls by 1 per unit of $x_2$. Worth doing.

Raise $x_3$ to $t$ (keep $x_2=0$). Row 1: $x_1=4-t$. Row 2: $x_4=6-x_1=2+t$. Cost $=-2(4-t)=-8+2t$. Cost rises by 2 per unit. Not worth it.

These two rates, $-1$ for $x_2$ and $+2$ for $x_3$, are the reduced costs. One is negative, so $(4,0)$ is not optimal.

C2. The general formula: reduced costs and the prices λ

Now do the same with letters. Raise nonbasic $x_q$ to $t$, keep the other nonbasics at 0. The equations become $Bx_B+t\,a_q=b$, so

$$x_B=B^{-1}b-t\,B^{-1}a_q=\bar x_B-t\,u,\qquad u:=B^{-1}a_q\ \ (\text{so }Bu=a_q).$$

($u$ = how much each basic variable must drop per unit of $x_q$; at $(4,0)$ with $q=2$ it was $u=(1,1)$.) The basic variables are always listed in one fixed order, an ordered basis such as $(x_1,x_4)$: $u_i$, $(\bar x_B)_i$ and “row $i$” all mean the $i$-th basic variable in that order. The cost becomes

$$c_B^Tx_B+c_q t=c_B^T\bar x_B+t\,\big(c_q-c_B^TB^{-1}a_q\big).$$

Give the vector $c_B^TB^{-1}$ a name: define $\lambda$ by $B^T\lambda=c_B$, i.e. $\lambda=B^{-T}c_B$. Then $c_B^TB^{-1}a_q=\lambda^Ta_q$ and the rate of change of the cost is

$$\boxed{\bar\mu_q=c_q-a_q^T\bar\lambda},\qquad\text{all at once:}\qquad \boxed{\bar\lambda=B^{-T}c_B,\qquad \bar\mu_N=c_N-N^T\bar\lambda.}$$

Meaning of $\lambda$: prices of the constraints. $\lambda_i$ is a price per unit of row $i$. The current cost equals $c_B^T\bar x_B=\lambda^Tb$ (the value of the right-hand side at these prices). The reduced cost $\bar\mu_q=c_q-a_q^T\bar\lambda$ = "own cost of $x_q$" minus "value, at these prices, of what its column $a_q$ uses up". Negative means $x_q$ is a bargain.

For basic variables the same formula gives $\bar\mu_B=c_B-B^T\bar\lambda=0$: that's how $\lambda$ was chosen.

Check the formula against C1

At $(4,0)$: $B=[a_1\ a_4]=\begin{bmatrix}1&0\\1&1\end{bmatrix}$, $c_B=(-2,0)$. Solve $B^T\lambda=c_B$: $\begin{bmatrix}1&1\\0&1\end{bmatrix}\lambda=\begin{bmatrix}-2\\0\end{bmatrix}$ gives $\lambda_2=0$, $\lambda_1=-2$.

$\bar\mu_2=c_2-a_2^T\bar\lambda=-3-(1\cdot(-2)+2\cdot0)=-1$ ✓. $\ \bar\mu_3=0-(1\cdot(-2)+0)=2$ ✓. Same rates as the thought experiment.

The optimality test. At a BFS ($\bar x_B\ge0$): if all $\bar\mu_N\ge0$, no single variable can be raised profitably, and in fact the corner is optimal (proof in C3). If some $\bar\mu_q\lt0$ and the corner is nondegenerate, raising $x_q$ a little is feasible and lowers the cost, so the corner is not optimal. (At a degenerate corner a negative $\bar\mu_q$ does not settle it: D4.)

Trap $\bar\lambda=B^{-T}c_B$ (transpose!), not $B^{-1}c_B$. $\bar\mu_N=c_N-N^T\bar\lambda$, not $N^T\bar\lambda-c_N$. $\bar x_B$ uses $B^{-1}$, $\bar\lambda$ uses $B^{-T}$.
Check C2. At the corner $(0,3)$ (basis $\{x_2,x_3\}$) compute $\bar\lambda$ and the reduced costs of $x_1,x_4$. Optimal? Then do the same at $(2,2)$ (basis $\{x_1,x_2\}$).
Show answer

$(0,3)$: $B=[a_2\ a_3]=\begin{bmatrix}1&1\\2&0\end{bmatrix}$, $c_B=(-3,0)$. $B^T\lambda=c_B$: $\lambda_1+2\lambda_2=-3$, $\lambda_1=0$, so $\bar\lambda=(0,-\tfrac32)$. $\bar\mu_1=-2-(0-\tfrac32)=-\tfrac12\lt0$: not optimal (raise $x_1$). $\bar\mu_4=0-(-\tfrac32)=\tfrac32$.

$(2,2)$: $B=\begin{bmatrix}1&1\\1&2\end{bmatrix}$, $B^T\lambda=(-2,-3)$ gives $\bar\lambda=(-1,-1)$. $\bar\mu_3=0+1=1$, $\bar\mu_4=1$: both $\ge0$, optimal. Check: $b^T\bar\lambda=-4-6=-10=$ cost ✓.

C3. Why the test is right: the gap identity, and the link to LP KKT

Collect what we have: for every index, $c=A^T\bar\lambda+\bar\mu$ (basic part: $\bar\mu_B=0$ and $B^T\bar\lambda=c_B$; nonbasic part: definition of $\bar\mu_N$). Take any feasible $x'$ and compare its cost to the corner's:

$$c^Tx'-c^T\bar x=(A^T\bar\lambda+\bar\mu)^T(x'-\bar x)=\bar\lambda^T\underbrace{A(x'-\bar x)}_{b-b=0}+\bar\mu^Tx'-\underbrace{\bar\mu^T\bar x}_{0}=\boxed{\bar\mu_N^Tx'_N}.$$

($\bar\mu^T\bar x=0$ because $\bar\mu_B=0$ and $\bar x_N=0$; and $\bar\mu^Tx'=\bar\mu_N^Tx'_N$ because $\bar\mu_B=0$.) This gap identity is exact, not an approximation. If $\bar\mu_N\ge0$, then since $x'_N\ge0$ the right side is $\ge0$: no feasible point is cheaper. That proves the optimality test.

Numbers

Corner $\bar x=(4,0,0,2)$, $\bar\mu_N=(\bar\mu_2,\bar\mu_3)=(-1,2)$. Take $x'=(0,3,1,0)$ (the corner $(0,3)$), $x'_N=(x'_2,x'_3)=(3,1)$. Gap $=-9-(-8)=-1$, and $\bar\mu_N^Tx'_N=-3+2=-1$ ✓.

The same thing as KKT (he said this is "worth memorizing"). Chapter 8 writes the Lagrangian of the standard-form LP as $c^Tx+\lambda^T(b-Ax)-\mu^Tx$. Its KKT conditions:

$$\underbrace{A^T\lambda+\mu=c}_{\text{stationarity}},\qquad Ax=b,\quad x\ge0,\qquad \mu\ge0,\qquad \mu^Tx=0\ (\text{complementarity}),\qquad \lambda\ \text{free}.$$

A basis builds a candidate that satisfies most of them automatically: it sets $x_N=0$ and $\mu_B=0$ (so $\mu^Tx=0$ holds), and solves $Bx_B=b$, $B^T\lambda=c_B$, $\mu_N=c_N-N^T\lambda$ (so stationarity and $Ax=b$ hold). Only two sign checks remain: $\bar x_B\ge0$ (primal feasibility) and $\bar\mu_N\ge0$ (dual feasibility). So the reduced costs are the KKT multipliers of $x\ge0$. When both hold, $c^T\bar x=b^T\bar\lambda$ (zero duality gap). At a degenerate basis, $\mu_B=0$ is a choice made by the construction (complementarity alone would not force it).

Sign conventions differ between the chapters Ch 8 uses $\lambda^T(b-Ax)$ so stationarity is $c=A^T\lambda+\mu$. Ch 9 uses $\lambda^T(Ax-b)$ so stationarity is $Qx-c+A^T\lambda=0$. Use the one the question states; if none is stated, say which you use.
Check C3. Why does the gap identity use $x'_N$ and not $\bar x_N$?
Show answer

$\bar x_N=0$, so $\bar\mu_N^T\bar x_N=0$ for every point: that would claim all feasible points cost the same (Quiz 5 Q7, option b). The gap is measured by how much of the other point's weight sits on the currently switched-off variables.

D. Moving to a better corner

Suppose $\bar\mu_q\lt0$. Then $x_q$ should enter (become basic). Three questions: in which direction do we move, how far, and which variable gets switched off?

D1. The direction

From C2, raising $x_q$ by $t$ moves the point along $x(t)=\bar x+t\,d$ with

$$d_q=1,\qquad d_j=0\ \text{for the other nonbasic }j,\qquad d_B=-u=-B^{-1}a_q.$$

Why $Ad=0$: $Ad=Bd_B+a_q d_q=-Bu+a_q=-a_q+a_q=0$. So $A x(t)=b$ for every $t$: the equations stay satisfied, and only the signs $x\ge0$ can stop us. Cost slope: $c^Td=c_q-c_B^Tu=c_q-a_q^T\bar\lambda=\bar\mu_q$, so $c^Tx(t)=c^T\bar x+t\,\bar\mu_q$.

Geometrically this is a walk along an edge of the polygon. At $(4,0)$ with $q=2$: $u=(1,1)$, so in the order $(x_1,x_2,x_3,x_4)$, $d=(-1,1,0,-1)$. In the $(x_1,x_2)$ picture that's the direction $(-1,1)$: up and left along the edge $x_1+x_2=4$ towards $(2,2)$.

Trap $d_B=-u$, not $+u$ (with $+u$, $Ad=2a_q\ne0$). $d_q=+1$ (with $-1$ you'd push $x_q$ below 0).

D2. How far: the ratio test

Along the edge the basic variables are $x_B(t)=\bar x_B-t\,u$. Look at one row $i$:

  • if $u_i\gt0$, that basic variable decreases and hits 0 at $t=(\bar x_B)_i/u_i$;
  • if $u_i\le0$, it stays the same or grows: it never blocks.

We must stop at the first one to hit zero:

$$\boxed{\theta=\min_{i:\,u_i\gt0}\ \frac{(\bar x_B)_i}{u_i}}\qquad(\text{min, not max; only rows with }u_i\gt0).$$

The row $r$ that attains the minimum leaves (its variable becomes 0 and nonbasic), $x_q$ enters at value $\theta$, and the cost changes by $\theta\,\bar\mu_q$.

t 420 x₁ = 4 − t (ratio 4) x₄ = 2 − t (ratio 2)dashed: x₄ would be negative x₂ = t (entering) θ = 2
From corner $(4,0)$ with $x_2$ entering: $u=(1,1)$ for the basic variables $(x_1,x_4)$. Blue and red: the basic variables shrink as $t$ grows. Red hits 0 first, at $t=2$, so $\theta=2$ and $x_4$ leaves. Going further would make $x_4$ negative (dashed). Green: the entering variable.
Numbers

At $(4,0)$: $\bar x_B=(x_1,x_4)=(4,2)$, $u=(1,1)$. Ratios $4/1=4$ and $2/1=2$, so $\theta=2$, $x_4$ leaves. New point $\bar x+2d=(4,0,0,2)+2(-1,1,0,-1)=(2,2,0,0)$: the corner $(2,2)$. Cost change $\theta\bar\mu_2=2\cdot(-1)=-2$: from $-8$ to $-10$ ✓.

Check D2. At the origin (basis $\{x_3,x_4\}$, $\bar x_B=(4,6)$, $B=I$) let $x_2$ enter. Find $u$, $\theta$, the leaving variable and the new corner.
Show answer

$u=B^{-1}a_2=(1,2)$. Ratios $4/1=4$, $6/2=3$, so $\theta=3$, $x_4$ leaves. New point $x_2=3$, $x_3=4-3=1$: corner $(0,3)$, cost change $3\cdot(-3)=-9$ ✓ (the purple dashed path in the figure of B1).

D2b. Proofs of the two B4 theorems

Now that the ratio test is familiar, here are the proofs of the B4 theorems (Ch 6 Problem Set 1, P11–P12). One tool from Chapter 6 is needed: FONC (first-order necessary condition): at a minimiser $x^\star$, every feasible direction $d$ satisfies $\nabla f(x^\star)^Td\ge0$ (no feasible direction goes downhill). For an LP, $\nabla f=c$.

The one idea behind every proof. If the positive entries of $x$ have dependent columns, you can wiggle $x$ in both directions without leaving $K$.

  1. Dependent support ⇒ a null direction. If the columns $\{a_j:x_j\gt0\}$ are dependent, some combination of them is zero: there is $d\ne0$ with $Ad=0$ and $d_j=0$ wherever $x_j=0$.
  2. Both $\pm d$ keep you feasible. $A(x\pm\varepsilon d)=b+0$. The entries with $x_j=0$ have $d_j=0$, so they stay 0; the positive entries stay positive if $\varepsilon\gt0$ is small enough.
  3. Extreme ⇒ BFS (contrapositive): if $x$ is not a BFS, its support is dependent, and $x=\tfrac12(x+\varepsilon d)+\tfrac12(x-\varepsilon d)$ is the average of two different feasible points, so $x$ is not extreme.
  4. BFS ⇒ extreme: suppose $x=\alpha y+(1-\alpha)z$ with $0\lt\alpha\lt1$ and $y,z\in K$. For a nonbasic $j$: $0=x_j=\alpha y_j+(1-\alpha)z_j$ with $y_j,z_j\ge0$, which forces $y_j=z_j=0$. So $y_N=z_N=0$, hence $By_B=b=Bz_B=Bx_B$, and since $B$ is nonsingular, $y_B=z_B=x_B$: $y=z=x$. No genuine average exists.
  5. A BFS exists (Ch 6 PS1 P11): start from any feasible $x$. If its support is dependent, choose the sign of $d$ so that some $d_j\gt0$ and move to $x-\varepsilon^*d$ with $\varepsilon^*=\min_{d_j\gt0}x_j/d_j$ (the same kind of ratio test as D2). One positive entry hits 0, none goes negative, no zero entry becomes positive. The support shrank; repeat. It must stop (the support can't shrink forever), and it stops at an independent support = a BFS.
  6. Optimal version (Ch 6 PS1 P12): do the same at an optimal $x^\star$. Both $d$ and $-d$ are feasible directions, so FONC gives $c^Td\ge0$ and $-c^Td\ge0$, so $c^Td=0$. Because the cost is linear, $c^T(x^\star-td)=c^Tx^\star$ exactly for every $t$. So each reduction step keeps the point optimal, and it ends at an optimal BFS.
The proof on numbers (slide example of B3)
  1. $x=(\tfrac12,\tfrac12,\tfrac12)$ is feasible ($\tfrac12+\tfrac12=1$ twice) with 3 positive entries but only $m=2$ rows, so its support is dependent: $a_1+a_2-a_3=0$, i.e. $d=(1,1,-1)$, $Ad=0$. Not a BFS, not a corner.
  2. Here $c^Td=+1\ne0$, so this $x$ is not optimal: moving along $-d$ lowers the cost.
  3. Reduction: $d_j\gt0$ for $j=1,2$, so $\varepsilon^*=\min(\tfrac{1/2}{1},\tfrac{1/2}{1})=\tfrac12$, and $x-\tfrac12d=(0,0,1)$: the optimal BFS, cost $-1$.

D3. When nothing blocks: unboundedness

If $u\le0$ (no row has $u_i\gt0$), the whole ray $\bar x+td$, $t\ge0$, is feasible. If also $\bar\mu_q\lt0$, the cost $c^T\bar x+t\bar\mu_q\to-\infty$: the LP is unbounded below, no minimum exists. Both conditions are needed: with $\bar\mu_q\ge0$ the ray goes uphill or flat and proves nothing.

Tiny example

$\min\ -x_1$ s.t. $x_1-x_2=1$, $x\ge0$ ($m=1$). Basis $\{x_1\}$: $\bar x_1=1$, $\bar\lambda=c_1/1=-1$, $\bar\mu_2=0-(-1)(-1)=-1\lt0$, $u=B^{-1}a_2=-1\le0$. Ray: $x_1=1+t$, $x_2=t$, cost $-1-t\to-\infty$.

D4. Degeneracy, zero steps, cycling and Bland's rule

Zero steps. If some basic variable is already 0 at a degenerate corner and its $u_i\gt0$, then its ratio is $0/u_i=0$, so $\theta=0$. The basis changes ($x_q$ enters at value 0, that variable leaves) but the point and the cost do not move.

Slide p. 81: a negative reduced cost at an optimal point

$\min\ x_1$ s.t. $x_1+x_2=0$, $x\ge0$. The only feasible point is $(0,0)$, so it is optimal. Basis $\{x_1\}$: $\bar x_1=0$ (degenerate), $\bar\lambda=1$, $\bar\mu_2=0-1\cdot1=-1\lt0$, $u=1\gt0$, so $\theta=0/1=0$. A negative reduced cost at a degenerate BFS does not prove non-optimality. (And a zero step does not prove optimality either.)

Ties create degeneracy. If two rows tie in the ratio test, both hit 0 at the same $t$; only one leaves, so the other stays basic with value 0. Example (B3's LP): from basis $\{x_1,x_2\}$, $\bar\mu_3=c_3-a_3^T\bar\lambda=-1$ with $\bar\lambda=0$, $u=(1,1)$, ratios $1,1$: a tie. If $x_1$ leaves, $x_2$ stays basic at 0: the new BFS $(0,0,1)$ is degenerate.

Cycling. A zero step keeps the cost equal, so in principle a sequence of zero steps can return to a basis already visited and repeat forever. Without degeneracy this can't happen: every step strictly lowers the cost, so no basis can repeat, and there are finitely many bases, so the method stops.

Bland's rule prevents cycling: entering = the smallest index $j$ with $\bar\mu_j\lt0$; leaving = among rows tied in the ratio test, the variable with the smallest original index (not the first row of the table). With it, no basis repeats, so the method terminates.

D5. The new basis really is a basis

The new basis $B'$ is $B$ with column $r$ replaced by $a_q$. Since $a_q=Bu$, we can write $B'=B\,E$, where $E$ is the identity with column $r$ replaced by $u$ (check: column $r$ of $BE$ is $Bu=a_q$, other columns unchanged). $E$ is the identity except one column, so $\det E=u_r$. Hence

$$\det B'=u_r\,\det B\ne0,\quad\text{because the ratio test only picks rows with }u_r\gt0.$$

This holds even for a zero step. (Running example: $B=[a_1\ a_4]$, $u=(1,1)$, $r=2$: $B'=[a_1\ a_2]$, $\det B'=1\cdot1=1$ ✓.)

Check D. Ordered basis $(x_5,x_2,x_3)$, $\bar x_B=(4,3,6)$, entering $x_q$ with $\bar\mu_q=-1.5$, $u=(2,-1,3)$. Find $\theta$, the leaving variable by Bland, the cost change and whether the new BFS is degenerate.
Show answer

Only $u_i\gt0$: $4/2=2$ ($x_5$), $6/3=2$ ($x_3$); the $x_2$ row grows. Tie ⇒ smallest original index ⇒ $x_3$ leaves. Cost change $2\cdot(-1.5)=-3$. New basics $\bar x_B-2u=(0,5,0)$: $x_5$ stays basic at 0 ⇒ degenerate. (This is practice N2.)

E. A full simplex run by hand (concept level)

He won't ask you to run simplex, but seeing one complete run makes every concept above concrete. Running example, Bland's rule, start at the origin.

Step 1: at the corner (0,0)
  1. Basis $\{x_3,x_4\}$, $B=I$, $\bar x_B=(4,6)\ge0$: a BFS, cost 0.
  2. Prices $B^T\lambda=c_B=(0,0)$ ⇒ $\bar\lambda=(0,0)$. Reduced costs $\bar\mu_1=-2$, $\bar\mu_2=-3$. Negative ⇒ not optimal.
  3. Entering (Bland: smallest index with $\bar\mu_j\lt0$): $x_1$. $u=B^{-1}a_1=(1,1)$, direction $d=(1,0,-1,-1)$.
  4. Ratio test: $x_3$: $4/1=4$; $x_4$: $6/1=6$ ⇒ $\theta=4$, $x_3$ leaves.
  5. New corner $(0,0,4,6)+4(1,0,-1,-1)=(4,0,0,2)$, cost $0+4\cdot(-2)=-8$.
Step 2: at the corner (4,0)
  1. Basis $\{x_1,x_4\}$, $\bar x_B=(4,2)$. Prices $\bar\lambda=(-2,0)$ (C2). Reduced costs $\bar\mu_2=-1$, $\bar\mu_3=2$ ⇒ not optimal.
  2. Entering $x_2$; $u=B^{-1}a_2=(1,1)$; $d=(-1,1,0,-1)$.
  3. Ratio test: $x_1$: $4/1=4$; $x_4$: $2/1=2$ ⇒ $\theta=2$, $x_4$ leaves.
  4. New corner $(2,2,0,0)$, cost $-8+2\cdot(-1)=-10$.
Step 3: at the corner (2,2): stop

Basis $\{x_1,x_2\}$, $\bar x_B=(2,2)$, $\bar\lambda=(-1,-1)$, $\bar\mu_3=\bar\mu_4=1\ge0$ ⇒ optimal, $x^*=(2,2,0,0)$, cost $-10=b^T\bar\lambda$.

Another legal path. Starting instead with the most negative reduced cost ($x_2$, $\bar\mu_2=-3$): $\theta=\min(4/1,6/2)=3$, $x_4$ leaves, corner $(0,3)$, cost $-9$. There $\bar\mu_1=-\tfrac12$ (Check C2), $u=B^{-1}a_1=(\tfrac12,\tfrac12)$ for $(x_2,x_3)=(3,1)$, ratios $6$ and $2$, so $\theta=2$, $x_3$ leaves, and we reach $(2,2)$ again (cost $-9+2\cdot(-\tfrac12)=-10$). Different entering rules, different paths, same answer.

Simplex on the running LP

Click any dot (a basic solution) to stand there, or press Next simplex step. Watch the reduced costs (red = negative, green = $\ge0$) and the purple arrow $d$ sliding along an edge. Then turn the cost slider: a different corner wins.

What to notice: (1) a corner is optimal exactly when every $\bar\mu_N$ is green ($\ge0$); one red one is enough to move. (2) The arrow $d$ runs along an edge, and the ratio test stops it at the first basic variable that hits 0; the dashed continuation to the × is where the other basic variable would hit 0, an infeasible basic solution. (3) With $-c$ at angles below 45° (or above 270°) the corner $(4,0)$ wins, between 45° and about 63° $(2,2)$ wins, up to 180° $(0,3)$ wins, and between 180° and 270° the origin is already optimal. (4) Grey hollow dots are basic but infeasible ($x_B$ has a negative entry): simplex never stands there. (5) Switch the rule to "most negative μ" to see the other path $(0,0)\to(0,3)\to(2,2)$.

F. The tableau: only the first four slides

In plain words: the tableau is the same algebra written as one array, so that after row operations you can read off $\bar x_B$, every $u$, every reduced cost and the current cost.

  1. Split $Ax=b$ as $Bx_B+Nx_N=b$ and solve for the basics: $x_B=\bar x_B-B^{-1}Nx_N$.
  2. Put that into the cost: $c^Tx=c_B^T\bar x_B+(c_N^T-c_B^TB^{-1}N)x_N=z_0+\bar\mu_N^Tx_N$, with $z_0=c_B^TB^{-1}b$ (the current cost) and $\bar\mu_N=c_N-N^TB^{-T}c_B$, the reduced costs again (the slides write $r_N$ for this vector).
  3. Start from the array $\begin{bmatrix}B&N&b\\c_B^T&c_N^T&0\end{bmatrix}$. Row operations (multiply the top block by $B^{-1}$, then subtract $c_B^T\times$ the top rows from the bottom row) give $$\begin{bmatrix}I&B^{-1}N&B^{-1}b\\0&\bar\mu_N^T&-z_0\end{bmatrix}.$$ The bottom-right entry is $0-c_B^TB^{-1}b=-z_0$: minus the current cost.
  4. So: right column = $\bar x_B$; the column of $x_q$ inside $B^{-1}N$ = $u$; bottom row = reduced costs; bottom-right = $-z_0$.
Running example

At the origin ($B=I$ already, columns $x_1..x_4$ in order): $\left[\begin{array}{cccc|c}1&1&1&0&4\\1&2&0&1&6\\\hline-2&-3&0&0&0\end{array}\right]$: $\bar x_B=(x_3,x_4)=(4,6)$, reduced costs $(-2,-3)$ for $x_1,x_2$, cost $0$.

At $(4,0)$ (basis $\{x_1,x_4\}$), after the row operations: $\left[\begin{array}{cccc|c}1&1&1&0&4\\0&1&-1&1&2\\\hline0&-1&2&0&8\end{array}\right]$. The identity columns sit under $x_1,x_4$. Read off: $\bar x_B=(4,2)$; reduced costs $\bar\mu_2=-1$, $\bar\mu_3=2$; $-z_0=8$ so the cost is $-8$; the column of $x_2$ is $u=(1,1)$. All match C2 and D2.

Check F. A tableau's bottom-right entry is $5$. What is the current cost?
Show answer

$-5$: the corner holds $-z_0$. (Practice N11 is a full question on this.)

G. One idea, two chapters

Look back at what simplex did, in words that don't mention LP:

  1. Guess which constraints are tight. Simplex guesses "the nonbasic variables sit at their bound $x_N=0$".
  2. Solve an equality problem with only those: $Bx_B=b$, $B^T\lambda=c_B$.
  3. Sign test on the multipliers of the tight constraints: $\bar\mu_N\ge0$? A wrong sign ($\bar\mu_q\lt0$) means "this constraint is holding us back": release it ($x_q$ enters, leaves its bound).
  4. Move along a direction that keeps the other tight constraints tight, until the first new constraint blocks (ratio test); that one becomes tight.

The active-set method for QP (section I) does exactly these four things with general linear inequalities. The one real difference: an LP cost is linear, so moving further always keeps improving and you always walk until something blocks. A QP cost is a curved bowl: the best point along the direction may come before any constraint blocks. That's why the QP step is $\min\{1,\alpha_k\}$ instead of just "the ratio". Before that, we need the equality-constrained QP (section H), because it is the "solve an equality problem" step.

H. Equality-constrained QP

H1. The problem and its KKT system

$$\min_x\ f(x)=\tfrac12x^TQx-c^Tx\quad\text{s.t.}\quad Ax=b,\qquad Q=Q^T,\ \ \mathrm{rank}A=m\lt n.$$

The gradient is $\nabla f(x)=Qx-c$ and the Hessian (curvature) is $Q$. Without constraints and with $Q\succ0$, the minimiser solves $Qx=c$. With constraints, use the Chapter 9 Lagrangian $\ell(x,\lambda)=f(x)+\lambda^T(Ax-b)$; setting its gradient in $x$ to zero and keeping feasibility gives the KKT system:

$$Qx-c+A^T\lambda=0,\quad Ax=b\qquad\Longleftrightarrow\qquad \underbrace{\begin{bmatrix}Q&A^T\\A&0\end{bmatrix}}_{K}\begin{bmatrix}x\\\lambda\end{bmatrix}=\begin{bmatrix}c\\b\end{bmatrix}.$$

It's a linear system: solving a QP with equality constraints is just linear algebra. At a given $x$ the multiplier is unique ($A^T$ has independent columns because rank $A=m$). But a solution of this system is only a KKT point; whether it's a minimum depends on curvature (H2).

Running QP example

$\min\ x_1^2+x_2^2+x_3^2$ s.t. $x_1+x_2+x_3=3$. So $Q=2I$, $c=0$, $A=[1\ 1\ 1]$, $b=3$. KKT: $2x_i+\lambda=0$ for each $i$, so $x_i=-\lambda/2$; then $-3\lambda/2=3$ gives $\lambda=-2$, $x=(1,1,1)$.

H2. Why $Q$ only needs to be PD on null(A)

In plain words: on the plane $Ax=b$ you can only move in directions $d$ with $Ad=0$. Only the curvature of $f$ along those directions matters. If $f$ curves up along every allowed direction, there is exactly one minimiser, even if $f$ curves down in some forbidden direction.

The one-line derivation. Let $x^*$ be a KKT point and $x^*+d$ any other feasible point (so $Ad=0$). A quadratic's expansion is exact:

$$f(x^*+d)=f(x^*)+\nabla f(x^*)^Td+\tfrac12d^TQd.$$

At a KKT point $\nabla f(x^*)=Qx^*-c=-A^T\lambda$, so $\nabla f(x^*)^Td=-\lambda^TAd=0$. Therefore

$$\boxed{f(x^*+d)-f(x^*)=\tfrac12\,d^TQd\quad\text{for every feasible move }d\in\ker A.}$$

So $x^*$ is the unique global minimiser exactly when $d^TQd\gt0$ for every $d\ne0$ in $\ker A$: "$Q$ is PD on the null space of $A$". Nothing is said about directions outside $\ker A$.

allowed line x₂=0 forbidden contours of f = ½(x₁² − x₂²): a saddle green: along the line, f = ½t² red dashed: across it, f = −½t² f along two directions (t = distance)
Left: $f(x)=\tfrac12(x_1^2-x_2^2)$, i.e. $Q=\mathrm{diag}(1,-1)$, indefinite. Blue solid contours: $f=0.5$ and $f=2$; red dashed contours: $f=-0.5$ and $f=-2$. Green: the constraint $x_2=0$ ($A=[0\ 1]$, $b=0$). Right: along the allowed line, $f$ is a bowl $\tfrac12t^2$ (green), so the constrained problem has the unique minimiser $(0,0)$; across the line, $f$ is a hill $-\tfrac12t^2$ (red), but that direction is forbidden. Here $Z=(1,0)^T$ and $H_r=Z^TQZ=1\gt0$.

The same test with a matrix. Let the columns of $Z$ ($n\times(n-m)$) be a basis of $\ker A$, so every allowed $d$ is $d=Zv$ for exactly one $v$. Then $d^TQd=v^T(Z^TQZ)v$, so

$$\text{"}Q\text{ PD on }\ker A\text{"}\iff H_r:=Z^TQZ\succ0\qquad(\text{the reduced Hessian}).$$
The facts (Theorem 9.1.1, Proposition 9.1.2)
  • Unique global minimiser $\iff H_r\succ0$ $\iff d^TQd\gt0$ for all $0\ne d\in\ker A$. $Q$ itself need not be PD.
  • $K$ nonsingular $\iff H_r$ nonsingular. So $H_r\succ0\Rightarrow K$ nonsingular, but not conversely: $K$ can be nonsingular with $H_r$ negative; then the unique KKT point is not a minimiser (practice P3(b), N7(f)).
  • Neither test depends on which $Z$ you pick ($\tilde Z=ZR$ gives $\tilde H_r=R^TH_rR$).
Check H2. Same $Q=\mathrm{diag}(1,-1)$, but the constraint is $x_1+x_2=0$. Is there a unique minimiser?
Show answer

$\ker A$ is spanned by $Z=(1,-1)^T$: $H_r=1\cdot1+(-1)(-1)(-1)=1-1=0$, not PD. On the line $x=(t,-t)$, $f=\tfrac12(t^2-t^2)=0$ for all $t$: every point is a minimiser, so not unique.

$Q$ only needs to be PD on null(A)

Drag on the left picture to move the constraint line, and turn it with the line-angle slider. Watch the green curve on the right: it is $f$ along the line, and only its shape ($H_r=Z^TQZ$) decides whether there is a unique minimiser.

What to notice: in the H2 figure $Q$ is indefinite (a saddle: blue and red contours), yet the green curve is a bowl, so there is one minimiser on the line. Turn the line to 45° or 135°, along the saddle's asymptotes: $H_r=0$, the green curve goes flat and the minimiser is no longer unique (Check H2). Turn it to 90° (the line $x_1=\text{const}$): $H_r\lt0$, a KKT point still exists ($K$ is nonsingular) but it is the top of the green curve, not a minimum. The red dashed curve (across the line) never matters.

H3. The null-space method: deriving $\phi(z)$

Idea: describe all feasible points with free coordinates, substitute, and get an unconstrained problem.

  1. Find one feasible point $x_p$ ($Ax_p=b$).
  2. Every feasible $x$ differs from $x_p$ by something in $\ker A$, so $x=x_p+Zz$ for a unique $z\in\mathbb R^{n-m}$.
  3. Substitute and expand (use $Q=Q^T$, so the two cross terms $\tfrac12x_p^TQZz$ and $\tfrac12z^TZ^TQx_p$ are equal): $$f(x_p+Zz)=\tfrac12x_p^TQx_p+z^TZ^TQx_p+\tfrac12z^TZ^TQZz-c^Tx_p-c^TZz$$ $$=f(x_p)+z^T\underbrace{Z^T(Qx_p-c)}_{g_r}+\tfrac12z^T\underbrace{Z^TQZ}_{H_r}z=:\phi(z).$$
  4. $\phi$ is an ordinary quadratic in $z$ with no constraints. Stationarity: $\nabla\phi=H_rz+g_r=0$. If $H_r\succ0$: $z^*=-H_r^{-1}g_r$, $x^*=x_p+Zz^*$.
  5. Global uniqueness: with $g_r=-H_rz^*$, completing the square gives the exact identity $\phi(z)-\phi(z^*)=\tfrac12(z-z^*)^TH_r(z-z^*)\gt0$ for $z\ne z^*$ (practice P2).
  6. If you also need $\lambda$: solve $A^T\lambda=-(Qx^*-c)$.

He called deriving $\phi(z)$ "not difficult and also important": be able to write steps 2–4 from scratch.

Running QP example by the null-space method

$x_p=(3,0,0)$. $Z=\begin{bmatrix}-1&-1\\1&0\\0&1\end{bmatrix}$ (check $AZ=0$: each column sums to 0). $H_r=2Z^TZ=\begin{bmatrix}4&2\\2&4\end{bmatrix}\succ0$. $Qx_p-c=(6,0,0)$, $g_r=Z^T(6,0,0)=(-6,-6)$. $H_rz=(6,6)$ gives $z^*=(1,1)$, $x^*=(3,0,0)+(-2,1,1)=(1,1,1)$ ✓.

H4. The range-space (Schur complement) method

Idea: if $Q$ is invertible, eliminate $x$ and solve a small system for $\lambda$.

  1. From stationarity $Qx-c+A^T\lambda=0$: $x=Q^{-1}(c-A^T\lambda)$.
  2. Put it into $Ax=b$: $AQ^{-1}c-AQ^{-1}A^T\lambda=b$, i.e. $$S\lambda=AQ^{-1}c-b,\qquad S:=AQ^{-1}A^T\ \ (m\times m).$$
  3. Solve for $\lambda$, then $x=Q^{-1}(c-A^T\lambda)$.

$K$ nonsingular $\iff S$ nonsingular (when $Q$ is). If $Q\succ0$ then $S\succ0$: for $\nu\ne0$, full row rank gives $A^T\nu\ne0$, so $\nu^TS\nu=(A^T\nu)^TQ^{-1}(A^T\nu)\gt0$. But $Q$ nonsingular alone is not enough: $Q=\mathrm{diag}(1,-1)$, $A=[1\ 1]$ gives $S=1-1=0$.

Running QP example by Schur

$Q^{-1}=\tfrac12I$, $S=A(\tfrac12I)A^T=\tfrac32$, $S\lambda=0-3$ ⇒ $\lambda=-2$, $x=\tfrac12(0-A^T\lambda)=(1,1,1)$ ✓. Three methods, one answer.

When to use which: null space when $n-m$ is small or $Q$ is indefinite (only $H_r$ needs to be PD); range space when $Q$ is easy to invert (e.g. diagonal) and $m$ is small.

H5. The projector and the projected gradient (optional, lower priority)

Short on time? Skip this subsection: the core path is H1 → H2 → H3 → section I. Come back for H4–H5 if time allows.

Idea: to move without breaking $Ax=b$, strip from any vector $v$ the part that changes $Ax$. Look for $Pv=v-A^Tw$ (remove something in the row space of $A$) with $A(Pv)=0$: $Av-AA^Tw=0$, so $w=(AA^T)^{-1}Av$. Hence

$$P=I-A^T(AA^T)^{-1}A=Z(Z^TZ)^{-1}Z^T.$$

$P$ is symmetric, $P^2=P$, and its range is $\ker A$ (practice P5 of PS1). To apply it without $Z$: solve $(AA^T)w=Av$, then $Pv=v-A^Tw$.

Projected steepest descent. $d_P:=-P\nabla f(x)$ is feasible ($Ad_P=0$), and $\nabla f^Td_P=-\nabla f^TP\nabla f=-\nabla f^TP^TP\nabla f=-\|d_P\|^2$. So if $d_P\ne0$ it's a descent direction and $x$ is not optimal. $d_P=0$ means $\nabla f\in\mathrm{range}(A^T)$, i.e. $\nabla f=-A^T\lambda$ for some $\lambda$: exactly KKT stationarity. With $H_r\succ0$ that certifies the unique minimiser.

Projected CG (relation only): with $Z^TZ=I$ it is ordinary conjugate gradients on $H_rz=Z^T(c-Qx_p)$, so it ends in at most $n-m$ steps.

Numbers

$A=[1\ 1]$, $\nabla f(x)=(3,1)$. $AA^T=2$, $P=I-\tfrac12\begin{bmatrix}1&1\\1&1\end{bmatrix}=\begin{bmatrix}\tfrac12&-\tfrac12\\-\tfrac12&\tfrac12\end{bmatrix}$. $d_P=-P\nabla f=(-1,1)$: $Ad_P=0$ ✓, $\nabla f^Td_P=-3+1=-2=-\|d_P\|^2$ ✓.

Traps "Q is indefinite, so no minimum" is wrong: test $Q$ only on $\ker A$. "K is nonsingular, so the KKT point is the minimiser" is wrong: nonsingular $K$ only gives a unique KKT point.
Check H. $f(x)=\tfrac12x^TQx-c^Tx$ with $Q=\begin{bmatrix}1&2\\2&1\end{bmatrix}$ (eigenvalues $3,-1$) and $c=(3,1)$, constraint $x_1-x_2=2$. Is there a unique minimiser?
Show answer

$\ker A$ for $A=[1\ -1]$ is spanned by $Z=(1,1)^T$; $H_r=1+2+2+1=6\gt0$, so yes, unique global minimiser, even though $Q$ is indefinite. Practice N7 finishes it: $x^*=(\tfrac53,-\tfrac13)$.

I. Inequality QP: the active-set method

I1. The problem, the active set and the working set

$$\min_x\ f(x)=\tfrac12x^TQx-c^Tx\quad\text{s.t.}\quad a_i^Tx\le b_i,\ \ i=1,\dots,m.$$

(Now $a_i$ is the normal vector of constraint $i$.) The active set $\mathcal A(x)=\{i: a_i^Tx=b_i\}$ lists the constraints that are tight at $x$.

Idea: if we knew which constraints are tight at the answer, we would treat them as equalities and solve an equality QP (section H). We don't know, so we guess: the working set $W_k\subseteq\mathcal A(x_k)$ is the set of constraints we currently hold as equalities, with linearly independent normals. Then we improve the guess: add a constraint that blocks us, drop a constraint whose multiplier has the wrong sign. (A constraint can be active at $x_k$ without being in $W_k$.)

I2. The subproblem and why its direction goes downhill

From the current feasible $x_k$, look for a step $p$. For a quadratic the expansion is exact:

$$f(x_k+p)=f(x_k)+g_k^Tp+\tfrac12p^TQp,\qquad g_k=\nabla f(x_k)=Qx_k-c.$$

Keeping each working constraint tight means $a_i^T(x_k+p)=b_i$, i.e. $a_i^Tp=0$. So the direction is

$$p_k=\arg\min_p\ q_k(p):=g_k^Tp+\tfrac12p^TQp\quad\text{s.t.}\quad a_i^Tp=0,\ i\in W_k.$$

He stressed this form: "writing this in terms of the gradient is important to understand the algorithm". It is an equality QP in $p$ (section H). $x_k+p_k$ is the best point on the working-set equalities.

How to actually compute $p_k$. Stack the normals of the working constraints as the rows of a matrix $A_W$ (one row $a_i^T$ per $i\in W_k$). The subproblem is an equality QP in $p$ with linear term $g_k$ (in place of $-c$) and constraint $A_Wp=0$, so by H1 its KKT system is

$$\begin{bmatrix}Q&A_W^T\\A_W&0\end{bmatrix}\begin{bmatrix}p\\\lambda\end{bmatrix}=\begin{bmatrix}-g_k\\0\end{bmatrix}\qquad(\text{i.e. }Qp+A_W^T\lambda=-g_k,\ \ A_Wp=0).$$

Solve it (by hand for 2–3 unknowns, or by the null-space method of H3: write $p=Zv$ with $A_WZ=0$). Two remarks:

  • When the solution has $p=0$, the first block row reads $A_W^T\lambda=-g_k$, i.e. $g_k+\sum_{i\in W_k}\lambda_ia_i=0$: the same system gives the multipliers you need in I4.
  • When $p\ne0$, the $\lambda$ it produces is just a by-product; ignore it.

A fully worked step with $Q\ne I$ and a slanted working constraint is at the end of I3.

Why $p_k$ goes downhill (when $p_k\ne0$ and $Q$ is PD on the allowed directions). Every $\alpha p_k$ is also allowed, and $p_k$ is the best, so $h(\alpha)=q_k(\alpha p_k)=\alpha g_k^Tp_k+\tfrac{\alpha^2}{2}p_k^TQp_k$ is smallest at $\alpha=1$: $h'(1)=g_k^Tp_k+p_k^TQp_k=0$. Hence

$$\boxed{g_k^Tp_k=-p_k^TQp_k\lt0},\qquad f(x_k+\alpha p_k)-f(x_k)=\alpha g_k^Tp_k+\tfrac{\alpha^2}{2}p_k^TQp_k=\boxed{-\alpha\big(1-\tfrac{\alpha}{2}\big)p_k^TQp_k}.$$

Read the second formula as a parabola in $\alpha$: $f$ decreases for every $0\lt\alpha\lt2$, is lowest at $\alpha=1$, and is back to $f(x_k)$ at $\alpha=2$. So $\alpha=1$ is the best step if nothing blocks.

I3. How far: the ratio test and the step $\min\{1,\alpha_k\}$

Moving to $x_k+\alpha p_k$ keeps the working constraints tight ($a_i^Tp_k=0$). A constraint $i\notin W_k$ stays satisfied iff

$$a_i^Tx_k+\alpha\,a_i^Tp_k\le b_i\iff \alpha\,a_i^Tp_k\le\underbrace{b_i-a_i^Tx_k}_{\text{slack}\ \ge0}.$$

If $a_i^Tp_k\le0$ we move away from (or parallel to) that boundary: no limit. If $a_i^Tp_k\gt0$: $\alpha\le\text{slack}/a_i^Tp_k$. So

$$\boxed{\alpha_k=\min_{i\notin W_k,\ a_i^Tp_k\gt0}\ \frac{b_i-a_i^Tx_k}{a_i^Tp_k}}\qquad(+\infty\text{ if no such }i).$$

(The minimum is over $i\notin W_k$; one line of the Ch 9 notes prints $i\in W_k$ under the min, a typo: working constraints have $a_i^Tp_k=0$ and can't block.)

The step rule ("a very important point you have to remember")

Step $=\min\{1,\alpha_k\}$.

  • $\alpha_k\gt1$ (including $+\infty$): nothing blocks before the best point. Take the full step $x_{k+1}=x_k+p_k$, $W$ unchanged. Not $\alpha_k$: going beyond 1 climbs back up the parabola (and past 2 it is worse than staying).
  • $\alpha_k\le1$: a constraint $i_k$ blocks first. Step $\alpha_k$: $x_{k+1}=x_k+\alpha_kp_k$, and add $i_k$ to $W$ (just one, even if several tie). $\alpha_k=0$ can happen when an active constraint is not in $W_k$: $x$ stays, $W$ grows.

Compare LP: there the cost is linear (no parabola), so you always go all the way to the blocker, $\theta$.

Worked step: $Q\ne I$, slanted working constraint

$f(x)=\tfrac12(2x_1^2+x_2^2)-4x_1-4x_2$, i.e. $Q=\begin{bmatrix}2&0\\0&1\end{bmatrix}$, $c=(4,4)$. Constraints (1) $x_1+x_2\le2$, (2) $-x_1\le0$, (3) $x_2\le1$; normals $a_1=(1,1)$, $a_2=(-1,0)$, $a_3=(0,1)$. Current point $x^{(k)}=(2,0)$ with $W_k=\{1\}$ (only (1) is active: $2+0=2$).

  1. Gradient. $g_k=Qx^{(k)}-c=(4-4,\ 0-4)=(0,-4)$.
  2. Subproblem system with $A_W=[1\ \ 1]$: $$\begin{bmatrix}2&0&1\\0&1&1\\1&1&0\end{bmatrix}\begin{bmatrix}p_1\\p_2\\\lambda\end{bmatrix}=\begin{bmatrix}0\\4\\0\end{bmatrix}.$$ Row 1: $\lambda=-2p_1$. Row 3: $p_2=-p_1$. Row 2: $-p_1-2p_1=4$, so $p_1=-\tfrac43$. Hence $p^{(k)}=(-\tfrac43,\tfrac43)$ (and $\lambda=\tfrac83$, a by-product). It slides along the slanted line $x_1+x_2=2$.
  3. Check. $g_k^Tp^{(k)}=0+(-4)\tfrac43=-\tfrac{16}3$ and $p^{(k)T}Qp^{(k)}=2\cdot\tfrac{16}9+\tfrac{16}9=\tfrac{16}3$: $g_k^Tp=-p^TQp$ ✓.
  4. Ratio test over $i\notin W_k$: (2) $a_2^Tp=\tfrac43\gt0$, slack $0-(-2)=2$, ratio $\tfrac32$; (3) $a_3^Tp=\tfrac43\gt0$, slack $1-0=1$, ratio $\tfrac34$. So $\alpha_k=\tfrac34$, blocker $i_k=3$.
  5. Step $\min\{1,\tfrac34\}=\tfrac34$: $x^{(k+1)}=(2,0)+\tfrac34(-\tfrac43,\tfrac43)=(1,1)$, and (3) joins: $W_{k+1}=\{1,3\}$. $f$: $-4\to-6.5$; formula $-\tfrac34(1-\tfrac38)\cdot\tfrac{16}3=-2.5$ ✓.
  6. Next iteration. Two independent normals in $\mathbb R^2$, so $p^{(k+1)}=0$. The same system with $p=0$: $A_W^T\lambda=-g$ with $g=Qx^{(k+1)}-c=(-2,-3)$: $\lambda_1(1,1)+\lambda_3(0,1)=(2,3)$, so $\lambda_1=2$, $\lambda_3=1$. Both $\ge0$ and $Q\succ0$: $(1,1)$ is the global minimiser.

I4. When $p_k=0$: check the multipliers, maybe drop one

$p_k=0$ means $x_k$ is already the best point on the working-set equalities. Find the multipliers from

$$g_k+\sum_{i\in W_k}\lambda_i a_i=0.$$

(Ch 9 sign: $\ell=f+\sum\lambda_i(a_i^Tx-b_i)$; for "$\le$" constraints KKT needs $\lambda_i\ge0$.)

  • All $\lambda_i\ge0$: put $\lambda_i=0$ for $i\notin W_k$; then all KKT conditions hold. With $Q\succeq0$ the problem is convex, so $x_k$ is a global minimiser (Theorem 9.2.4). Stop.
  • Some $\lambda_j\lt0$: constraint $j$ is "holding us back the wrong way". Drop $j$ from $W$ (usually the most negative), keep $x_k$, and solve the subproblem again.

Why a negative multiplier means "release it". At $x_k$, $g_k=-\sum_{i\in W_k}\lambda_ia_i$. Take a direction $p$ that keeps the other working constraints tight ($a_i^Tp=0$, $i\ne j$) and moves strictly inside constraint $j$ ($a_j^Tp=-1$; possible because the normals are independent). Then $g_k^Tp=-\lambda_ja_j^Tp=\lambda_j\lt0$: downhill and feasible. So $x_k$ is not optimal, and the new subproblem's $p$ indeed has $a_j^Tp\lt0$ and $g_k^Tp\lt0$ (Ch 6 PS1 Problem 10). This is the QP twin of a negative reduced cost in simplex.

I5. One full run by hand

Problem

$\min\ \tfrac12\big((x_1-2)^2+(x_2-1)^2\big)$, i.e. $Q=I$, $c=(2,1)$ (constant dropped), subject to (1) $-x_2\le0$, (2) $x_1\le1$, (3) $x_2\le3$. Normals $a_1=(0,-1)$, $a_2=(1,0)$, $a_3=(0,1)$. Iterates are $x^{(0)},x^{(1)},\dots$ (superscripts), coordinates are $x_1,x_2$. Start $x^{(0)}=(0,0)$, $W_0=\{1\}$ (only (1) is active at $x^{(0)}$).

  1. Direction at $x^{(0)}$. $g^{(0)}=x^{(0)}-c=(-2,-1)$. $W_0=\{1\}$: $a_1^Tp=0$ means the second entry of $p$ is 0, so $p=(t,0)$; minimise $-2t+\tfrac12t^2$ ⇒ $t=2$, $p^{(0)}=(2,0)$. Check $g^{(0)T}p^{(0)}=-4=-p^{(0)T}Qp^{(0)}$ ✓.
  2. Ratio test over $i\notin W_0$: (2) $a_2^Tp^{(0)}=2\gt0$, slack $1-0=1$, ratio $0.5$; (3) $a_3^Tp^{(0)}=0$, skip. $\alpha_0=0.5\le1$ ⇒ step $0.5$: $x^{(1)}=(1,0)$, add (2): $W_1=\{1,2\}$. $f$: $0\to-1.5$ (formula $-0.5(1-0.25)\cdot4=-1.5$ ✓).
  3. Direction at $x^{(1)}$. Two independent normals in $\mathbb R^2$: only $p=0$ keeps both tight, so $p^{(1)}=0$.
  4. Multipliers. $g^{(1)}=(1-2,0-1)=(-1,-1)$. $g^{(1)}+\lambda_1(0,-1)+\lambda_2(1,0)=0$ ⇒ $\lambda_2=1$, $\lambda_1=-1\lt0$ ⇒ drop (1): $W_2=\{2\}$. The point does not move: $x^{(2)}=x^{(1)}=(1,0)$ (same point, new working set).
  5. Direction at $x^{(2)}$. $g^{(2)}=(-1,-1)$. $a_2^Tp=0$ means the first entry of $p$ is 0, so $p=(0,t)$; minimise $-t+\tfrac12t^2$ ⇒ $p^{(2)}=(0,1)$. Note $a_1^Tp^{(2)}=-1\lt0$: it moves strictly inside the released constraint.
  6. Ratio test over $i\notin W_2=\{1,3\}$: (1) $a_1^Tp^{(2)}=-1$, skip; (3) $a_3^Tp^{(2)}=1$, slack $3-0=3$, ratio $3$. $\alpha_2=3\gt1$ ⇒ full step 1, not 3: $x^{(3)}=(1,1)$, $W_3=W_2=\{2\}$.
  7. Stop test at $x^{(3)}$. $p^{(3)}=0$ (it is the best point on $x_1=1$); $g^{(3)}=(-1,0)$, $g^{(3)}+\lambda_2(1,0)=0$ ⇒ $\lambda_2=1\ge0$, $Q=I\succeq0$ ⇒ global minimiser $x^*=x^{(3)}=(1,1)$, $f^*=\tfrac12\cdot2-3=-2$ (i.e. $\tfrac12$ after adding back the dropped constant $\tfrac12\|c\|^2=2.5$). Sanity: $(1,1)$ is the point of the feasible strip nearest to $(2,1)$ ✓.
(1) x₂ ≥ 0 (2) x₁ ≤ 1 (3) x₂ ≤ 3 x⁽⁰⁾+p⁽⁰⁾ (blocked) α=3 would end here: too far x⁽⁰⁾=(0,0) x⁽¹⁾=x⁽²⁾=(1,0): drop (1) x⁽³⁾=x*=(1,1) c=(2,1): unconstrained min
Blue band: feasible set $\{x_1\le1,\ 0\le x_2\le3\}$ (it continues to the left). Green: accepted steps (step 0.5 to $(1,0)$, then a full step up to $(1,1)$). Red dashed: the full step $x^{(0)}+p^{(0)}$ that constraint (2) blocks. Grey dotted: where step $\alpha=3$ would have landed; the rule $\min\{1,\alpha_k\}$ stops at $(1,1)$. Purple: the unconstrained minimiser.
Check I. Redo the method for $\min\tfrac12\|x-(2,2)\|^2$ ($Q=I$, $c=(2,2)$) with (1) $x_1\le1$, (2) $x_2\le3$, from $x^{(0)}=(0,0)$, $W_0=\varnothing$.
Show answer
  1. $g^{(0)}=(-2,-2)$, no working constraints ⇒ $p^{(0)}=-g^{(0)}=(2,2)$ (since $Q=I$); $g^{(0)T}p^{(0)}=-8=-p^{(0)T}p^{(0)}$ ✓.
  2. Ratios: (1) $a_1^Tp^{(0)}=2$, slack 1 ⇒ $0.5$; (2) $a_2^Tp^{(0)}=2$, slack 3 ⇒ $1.5$. $\alpha_0=0.5\lt1$ ⇒ $x^{(1)}=(1,1)$, $W_1=\{1\}$.
  3. $g^{(1)}=(-1,-1)$; $a_1^Tp=0$ forces $p=(0,t)$, so minimise $-t+\tfrac12t^2$ ⇒ $p^{(1)}=(0,1)$.
  4. Ratio: (2) $a_2^Tp^{(1)}=1$, slack $2$ ⇒ $\alpha_1=2\gt1$ ⇒ full step (not 2!): $x^{(2)}=(1,2)$, $W_2=\{1\}$.
  5. $p^{(2)}=0$; $g^{(2)}=(-1,0)$, $\lambda_1=1\ge0$ ⇒ optimal $x^*=x^{(2)}=(1,2)$ (the projection of $(2,2)$ onto $x_1\le1$ ✓).
Active-set method, one step at a time

Pick an example and press Next step: each press does one iteration (move, or drop a constraint). Watch the purple arrow $p_k$, the ratio table and whether the step is cut short. You can also click inside the blue region to start from your own point.

What to notice: green thick lines are the working set $W_k$ (held as equalities); $p_k$ slides along them. When a constraint blocks before $x_k+p_k$ ($\alpha_k\le1$) the step is cut to $\alpha_k$ and that constraint joins $W$ (red); when nothing blocks before 1, the step is the full step 1, never $\alpha_k$ (I5: $\alpha=3$, step 1). When $p_k=0$ the multipliers decide: a red (negative) $\lambda_j$ means "drop $j$" and the point does not move; all green means stop. The ellipses are contours of $f$; the purple one passes through the current point.

I6. The dictionary: simplex ↔ active set

IngredientSimplex (Ch 8)Active-set QP (Ch 9)
"Tight" setnonbasic variables $x_N=0$ (basis $B$ = the rest)working set $W_k$ of constraints held as equalities
Equality solve$Bx_B=b$, $B^T\lambda=c_B$minimise $q_k(p)$ on $a_i^Tp=0,\ i\in W_k$
Sign testreduced costs $\bar\mu_N\ge0$? (multipliers of $x\ge0$)$\lambda_i\ge0$ for $i\in W_k$? (when $p_k=0$)
Wrong sign ⇒$x_q$ with $\bar\mu_q\lt0$ enters (leaves its bound $x_q=0$)constraint $j$ with $\lambda_j\lt0$ is dropped from $W_k$
Direction$d_B=-B^{-1}a_q,\ d_q=1$$p_k$ from the subproblem
Ratio test$\theta=\min_{u_i\gt0}(\bar x_B)_i/u_i$$\alpha_k=\min_{i\notin W_k,\,a_i^Tp_k\gt0}(b_i-a_i^Tx_k)/a_i^Tp_k$, step $\min\{1,\alpha_k\}$
Blocker ⇒basic variable hitting 0 leavesblocking constraint is added to $W_k$
Independence kept$\det B'=u_r\det B\ne0$blocker's normal is outside the span of the working normals
Zero stepdegenerate pivot $\theta=0$$\alpha_k=0$: an omitted active constraint blocks

He said of dropping the negative multiplier: "it resembles with the simplex method". Finite termination of the active-set method is "not part of the syllabus", and he is "never going to ask you the full algorithm": know each step and why.

J. Exam recipes

"Explain / check one simplex step" (concept level)
  1. Basis $B$: $\bar x_B=B^{-1}b$, $\bar x_N=0$. Feasible iff $\bar x_B\ge0$; degenerate iff some entry is 0.
  2. Prices: solve $B^T\lambda=c_B$. Reduced costs $\bar\mu_N=c_N-N^T\bar\lambda$. Meaning: rate of change of the cost when that variable is raised.
  3. All $\bar\mu_N\ge0$ ⇒ optimal (gap identity $c^Tx'-c^T\bar x=\bar\mu_N^Tx'_N\ge0$). Otherwise pick $q$ with $\bar\mu_q\lt0$ (Bland: smallest index).
  4. $u=B^{-1}a_q$, $d_B=-u$, $d_q=1$, $Ad=0$, $c^Td=\bar\mu_q$.
  5. $u\le0$ ⇒ unbounded below. Else $\theta=\min_{u_i\gt0}(\bar x_B)_i/u_i$; the minimising row leaves (Bland on ties).
  6. Cost change $\theta\bar\mu_q$; $\theta=0$ ⇔ degenerate step; new basis nonsingular since $\det B'=u_r\det B$.
Proof questions (Ch 6 PS1 P11–12)

Write: dependent support ⇒ $d\ne0$, $Ad=0$, $d$ zero off the support ⇒ $x\pm\varepsilon d\in K$ ⇒ (not extreme) / (slide with ratio $\varepsilon^*=\min_{d_j\gt0}x_j/d_j$ to shrink the support; at an optimum FONC on $\pm d$ gives $c^Td=0$, so the cost stays optimal). BFS ⇒ extreme: nonbasic parts of $y,z$ are 0, then $B$ nonsingular forces $y=z=x$.

Equality QP
  1. Write $\ell=f+\lambda^T(Ax-b)$, KKT: $Qx-c+A^T\lambda=0$, $Ax=b$, matrix $K$.
  2. Find $Z$ with $AZ=0$; compute $H_r=Z^TQZ$. PD ⇒ unique global minimiser ($Q$ may be indefinite). Not PD ⇒ say why (a direction with $d^TQd\le0$).
  3. Solve: KKT system, or null space ($x_p$, $g_r$, $H_rz=-g_r$), or Schur ($S\lambda=AQ^{-1}c-b$).
One active-set step
  1. $g_k=Qx_k-c$; solve the subproblem on $a_i^Tp=0$, $i\in W_k$. Check $g_k^Tp_k=-p_k^TQp_k$.
  2. $p_k\ne0$: ratios only for $i\notin W_k$ with $a_i^Tp_k\gt0$. Step $\min\{1,\alpha_k\}$; add the blocker iff $\alpha_k\le1$.
  3. $p_k=0$: solve $g_k+\sum_{W_k}\lambda_ia_i=0$. All $\ge0$ ⇒ stop (global if $Q\succeq0$). Else drop the most negative, keep $x_k$.

What the professor said about this

In class (speech-to-text, wording rough)
  • I'm not going to ask entire simplex algorithm, but concepts involved in each step Ch 8 lec 2 [1:07:00] → expect "what does this step mean / why" questions, like Quiz 5.
  • I will ask numerical problem in other chapter, but not here Ch 8 lec 3 [55:00] → no full simplex runs; at most a one-step formula check.
  • the theorem, fundamental theorem of linear programming, and also equivalence between extreme points and the basic feasible solution Ch 8 lec 3 [55:30] → know statements and proof steps (P11–12, sections B4 and D2b).
  • if you understand these first four slides, it is enough Ch 8 lec 3 [54:30] → tableau: only section F.
  • On the LP KKT system: It's worth memorizing … this is the only thing you have to memorize (stationarity) Ch 8 lec 2 [13:30] → write $A^T\lambda+\mu=c$ instantly.
  • Focus on the concepts involved in the steps of simplex method … what is the meaning of a negative [reduced cost] Ch 8 lec 3 [16:00] → section C1–C2.
  • chapter six set one is essentially these proofs they are important Ch 9 lec 1 [02:00] → Part B of the practice below.
  • On deriving $\phi(z)$: it is not difficult and also important Ch 9 lec 1 [18:30] → section H3.
  • On $q_k(p)$: Writing this in terms of the gradient is important to understand the algorithm Ch 9 lec 1 [1:18:30] → section I2.
  • On the step rule (move by $\alpha_k$ only when it is less than one): That is a very important point you have to remember Ch 9 lec 2 [27:00] → section I3.
  • it resembles with the simplex method (dropping the negative multiplier) Ch 9 lec 2 [34:00]; finite termination: it's not part of the syllabus; never going to ask you the full algorithm Ch 9 lec 2 [35:30].

Ch 9 has never been examined; Ch 8 only had Quiz 5 (all 14 questions were signalled in class). Source: the exam-pattern analysis of all past papers and the lecture transcripts.

Practice (try first, then open the answer)

A. Quiz 5 (Ch 8), all 14 questions

Quiz conventions: standard form $\min c^Tx$, $Ax=b$, $x\ge0$, rank $A=m$; Lagrangian $c^Tx+\lambda^T(b-Ax)-\mu^Tx$; the basis construction sets $\bar x_N=0$, $\bar\mu_B=0$ and solves KKT stationarity for $\bar\lambda,\bar\mu_N$; $u$ = coefficients of $a_q$ in the ordered basis ($Bu=a_q$). Stems are shortened; options are as in the paper.

Q1 Quiz 5 Q1 (past paper)MCQ

Which statement gives the general definition of a basic solution for the equality constraints of the standard-form problem?

  1. (a) Any vector satisfying $Ax=b$ is a basic solution.
  2. (b) Any feasible vector with at most $m$ positive components is a basic solution.
  3. (c) Choose $m$ independent columns and require every associated basic variable to be strictly positive.
  4. (d) Choose a nonsingular $m$-column submatrix $B$, set all other variables to zero, and solve $Bx_B=b$.
Show answer

Answer: (d). That is Def 8.2.1.1; $x_B=B^{-1}b$ is unique. (a) most solutions of $Ax=b$ have many nonzeros. (b) "at most $m$ positive" is not enough: those columns must also be independent (and "feasible" is not part of "basic"). (c) basic variables may be zero (degenerate) or even negative (basic but infeasible).

Q2 Quiz 5 Q2 (past paper)MCQ

$\bar x\in K$, $S$ = indices of its strictly positive components. Which condition is necessary and sufficient for $\bar x$ to be a BFS?

  1. (a) The columns of $A$ indexed by $S$ are linearly independent.
  2. (b) $|S|\le m$, with no further condition on their columns.
  3. (c) The columns indexed by $S$ span $\mathbb R^m$, with no independence requirement.
  4. (d) Exactly $m$ positive components, with no further condition on their columns.
Show answer

Answer: (a). Basic ⇒ positive coordinates are basic ⇒ their columns are part of an independent basis. Conversely extend independent support columns to $m$ independent columns (full row rank), giving the added basics value 0. (b),(d) counting is not enough: e.g. two equal columns. (d) also wrongly excludes degenerate BFSs. (c) spanning allows dependence (too many columns).

Q3 Quiz 5 Q3 (past paper)MCQ

Which statement correctly relates basic feasible solutions and extreme points of $K$?

  1. (a) Every feasible point is an extreme point.
  2. (b) Every extreme point is a nondegenerate basic feasible solution.
  3. (c) A point of $K$ is extreme if and only if it is a basic feasible solution.
  4. (d) If $K$ is unbounded, it has no extreme points.
Show answer

Answer: (c) (Theorem 8.2.2; proof steps in section D2b). (a) midpoints of two corners are feasible but not extreme. (b) degenerate BFSs are also extreme points (e.g. $(0,0,1)$ in section B3). (d) unbounded $K$ like $\{x\ge0: x_1-x_2=0\}$ still has the corner $0$; any nonempty standard-form $K$ has a BFS.

Q4 Quiz 5 Q4 (past paper)MCQ

Feasible set nonempty and an optimal solution exists. Which conclusion is guaranteed?

  1. (a) At least one optimal solution is a basic feasible solution.
  2. (b) Every optimal solution is a basic feasible solution.
  3. (c) The feasible set is bounded.
  4. (d) Every basic feasible solution is optimal.
Show answer

Answer: (a) (fundamental theorem, P12): dependent support ⇒ null direction $d$ with $c^Td=0$ (FONC in $\pm d$) ⇒ slide to the boundary keeping the cost ⇒ fewer positives ⇒ eventually an optimal BFS. (b) if two corners are optimal, their midpoint is optimal but not a BFS. (c) unbounded feasible sets can have optima (e.g. $\min x_1$, $x\ge0$). (d) obviously false: corners differ in cost.

Q5 Quiz 5 Q5 (past paper)MCQ

For the selected basis, which statement correctly describes $\bar x$ and its primal feasibility for every such basis?

  1. (a) $\bar x_B=B^{-1}b$, and nonsingularity of $B$ automatically gives $\bar x\ge0$.
  2. (b) $\bar x_B=B^{-T}b$, and the candidate is feasible exactly when $B^{-T}b\ge0$.
  3. (c) $\bar x_B=B^{-1}b$, and the candidate is feasible exactly when $\bar\mu_N\ge0$.
  4. (d) $\bar x_B=B^{-1}b$, and the candidate is feasible exactly when $B^{-1}b\ge0$.
Show answer

Answer: (d). $\bar x_N=0$ turns $Ax=b$ into $B\bar x_B=b$. (a) nonsingular says nothing about signs (e.g. $B=1$, $b=-1$). (b) the transpose belongs to $\bar\lambda$, not $\bar x_B$. (c) $\bar\mu_N\ge0$ is dual feasibility (optimality), not primal feasibility.

Q6 Quiz 5 Q6 (past paper)MCQ

Using the stated equality-residual convention, which pair gives the equality multipliers and the nonbasic reduced costs?

  1. (a) $\bar\lambda=B^{-1}c_B,\ \bar\mu_N=c_N-N^T\bar\lambda$.
  2. (b) $\bar\lambda=B^{-T}c_B,\ \bar\mu_N=c_N-N^T\bar\lambda$.
  3. (c) $\bar\lambda=B^{-T}c_B,\ \bar\mu_N=N^T\bar\lambda-c_N$.
  4. (d) $\bar\lambda=B^Tc_B,\ \bar\mu_N=c_N-N^T\bar\lambda$.
Show answer

Answer: (b). Stationarity $c-A^T\bar\lambda-\bar\mu=0$; basic block with $\bar\mu_B=0$: $B^T\bar\lambda=c_B$; nonbasic block: $\bar\mu_N=c_N-N^T\bar\lambda$. (a) forgets the transpose. (c) wrong sign (that would be $-\bar\mu_N$). (d) $B^T$ instead of $B^{-T}$.

Q7 Quiz 5 Q7 (past paper)MCQ

$\bar x$ a BFS with basis candidates $\bar\lambda,\bar\mu$ (dual feasibility not assumed); $x'$ any feasible point. Which objective-gap identity always holds?

  1. (a) $c^Tx'-c^T\bar x=b^T\bar\lambda$.
  2. (b) $c^Tx'-c^T\bar x=\bar\mu_N^T\bar x_N$.
  3. (c) $c^Tx'-c^T\bar x=\bar\mu_N^Tx'_N$.
  4. (d) $c^Tx'-c^T\bar x=-\bar\mu_N^Tx'_N$.
Show answer

Answer: (c). $c^T(x'-\bar x)=\bar\lambda^TA(x'-\bar x)+\bar\mu^T(x'-\bar x)=0+\bar\mu^Tx'-0=\bar\mu_N^Tx'_N$. (a) $b^T\bar\lambda=c^T\bar x$ is the value, not the gap. (b) $\bar x_N=0$, so (b) would claim every feasible point has the same cost. (d) sign error.

Q8 Quiz 5 Q8 (past paper)MCQ

Equalities, stationarity and complementarity hold for the basis candidates. Which sign test guarantees $\bar x$ is feasible and optimal?

  1. (a) $\bar x_B\ge0$ and $\bar\mu_N\ge0$.
  2. (b) $\bar x_B\ge0$ and $\bar\mu_N\le0$.
  3. (c) $\bar x_B\le0$ and $\bar\mu_N\ge0$.
  4. (d) $\bar\mu_N\ge0$, with no condition on $\bar x_B$.
Show answer

Answer: (a). $\bar x_B\ge0$ = primal feasible; $\bar\mu_N\ge0$ = dual feasible; then the gap identity gives $c^Tx'-c^T\bar x=\bar\mu_N^Tx'_N\ge0$. (b) negative reduced cost means a cheaper direction may exist. (c) $\bar x_B\le0$ is infeasible unless zero. (d) without $\bar x_B\ge0$ the point need not even be feasible.

Q9 Quiz 5 Q9 (past paper)MCQ

Increase nonbasic $x_q$ at unit rate, other nonbasics fixed, equalities preserved. Which formula always gives the direction $d$?

  1. (a) $d_B=u,\ d_q=1,\ d_j=0$ for every other nonbasic $j$.
  2. (b) $d_B=-u,\ d_q=1,\ d_j=0$ for every other nonbasic $j$.
  3. (c) $d_B=-u,\ d_q=-1,\ d_j=0$ for every other nonbasic $j$.
  4. (d) $d_B=0,\ d_q=1,\ d_j=0$ for every other nonbasic $j$.
Show answer

Answer: (b). $Ad=Bd_B+a_q=0$ ⇒ $d_B=-B^{-1}a_q=-u$. (a) gives $Ad=2a_q\ne0$. (c) decreases $x_q$ below 0: infeasible. (d) $Ad=a_q\ne0$ breaks the equalities.

Q10 Quiz 5 Q10 (past paper)MCQ

At least one $u_i\gt0$. $\theta$ = the largest feasible increase in $x_q$. Which formula always gives $\theta$?

  1. (a) $\theta=\min_{i:u_i\ne0}(\bar x_B)_i/u_i$.
  2. (b) $\theta=\min_{i:u_i\lt0}(\bar x_B)_i/(-u_i)$.
  3. (c) $\theta=\max_{i:u_i\gt0}(\bar x_B)_i/u_i$.
  4. (d) $\theta=\min_{i:u_i\gt0}(\bar x_B)_i/u_i$.
Show answer

Answer: (d). Basic values are $\bar x_B-tu$; only rows with $u_i\gt0$ decrease. (a) includes negative $u_i$, giving negative "ratios" that are no limit at all. (b) those rows increase, they never block. (c) max overshoots: the first row to hit zero would go negative. $\theta$ may be 0 at a degenerate BFS.

Q11 Quiz 5 Q11 (past paper)MCQ

Which condition on $u$ and the entering reduced cost $\bar\mu_q$ certifies that the objective is unbounded along this path?

  1. (a) $u\le0$ and $\bar\mu_q=0$.
  2. (b) Some $u_i\gt0$, and $\bar\mu_q\lt0$.
  3. (c) $u\le0$ and $\bar\mu_q\gt0$.
  4. (d) $u\le0$ and $\bar\mu_q\lt0$.
Show answer

Answer: (d). $u\le0$ ⇒ the whole ray is feasible; cost $=c^T\bar x+t\bar\mu_q\to-\infty$ needs $\bar\mu_q\lt0$. (a) cost constant along the ray. (b) a positive $u_i$ gives a finite $\theta$. (c) cost increases along the ray.

Q12 Quiz 5 Q12 (past paper)MCQ

$x'$ obtained from BFS $\bar x$ by a feasible increase $\theta\ge0$ of $x_q$ ($\bar\mu_q$ any sign). Which statement about the objective change always holds?

  1. (a) The change is $-\theta\bar\mu_q$, so a negative reduced cost increases the objective.
  2. (b) The change is $\theta\bar\mu_q$, and it is strictly negative exactly when $\theta\gt0$ and $\bar\mu_q\lt0$.
  3. (c) A negative $\bar\mu_q$ guarantees a strict objective decrease even when $\theta=0$.
  4. (d) Every positive feasible step strictly decreases the objective, regardless of $\bar\mu_q$.
Show answer

Answer: (b). $c^T(x'-\bar x)=\theta(c_q-c_B^Tu)=\theta\bar\mu_q$. (a) sign error. (c) $\theta=0$ gives change $0$ (degenerate pivot). (d) if $\bar\mu_q\gt0$ the cost goes up.

Q13 Quiz 5 Q13 (past paper)MCQ

Which condition characterises degeneracy of a BFS $\bar x$ with basis $B$?

  1. (a) Every basic variable is strictly positive.
  2. (b) The basis matrix $B$ is singular.
  3. (c) At least one basic variable equals zero.
  4. (d) At least one nonbasic variable equals zero.
Show answer

Answer: (c). Equivalent: fewer than $m$ positive components. (a) is the definition of nondegenerate. (b) a basis is always nonsingular by definition. (d) every nonbasic variable is zero in every basic solution; it says nothing.

Q14 Quiz 5 Q14 (past paper)MCQ

$\bar x$ is a degenerate BFS and the reduced cost $\bar\mu_q$ of nonbasic $x_q$ is negative. Which statement is correct?

  1. (a) The current point can still be optimal, because the maximum feasible step for $x_q$ may be zero.
  2. (b) The current point must be nonoptimal, regardless of the maximum feasible step.
  3. (c) The original objective must be unbounded below.
  4. (d) A sufficiently small positive increase in $x_q$ must be feasible.
Show answer

Answer: (a). If some $(\bar x_B)_r=0$ with $u_r\gt0$, then $\theta=0$ (slide example: $\min x_1$, $x_1+x_2=0$, basis $\{x_1\}$, $\bar\mu_2=-1$, $\theta=0$, and $(0,0)$ is optimal). (b) only true at a nondegenerate BFS. (c) unboundedness needs $u\le0$. (d) false exactly in the $\theta=0$ case. (Note: a zero step does not prove optimality either.)

B. Chapter 6 Problem Set 1: guided proof steps (the Ch 9 propositions)

P1 Ch 6 PS1 Problem 1(b),(d) → Ch 9 null-space methodShort answer

$f(x)=\tfrac12x^TQx-c^Tx+\gamma$, $Q=Q^T$, $Ax_p=b$, columns of $Z$ a basis of $\ker A$. (a) Show $f(x_p+Zz)=f(x_p)+g_r^Tz+\tfrac12z^TH_rz$ with $H_r=Z^TQZ$, $g_r=Z^T(Qx_p-c)$. (b) Show $Z^T(Qx-c)=0$ holds iff some $\lambda$ satisfies $Qx-c+A^T\lambda=0$.

Hint

(a) Expand $\tfrac12(x_p+Zz)^TQ(x_p+Zz)$; the two cross terms are equal by symmetry. (b) Use $\ker(A)^\perp=\mathrm{range}(A^T)$.

Show answer
  1. $\tfrac12(x_p+Zz)^TQ(x_p+Zz)=\tfrac12x_p^TQx_p+z^TZ^TQx_p+\tfrac12z^TZ^TQZz$ (cross terms $\tfrac12x_p^TQZz+\tfrac12z^TZ^TQx_p$ are equal since $Q=Q^T$).
  2. $-c^T(x_p+Zz)=-c^Tx_p-z^TZ^Tc$. Add $\gamma$ and group: $f(x_p)+z^TZ^T(Qx_p-c)+\tfrac12z^TZ^TQZz=f(x_p)+g_r^Tz+\tfrac12z^TH_rz$. Stationarity: $H_rz=-g_r$.
  3. (b) $Z^T\nabla f(x)=0$ ⇔ $\nabla f(x)\perp\ker A$ ⇔ $\nabla f(x)\in\mathrm{range}(A^T)$ ⇔ $\nabla f(x)=-A^T\lambda$ for some $\lambda$. Conversely multiply $Qx-c+A^T\lambda=0$ by $Z^T$ and use $Z^TA^T=(AZ)^T=0$.
  4. Multiplier unique: two of them give $A^T(\lambda_1-\lambda_2)=0$, and full row rank makes $A^T$ injective. But stationarity alone does not certify a minimum.
P2 Ch 6 PS1 Problem 2(b),(d),(e) → Theorem 9.1.1Short answer

Same setting. (a) If $H_r\succ0$, with $z^*=-H_r^{-1}g_r$ prove $f(x_p+Zz)-f(x_p+Zz^*)=\tfrac12(z-z^*)^TH_r(z-z^*)$ and conclude unique global minimum. (b) Why does $H_r\succeq0$ singular contradict uniqueness? (c) Give an example with $Q$ indefinite but $H_r\succ0$.

Hint

(a) Complete the square in $\phi$, using $g_r=-H_rz^*$. (b) A null vector $v$ of $H_r$ gives a whole line $x^*+tZv$.

Show answer
  1. (a) $\phi(z)=f(x_p)-z^{*T}H_rz+\tfrac12z^TH_rz$ and $\phi(z^*)=f(x_p)-\tfrac12z^{*T}H_rz^*$. Subtract: $\tfrac12z^TH_rz-z^{*T}H_rz+\tfrac12z^{*T}H_rz^*=\tfrac12(z-z^*)^TH_r(z-z^*)$.
  2. This is $\gt0$ for every $z\ne z^*$, and $z\mapsto x_p+Zz$ is a bijection onto the feasible set ($Z$ full column rank) ⇒ $x^*$ is the unique global minimiser (an exact identity, stronger than SOSC's local claim).
  3. (b) If $H_rv=0$, $v\ne0$, put $d=Zv\ne0$: $Ad=0$, $d^TQd=0$, and $\nabla f(x^*)^Td=0$ (FONC). So $f(x^*+td)=f(x^*)+t\cdot0+\tfrac{t^2}2\cdot0=f(x^*)$ for all $t$: a whole line of minimisers. (Negative curvature is ruled out by SONC: $C=\ker A$, $L_\star=Q$.)
  4. (c) $Q=\mathrm{diag}(1,-1)$, $A=[0\ 1]$, $b=0$, $c=0$: $Z=(1,0)^T$, $H_r=[1]\succ0$; unique minimiser $(0,0)$. The negative eigenvalue lives in the direction $(0,1)$, which the constraint forbids.
P3 Ch 6 PS1 Problem 3(c)–(d) and 4(a),(c) → Prop 9.1.2 and Schur methodShort answer

(a) Prove: $K$ nonsingular $\iff H_r$ nonsingular (look at $Ku=0$). (b) Give a 2-D example where $K$ is nonsingular but $H_r$ is not PD. (c) Derive $S\lambda=AQ^{-1}c-b$ and show $Q\succ0\Rightarrow S\succ0$.

Hint

(a) $Qu+A^T\nu=0$, $Au=0$; write $u=Zv$ and multiply by $Z^T$. (b) Swap the signs in P2(c).

Show answer
  1. (a, ⇐) $Au=0$ ⇒ $u=Zv$; $Z^T(QZv+A^T\nu)=H_rv=0$ ⇒ $v=0$ ⇒ $u=0$ ⇒ $A^T\nu=0$ ⇒ $\nu=0$. Trivial kernel.
  2. (a, ⇒ by contrapositive) $H_rv=0$, $v\ne0$: $u=Zv\ne0$, $Au=0$, $Z^TQu=0$ ⇒ $Qu\in\ker(A)^\perp=\mathrm{range}(A^T)$ ⇒ pick $\nu$ with $A^T\nu=-Qu$. Then $(u,\nu)\ne0$ is in $\ker K$.
  3. (b) $Q=\mathrm{diag}(-1,1)$, $A=[0\ 1]$: $H_r=[-1]$ (nonsingular, not PD), $K=\begin{bmatrix}-1&0&0\\0&1&1\\0&1&0\end{bmatrix}$, $\det K=1$. Unique KKT point $(0,0)$, but $f(t,0)=-t^2/2\to-\infty$: no minimiser.
  4. (c) $x=Q^{-1}(c-A^T\lambda)$ into $Ax=b$: $AQ^{-1}c-AQ^{-1}A^T\lambda=b$. For $\nu\ne0$, full row rank gives $A^T\nu\ne0$, so $\nu^TS\nu=(A^T\nu)^TQ^{-1}(A^T\nu)\gt0$.
P4 Ch 6 PS1 Problem 7(a)–(c) → Prop 9.2.2Short answer

$r=\nabla f(\bar x)$, $S=\{p:a_i^Tp=0,\ i\in\mathcal A\}$, $q(p)=r^Tp+\tfrac12p^TQp$, $Q$ PD on $S$, $p^\star\ne0$ minimises $q$ on $S$. (a) Show $r^Tp^\star=-p^{\star T}Qp^\star\lt0$. (b) Why is $\bar x+\alpha p^\star$ feasible for small $\alpha\gt0$? (c) Show $f(\bar x+\alpha p^\star)-f(\bar x)=-\alpha(1-\tfrac\alpha2)p^{\star T}Qp^\star$.

Hint

(a) $h(\alpha)=q(\alpha p^\star)$ is minimised over $\alpha$ at $\alpha=1$ because $\alpha p^\star\in S$.

Show answer
  1. (a) $h(\alpha)=\alpha r^Tp^\star+\tfrac{\alpha^2}2p^{\star T}Qp^\star$; $h'(1)=r^Tp^\star+p^{\star T}Qp^\star=0$. Since $p^\star\in S\setminus\{0\}$ and $Q$ is PD on $S$, $p^{\star T}Qp^\star\gt0$, so $r^Tp^\star\lt0$: a descent direction.
  2. (b) Active $i$: $a_i^T(\bar x+\alpha p^\star)=b_i+0$. Inactive $i$: $a_i^T\bar x\lt b_i$ strictly, so a small enough $\alpha$ keeps it $\le b_i$ (finitely many constraints).
  3. (c) Exact expansion of a quadratic: $f(\bar x+\alpha p)-f(\bar x)=\alpha r^Tp+\tfrac{\alpha^2}2p^TQp=-\alpha p^TQp+\tfrac{\alpha^2}2p^TQp=-\alpha(1-\tfrac\alpha2)p^TQp$, negative for $0\lt\alpha\lt2$, most negative at $\alpha=1$.
  4. So the fundamental FONC fails at $\bar x$ ($p^\star$ is a feasible direction with $\nabla f^Tp^\star\lt0$): (b) is about feasibility, (a),(c) about the objective.
P5 Ch 6 PS1 Problem 12(a)–(b) → fundamental theorem of LPShort answer

$x^\star$ is a global minimiser of the standard-form LP whose positive-support columns are dependent; $Ad=0$, $d\ne0$, $d_i=0$ where $x^\star_i=0$. (a) Prove $c^Td=0$. (b) Why is the cost constant on the feasible part of $x^\star+td$, and why would a zero directional derivative not suffice for a general objective?

Show answer
  1. (a) $A(x^\star\pm\varepsilon d)=b$, and for small $\varepsilon$ both stay $\ge0$ (only positive components move). So $d$ and $-d$ are feasible directions; FONC: $c^Td\ge0$ and $c^T(-d)\ge0$ ⇒ $c^Td=0$.
  2. (b) $c^T(x^\star+td)=c^Tx^\star+t\,c^Td=c^Tx^\star$ exactly, because the cost is linear. For a nonlinear $f$, $\nabla f^Td=0$ only kills the first-order term; curvature could still change $f$.
  3. Then pick the sign so some $d_i\gt0$ and move to $x^\star-\varepsilon^*d$, $\varepsilon^*=\min_{d_i\gt0}x^\star_i/d_i$: still optimal, one fewer positive component; repeat finitely often ⇒ optimal BFS.

C. New questions in his style

N1 New, in his styleMCQ

At a nondegenerate BFS, the nonbasic reduced costs are $\bar\mu_N=(2,\,0,\,-3)$ for $x_4,x_5,x_6$. Which statement is correct?

  1. (a) The BFS is optimal because most reduced costs are nonnegative.
  2. (b) Increasing $x_4$ by a small $t\gt0$ lowers the cost by $2t$.
  3. (c) Increasing $x_6$ by a small $t\gt0$ (basics adjusting) is feasible and lowers the cost by $3t$.
  4. (d) The LP is unbounded below because a reduced cost is negative.
Show answer

Answer: (c). Cost change $=t\bar\mu_6=-3t$; nondegenerate ⇒ $\theta\gt0$, so small $t$ is feasible. (a) one negative reduced cost is enough to fail the test (at a nondegenerate BFS it proves non-optimality). (b) $\bar\mu_4=2$ raises the cost. (d) unbounded needs also $u=B^{-1}a_6\le0$. (Side note: $\bar\mu_5=0$ means increasing $x_5$ leaves the cost unchanged: possible alternative optimum later.)

N2 New, in his styleMCQ

Ordered basis $(x_5,x_2,x_3)$ with $\bar x_B=(4,3,6)$. Entering $x_q$ has $\bar\mu_q=-1.5$ and $u=B^{-1}a_q=(2,-1,3)$. Using Bland's rule, which is correct?

  1. (a) $\theta=3$, $x_2$ leaves, cost changes by $-4.5$.
  2. (b) $\theta=2$, $x_3$ leaves, cost changes by $-3$, and the new BFS is degenerate.
  3. (c) $\theta=2$, $x_5$ leaves, cost changes by $-3$, and the new BFS is nondegenerate.
  4. (d) The LP is unbounded because $u$ has a negative entry.
Show answer

Answer: (b). Only $u_i\gt0$ count: $4/2=2$ ($x_5$) and $6/3=2$ ($x_3$); the $x_2$ row ($u=-1$) grows. Tie ⇒ Bland: smallest original index leaves ⇒ $x_3$ (not the first row!). Cost change $\theta\bar\mu_q=2(-1.5)=-3$. New basics: $\bar x_B-2u=(0,5,0)$; $x_3$ leaves, $x_5$ stays basic at 0 ⇒ degenerate. (a) uses the $u_i\lt0$ row. (c) wrong leaving variable and wrong degeneracy claim. (d) unbounded needs $u\le0$ entirely.

N3 New, in his styleMCQ

At a BFS, nonbasic $x_q$ has $u=B^{-1}a_q=(-1,0,-2)$. What can you conclude?

  1. (a) The LP is unbounded below, whatever $\bar\mu_q$ is.
  2. (b) $\theta=0$, so the pivot is degenerate.
  3. (c) If $\bar\mu_q\gt0$, the LP is unbounded above, so it has no minimum.
  4. (d) The ray $\bar x+td$, $t\ge0$, is entirely feasible; if $\bar\mu_q\lt0$ the LP is unbounded below.
Show answer

Answer: (d). $x_B(t)=\bar x_B-tu=\bar x_B+t(1,0,2)\ge0$ for all $t\ge0$; cost $c^T\bar x+t\bar\mu_q$. (a) needs $\bar\mu_q\lt0$. (b) no row has $u_i\gt0$, so there is no ratio test at all ($\theta=+\infty$). (c) going up in cost says nothing about the minimum.

N4 New, in his styleMCQ

Ordered basis $(x_1,x_4)$, $\bar x_B=(0,5)$, entering $x_3$ with $\bar\mu_3=-2$ and $u=(1,2)$. After the pivot:

  1. (a) $x_1$ leaves, $x_3$ enters at value 0; the point and cost are unchanged but the basis changes, and the new $B$ is nonsingular.
  2. (b) $x_4$ leaves with $\theta=2.5$; cost drops by 5.
  3. (c) The pivot is impossible because the new basis would be singular.
  4. (d) The current point is proved optimal since $\theta=0$.
Show answer

Answer: (a). Ratios $0/1=0$, $5/2=2.5$ ⇒ $\theta=0$, row of $x_1$. Degenerate pivot: cost change $\theta\bar\mu_3=0$. $\det B'=u_1\det B=1\cdot\det B\ne0$. (b) ignores the smaller ratio. (c) $u_1\gt0$ guarantees nonsingularity. (d) a zero step does not prove optimality; the next basis may allow a positive step (this is where cycling/Bland matter).

N5 New, in his styleMCQ

Convert $\min\ x_1-2x_2$ s.t. $x_1+x_2\le4$, $2x_1-x_2\ge1$, $x_1\ge0$, $x_2$ free, with variables ordered $(x_1,x_2^+,x_2^-,s_1,s_2)$. Which $(A,c)$ is the standard form?

  1. (a) $A=\begin{bmatrix}1&1&-1&1&0\\2&-1&1&0&1\end{bmatrix}$, $c=(1,-2,2,0,0)$
  2. (b) $A=\begin{bmatrix}1&1&-1&1&0\\2&-1&1&0&-1\end{bmatrix}$, $c=(1,-2,-2,0,0)$
  3. (c) $A=\begin{bmatrix}1&1&-1&1&0\\2&-1&1&0&-1\end{bmatrix}$, $c=(1,-2,2,0,0)$
  4. (d) $A=\begin{bmatrix}1&1&1&1&0\\2&-1&-1&0&-1\end{bmatrix}$, $c=(1,-2,2,0,0)$
Show answer

Answer: (c). $x_2=x_2^+-x_2^-$: column of $x_2^-$ = minus column of $x_2^+$, cost $-(-2)=+2$. Row 1 ($\le$): slack $+s_1$. Row 2 ($\ge$): surplus $-s_2$. $b=(4,1)$. (a) surplus with $+1$ turns "$\ge$" into "$\le$". (b) cost of $x_2^-$ must flip sign. (d) $x_2^-$ column not negated.

N6 New, in his style (one step, concept level)Descriptive

$\min\ -x_1-2x_2$ s.t. $x_1+x_2+x_3=4$, $x_1+3x_2+x_4=6$, $x\ge0$. Take the basis $\{x_1,x_4\}$ (in that order).

(a) Compute $\bar x_B$ and say whether it is a BFS. (b) Compute $\bar\lambda$ and $\bar\mu_N$ for $N=\{x_2,x_3\}$. Is the BFS optimal? (c) Which variable enters, what is $u$, which leaves, what is $\theta$ and the new cost? (d) Check optimality of the new basis. (e) Verify the gap identity with $x'=(1,1,2,2)$.

Hint

$B=\begin{bmatrix}1&0\\1&1\end{bmatrix}$, $B^{-1}=\begin{bmatrix}1&0\\-1&1\end{bmatrix}$. Solve $B^T\lambda=c_B$ for $\lambda$.

Show answer
  1. (a) $\bar x_B=B^{-1}b=(4,\,-4+6)=(4,2)\ge0$ ⇒ BFS $\bar x=(4,0,0,2)$, nondegenerate, cost $-4$.
  2. (b) $c_B=(-1,0)$; $B^T\lambda=\begin{bmatrix}1&1\\0&1\end{bmatrix}\lambda=(-1,0)$ ⇒ $\lambda_2=0,\ \lambda_1=-1$. $\bar\mu_2=c_2-a_2^T\bar\lambda=-2-(1)(-1)-(3)(0)=-1$; $\bar\mu_3=0-(1)(-1)=1$. $\bar\mu_2\lt0$ ⇒ not optimal.
  3. (c) $x_2$ enters. $u=B^{-1}a_2=B^{-1}(1,3)=(1,2)$. Ratios: $x_1$: $4/1=4$; $x_4$: $2/2=1$ ⇒ $\theta=1$, $x_4$ leaves. New point: $x_B=(4,2)-1\cdot(1,2)=(3,0)$, $x_2=1$ ⇒ $x'=(3,1,0,0)$. Cost change $\theta\bar\mu_2=-1$ ⇒ new cost $-5$ (check: $-3-2=-5$ ✓).
  4. (d) New basis $\{x_1,x_2\}$: $B'=\begin{bmatrix}1&1\\1&3\end{bmatrix}$, $B'^T\lambda=(-1,-2)$ ⇒ $\lambda=(-\tfrac12,-\tfrac12)$. $\bar\mu_3=0+\tfrac12=\tfrac12$, $\bar\mu_4=0+\tfrac12=\tfrac12$, both $\ge0$ ⇒ optimal, $x^*=(3,1,0,0)$, cost $-5=b^T\lambda=-2-3$ ✓.
  5. (e) $x'=(1,1,2,2)$: $Ax'=(4,6)$ ✓ feasible. $c^Tx'-c^T\bar x=-3-(-4)=1$; $\bar\mu_N^Tx'_N=(-1)(1)+(1)(2)=1$ ✓.
N7 New, in his style (Q indefinite, PD on null(A))Descriptive

$\min f(x)=\tfrac12x^TQx-c^Tx$ with $Q=\begin{bmatrix}1&2\\2&1\end{bmatrix}$, $c=\begin{bmatrix}3\\1\end{bmatrix}$, subject to $x_1-x_2=2$.

(a) Is $Q$ PD? (b) Write the KKT matrix $K$ and the KKT system. (c) Decide whether there is a unique minimiser using $Q$ on $\ker A$. (d) Solve by the null-space method with $x_p=(2,0)$ (write $\phi(z)$). (e) Check with the range-space formulas. (f) What changes if the constraint is $x_1+x_2=2$ instead?

Hint

$\ker A$ for $A=[1\ -1]$ is spanned by $Z=(1,1)^T$. Eigenvalues of $Q$: $1\pm2$.

Show answer
  1. (a) Eigenvalues $3$ and $-1$ ⇒ $Q$ is indefinite.
  2. (b) $A=[1\ -1]$, $b=2$: $K=\begin{bmatrix}1&2&1\\2&1&-1\\1&-1&0\end{bmatrix}$, $K\begin{bmatrix}x_1\\x_2\\\lambda\end{bmatrix}=\begin{bmatrix}3\\1\\2\end{bmatrix}$ ($\det K=-6\ne0$).
  3. (c) $Z=(1,1)^T$: $H_r=Z^TQZ=1+2+2+1=6\gt0$ ⇒ $Q$ is PD on $\ker A$ ⇒ unique global minimiser (and $K$ nonsingular). The indefiniteness of $Q$ is in the direction $(1,-1)$, which the constraint forbids.
  4. (d) $f(x_p)=\tfrac12\cdot4-6=-4$; $Qx_p-c=(2,4)-(3,1)=(-1,3)$, $g_r=Z^T(-1,3)=2$. $\phi(z)=-4+2z+3z^2$ ⇒ $z^*=-\tfrac13$ ⇒ $x^*=(2,0)-\tfrac13(1,1)=(\tfrac53,-\tfrac13)$. $Qx^*-c=(1,3)-(3,1)=(-2,2)=-\lambda(1,-1)$ ⇒ $\lambda=2$. $f^*=-\tfrac{13}3$.
  5. (e) $Q^{-1}=\tfrac13\begin{bmatrix}-1&2\\2&-1\end{bmatrix}$, $S=AQ^{-1}A^T=-2$ (nonsingular but negative: fine, uniqueness came from $H_r$), $AQ^{-1}c=-2$, $S\lambda=-2-2=-4$ ⇒ $\lambda=2$; $x=Q^{-1}(c-A^T\lambda)=Q^{-1}(1,3)=(\tfrac53,-\tfrac13)$ ✓.
  6. (f) $A=[1\ 1]$, $Z=(1,-1)^T$: $H_r=1-4+1=-2\lt0$. $K$ is still nonsingular ($\det=2$), so the KKT point is unique: $x=(0,2)$, $\lambda=-1$. But on the line $x=(t,2-t)$, $f=-t^2$: the KKT point is a constrained maximum, and $f\to-\infty$, so there is no minimiser. Unique KKT solution ≠ unique minimiser.
N8 New, in his style (active-set steps)Descriptive

$\min\tfrac12\|x\|^2-3x_1-2x_2$ (so $Q=I$, $c=(3,2)$) subject to (1) $-x_2\le0$, (2) $x_1+x_2\le2$, (3) $-x_1\le0$. Start at $x_0=(0,0)$ with working set $W_0=\{1\}$.

(a) Which constraints are active at $x_0$? (b) Compute $g_0$, solve the direction subproblem for $p_0$, and check $g_0^Tp_0=-p_0^TQp_0$. (c) Do the ratio test, decide the step, and update $x$ and $W$. (d) At the new point, show $p_1=0$, compute the multipliers and say what to do. (e) Do the next direction and step and certify the answer.

Hint

With $W=\{1\}$, $a_1^Tp=0$ means $p_2=0$. In the ratio test skip constraints with $a_i^Tp\le0$.

Show answer
x₀=(0,0) x₁=(2,0) x₂=(1.5,0.5) x₀+p₀ c=(3,2) x₁+x₂=2 Key: blue = feasible set · green = accepted steps · red dashed = full step blocked · purple = unconstrained min
  1. (a) $\mathcal A(x_0)=\{1,3\}$. $W_0=\{1\}$ omits the active constraint 3 (allowed: $W_k\subseteq\mathcal A$).
  2. (b) $g_0=Qx_0-c=(-3,-2)$. $p_2=0$, minimise $-3p_1+\tfrac12p_1^2$ ⇒ $p_0=(3,0)$. $g_0^Tp_0=-9=-p_0^Tp_0$ ✓.
  3. (c) Constraints not in $W_0$: (2) $a_2^Tp_0=3\gt0$, ratio $(2-0)/3=\tfrac23$; (3) $a_3^Tp_0=-3\le0$, skip. $\alpha_0=\tfrac23\lt1$ ⇒ step $\tfrac23$: $x_1=(2,0)$, $W_1=\{1,2\}$. $f$: $0\to-4$ (formula: $-\tfrac23(1-\tfrac13)\cdot9=-4$ ✓).
  4. (d) Two independent normals in $\mathbb R^2$ ⇒ only $p=0$ satisfies $a_1^Tp=a_2^Tp=0$, so $p_1=0$. $g_1=(-1,-2)$; $g_1+\lambda_1(0,-1)+\lambda_2(1,1)=0$ ⇒ $\lambda_2=1$, $\lambda_1=-1\lt0$ ⇒ not optimal; drop constraint 1: $W_2=\{2\}$, $x$ unchanged.
  5. (e) $a_2^Tp=0$ ⇒ $p=(t,-t)$; $q=g_1^Tp+\tfrac12p^Tp=t+t^2$ ⇒ $t=-\tfrac12$, $p=(-\tfrac12,\tfrac12)$. Note $a_1^Tp=-\tfrac12\lt0$: it moves strictly inside the released constraint, as Ch 6 PS1 Problem 10 predicts (section I4). Ratio: (1) skip; (3) $a_3^Tp=\tfrac12$, ratio $(0+2)/\tfrac12=4\gt1$ ⇒ full step 1: $x_2=(1.5,0.5)$. Then $p=0$, $g=(-1.5,-1.5)$, $\lambda_2=1.5\ge0$, $Q=I\succeq0$ ⇒ global minimiser $x^*=(1.5,0.5)$, $f^*=-4.25$.
N9 New, in his styleMCQ

In the active-set method, $p_k\ne0$ and the ratio test gives $\alpha_k=3.5$ (attained by constraint 7). What is the update?

  1. (a) $x_{k+1}=x_k+3.5p_k$ and add 7 to $W$.
  2. (b) $x_{k+1}=x_k+p_k$ and keep $W$ unchanged.
  3. (c) $x_{k+1}=x_k+p_k$ and add 7 to $W$.
  4. (d) $x_{k+1}=x_k$ and drop a constraint with negative multiplier.
Show answer

Answer: (b). Step $=\min\{1,\alpha_k\}=1$: $\alpha_k\gt1$ only says no constraint blocks the subproblem minimiser $x_k+p_k$; going to $3.5$ would overshoot ($f$ change $-\alpha(1-\alpha/2)p^TQp\gt0$ for $\alpha\gt2$). (a) the "very important point" he stressed. (c) constraint 7 is not reached, so it is not active. (d) multipliers are tested only when $p_k=0$.

N10 New, in his styleMCQ

Equality QP, $\mathrm{rank}A=m$. Which statement is TRUE?

  1. (a) If $Q$ has a negative eigenvalue, there is no minimiser.
  2. (b) If $K=\begin{bmatrix}Q&A^T\\A&0\end{bmatrix}$ is nonsingular, its solution $x$ is the unique minimiser.
  3. (c) If $Z^TQZ\succ0$, $K$ is nonsingular and its solution is the unique global minimiser.
  4. (d) The Schur method needs $S=AQ^{-1}A^T\succ0$ to be applied.
Show answer

Answer: (c) (Thm 9.1.1 + Prop 9.1.2). (a) false: N7 has $Q$ indefinite and a unique minimiser. (b) false: N7(f), unique KKT point is a maximum. (d) the Schur elimination needs $Q$ nonsingular and $S$ nonsingular for a unique solution; $S\succ0$ is a consequence of $Q\succ0$, not a requirement (in N7, $S=-2$ and the method works).

N11 New, in his style (reading a tableau)MCQ

A standard-form LP with variables $x_1,\dots,x_4$ has this tableau at the basis $\{x_1,x_2\}$ (rows: $x_1$, then $x_2$; last row: reduced costs, then $-z_0$):

$$\left[\begin{array}{cccc|c}1&0&2&-1&3\\0&1&-1&1&1\\\hline 0&0&1&-2&5\end{array}\right]$$

Which statement is correct?

  1. (a) The current cost is $5$, and $x_3$ should enter because its reduced cost is positive.
  2. (b) The current cost is $-5$; $x_4$ enters with $u=(-1,1)$; $x_2$ leaves with $\theta=1$; the new cost is $-7$.
  3. (c) The current cost is $-5$; $x_4$ enters and $x_1$ leaves, because its ratio $3/(-1)=-3$ is the smallest.
  4. (d) The BFS is optimal because the right-hand column $(3,1)$ is non-negative.
Show answer

Answer: (b). Read off (section F): $\bar x_B=(x_1,x_2)=(3,1)$; reduced costs $\bar\mu_3=1$, $\bar\mu_4=-2$; bottom-right $=-z_0=5$, so the cost is $z_0=-5$. Only $\bar\mu_4\lt0$, so $x_4$ enters; its column is $u=(-1,1)$. Ratio test over $u_i\gt0$ only: row $x_2$ gives $1/1=1$, so $\theta=1$ and $x_2$ leaves. New cost $=-5+\theta\bar\mu_4=-5-2=-7$; new values $x_1=3-1\cdot(-1)=4$, $x_4=1$. (One LP with this tableau: $A=\begin{bmatrix}1&0&2&-1\\0&1&-1&1\end{bmatrix}$, $b=(3,1)$, $c=(-1,-2,1,-3)$.) (a) the corner holds $-z_0$, and a positive reduced cost means raising that variable raises the cost. (c) negative ratios are never used: that row grows. (d) $\bar x_B\ge0$ only says the point is feasible; optimality needs $\bar\mu_N\ge0$.

N12 New, in his style (active-set ratio test)MCQ

Constraints (1) $-x_2\le0$, (2) $x_1\le1$, (3) $x_2\le3$, (4) $x_1+x_2\le2$. At $x_k=(1,0)$ with working set $W_k=\{2\}$, the subproblem gives $p_k=(0,2)$. What happens next?

  1. (a) Full step: $x_{k+1}=(1,2)$, $W$ unchanged.
  2. (b) Step $0.5$: $x_{k+1}=(1,1)$, and constraint 4 is added to $W$.
  3. (c) Step $1.5$: $x_{k+1}=(1,3)$, and constraint 3 is added to $W$.
  4. (d) Constraint 1 gives ratio $(0-0)/(-2)=0$, so $\alpha_k=0$ and $x$ does not move.
Show answer

Answer: (b). Check only $i\notin W_k$ with $a_i^Tp_k\gt0$. (1): $a_1^Tp_k=-2\le0$, skip (moving away from it). (3): $a_3^Tp_k=2$, slack $3-0=3$, ratio $1.5$. (4): $a_4^Tp_k=2$, slack $2-1=1$, ratio $0.5$. So $\alpha_k=0.5\le1$: step $0.5$ to $(1,1)$, and the blocker (4) joins $W$. (a) ignores the blockers. (c) takes the larger ratio, which would break (4): $1+3=4\gt2$. (d) uses a constraint with $a_i^Tp_k\lt0$; such rows never limit the step.

Self-test (no looking)

S1

Write the five LP KKT conditions and the three basis formulas ($\bar x_B,\bar\lambda,\bar\mu_N$).

Show answer

$A^T\lambda+\mu=c$, $Ax=b$, $x\ge0$, $\mu\ge0$, $\mu^Tx=0$. $\bar x_B=B^{-1}b$, $\bar\lambda=B^{-T}c_B$, $\bar\mu_N=c_N-N^T\bar\lambda$ (and $\bar x_N=0$, $\bar\mu_B=0$).

S2

State the ratio test, the unboundedness test and the cost change of one simplex step.

Show answer

$u=B^{-1}a_q$; $\theta=\min_{u_i\gt0}(\bar x_B)_i/u_i$; unbounded if $u\le0$ and $\bar\mu_q\lt0$; cost change $\theta\bar\mu_q$ (zero if degenerate $\theta=0$).

S3

Two theorems linking corners and BFS (statements only), and the one-line idea behind both proofs.

Show answer

Extreme point ⇔ BFS; optimum exists ⇒ optimal BFS exists (and feasible ⇒ BFS exists). Idea: dependent positive-support columns give $d\ne0$, $Ad=0$, supported on the positives, so $x\pm\varepsilon d$ are both feasible (not extreme), and sliding along $d$ (with $c^Td=0$ at an optimum) zeroes a component.

S4

Why is the new basis nonsingular after a pivot? What does Bland's rule say, and why is it needed?

Show answer

$B'=B[e_1\cdots u\cdots e_m]$, $\det B'=u_r\det B\ne0$ since $u_r\gt0$ ($r$ = the leaving row). Bland: enter the smallest index with negative reduced cost; among ratio ties, the smallest original index leaves. Needed because degenerate ($\theta=0$) pivots keep the cost equal, so bases could cycle.

S5

Write $K$, the condition for a unique minimiser of an equality QP, and $\phi(z)$.

Show answer

$K=\begin{bmatrix}Q&A^T\\A&0\end{bmatrix}$, $K\binom x\lambda=\binom cb$. Unique global min $\iff Z^TQZ\succ0$ ($Q$ PD on $\ker A$; $Q$ itself may be indefinite) ⇒ $K$ nonsingular (converse false). $\phi(z)=f(x_p)+g_r^Tz+\tfrac12z^TH_rz$, $g_r=Z^T(Qx_p-c)$, $H_r=Z^TQZ$.

S6

Schur (range-space) formulas, and the projector with its key property.

Show answer

$S=AQ^{-1}A^T$, $S\lambda=AQ^{-1}c-b$, $x=Q^{-1}(c-A^T\lambda)$; $Q\succ0\Rightarrow S\succ0$. $P=I-A^T(AA^T)^{-1}A$; $r=-P\nabla f$ is feasible and $\nabla f^Tr=-\|r\|^2$; $r=0\iff$ KKT. Projected CG: at most $n-m$ steps.

S7

Active set: write $q_k(p)$, the identity for $g_k^Tp_k$, the ratio test, the step rule and what to do when $p_k=0$.

Show answer

$q_k(p)=g_k^Tp+\tfrac12p^TQp$ on $a_i^Tp=0$ ($i\in W_k$), $g_k=Qx_k-c$. $g_k^Tp_k=-p_k^TQp_k\lt0$. $\alpha_k=\min_{i\notin W_k,\,a_i^Tp_k\gt0}(b_i-a_i^Tx_k)/a_i^Tp_k$. Step $\min\{1,\alpha_k\}$; add the blocker if $\alpha_k\le1$. $p_k=0$: solve $g_k+\sum_{W_k}\lambda_ia_i=0$; all $\ge0$ ⇒ stop (global min if $Q\succeq0$); else drop the most negative, keep $x_k$.

S8

Give the simplex ↔ active-set dictionary in one line each for: entering, leaving, sign test.

Show answer

Entering $x_q$ ($\bar\mu_q\lt0$) ↔ dropping constraint $j$ ($\lambda_j\lt0$). Leaving variable (ratio-test blocker) ↔ adding the blocking constraint. $\bar\mu_N\ge0$ ↔ $\lambda_{W}\ge0$ at $p_k=0$.

Summary card (for revision; the formula sheet copies this)

Symbols: LP in standard form $\min c^Tx$, $Ax=b$, $x\ge0$ ($A$ is $m\times n$, rank $m$, $a_j$ = column $j$). $B$/$N$ = basic/nonbasic columns, $x_B,x_N,c_B,c_N$ their parts; $\lambda$ = multipliers of $Ax=b$, $\mu$ = multipliers of $x\ge0$ ($\mu_N$ = reduced costs); $q$ = entering index, $u=B^{-1}a_q$, $d$ = direction, $\theta$ = step, $r$ = leaving row (in the ordered basis). QP: $f=\tfrac12x^TQx-c^Tx$, $Q=Q^T$; $Z$ = basis of $\ker A$, $x_p$ any point with $Ax_p=b$, $H_r=Z^TQZ$, $g_r=Z^T(Qx_p-c)$, $S=AQ^{-1}A^T$, $P$ = projector onto $\ker A$; inequality constraints $a_i^Tx\le b_i$ ($a_i$ = normal of constraint $i$), $W_k$ = working set, $g_k=Qx_k-c$, $p_k$ = direction, $\alpha_k$ = ratio bound, $A_W$ = matrix whose rows are the working normals.

Memorise cold: Chapter 8 (LP)
  • LP KKT (Lagrangian $c^Tx+\lambda^T(b-Ax)-\mu^Tx$): $\;A^T\lambda+\mu=c,\quad Ax=b,\ x\ge0,\quad \mu\ge0,\quad \mu^Tx=0.$ ($\lambda$ free.)
  • Basis $A=[B\ N]$: $\bar x_B=B^{-1}b,\ \bar x_N=0$ (feasible iff $B^{-1}b\ge0$) · $\bar\lambda=B^{-T}c_B$ · $\bar\mu_B=0$ · $\bar\mu_N=c_N-N^T\bar\lambda$ (reduced costs = rate of cost change when raising that variable).
  • Optimal if $\bar x_B\ge0$ and $\bar\mu_N\ge0$. Gap identity: $c^Tx'-c^T\bar x=\bar\mu_N^Tx'_N$ for every feasible $x'$.
  • Step: pick $q$ with $\bar\mu_q\lt0$; $u=B^{-1}a_q$; direction $d_B=-u,\ d_q=1$ (so $Ad=0$, $c^Td=\bar\mu_q$).
  • Ratio test: $\theta=\min_{i:\,u_i\gt0}(\bar x_B)_i/u_i$; cost change $=\theta\bar\mu_q$. Unbounded if $u\le0$ and $\bar\mu_q\lt0$. $\theta=0$ can only happen at a degenerate corner (some basic variable $=0$); it isn't guaranteed there.
  • Theorems: extreme point $\Leftrightarrow$ BFS; feasible $\Rightarrow$ a BFS exists; optimum exists $\Rightarrow$ an optimal BFS exists. $\bar x$ is a BFS iff its positive-support columns are independent.
  • Bland: enter = smallest index with $\bar\mu_j\lt0$; leave = smallest original index among ratio ties. New $B'$ nonsingular since $\det B'=u_r\det B$, $u_r\gt0$.
  • Tableau: $\begin{bmatrix}I&B^{-1}N&B^{-1}b\\0&\bar\mu_N^T&-z_0\end{bmatrix}$: right column $\bar x_B$, column of $x_q$ = $u$, bottom row = reduced costs, corner = minus the cost.
Memorise cold: Chapter 9 (QP $f=\tfrac12x^TQx-c^Tx$)
  • Equality QP KKT ($\ell=f+\lambda^T(Ax-b)$): $\;Qx-c+A^T\lambda=0,\ Ax=b$, i.e. $\underbrace{\begin{bmatrix}Q&A^T\\A&0\end{bmatrix}}_{K}\begin{bmatrix}x\\\lambda\end{bmatrix}=\begin{bmatrix}c\\b\end{bmatrix}.$
  • Why null(A): at a KKT point, $f(x^*+d)-f(x^*)=\tfrac12d^TQd$ for every $d\in\ker A$.
  • Unique global minimiser $\iff H_r=Z^TQZ\succ0$ $\iff d^TQd\gt0$ for all $0\ne d\in\ker A$. Then $K$ is nonsingular. $Q$ need not be PD. $K$ nonsingular $\iff H_r$ nonsingular (not PD!).
  • Null-space: $x=x_p+Zz$, $\ \phi(z)=f(x_p)+g_r^Tz+\tfrac12z^TH_rz$, $g_r=Z^T(Qx_p-c)$, solve $H_rz^*=-g_r$.
  • Range-space (Schur), $Q$ nonsingular: $S=AQ^{-1}A^T$, $\ S\lambda=AQ^{-1}c-b$, $\ x=Q^{-1}(c-A^T\lambda)$. $Q\succ0\Rightarrow S\succ0$.
  • Projector: $P=I-A^T(AA^T)^{-1}A=Z(Z^TZ)^{-1}Z^T$; $d_P=-P\nabla f$ gives $\nabla f^Td_P=-\|d_P\|^2$; $d_P=0\iff$ KKT stationarity. Projected CG: at most $n-m$ steps.
  • Active set: $g_k=Qx_k-c$, $\ q_k(p)=g_k^Tp+\tfrac12p^TQp$ on $a_i^Tp=0\ (i\in W_k)$; compute $p_k$ from $\begin{bmatrix}Q&A_W^T\\A_W&0\end{bmatrix}\begin{bmatrix}p\\\lambda\end{bmatrix}=\begin{bmatrix}-g_k\\0\end{bmatrix}$ (if $p=0$, this $\lambda$ is the multiplier vector). If $p_k\ne0$: $g_k^Tp_k=-p_k^TQp_k\lt0$, $\ f(x_k+\alpha p_k)-f(x_k)=-\alpha(1-\tfrac\alpha2)p_k^TQp_k$.
  • Ratio test: $\alpha_k=\min_{i\notin W_k,\ a_i^Tp_k\gt0}\dfrac{b_i-a_i^Tx_k}{a_i^Tp_k}$; step $=\min\{1,\alpha_k\}$; if $\alpha_k\le1$ add the blocker. If $p_k=0$: solve $g_k+\sum_{W_k}\lambda_ia_i=0$; all $\lambda_i\ge0\Rightarrow$ stop (global min if $Q\succeq0$); else drop the most negative.
Sign conventions differ between the chapters Ch 8 uses $\lambda^T(b-Ax)$ so stationarity is $c=A^T\lambda+\mu$. Ch 9 uses $\lambda^T(Ax-b)$ so stationarity is $Qx-c+A^T\lambda=0$. Use the one the question states; if none is stated, say which you use.