Back

Certifying infeasibility

A well known result in linear algebra states that a system of linear equations \(\mathbf{A}\mathbf{x} = \mathbf{b}\) (where \(\mathbf{A} \in \mathbb{R}^{m\times n}\), \(\mathbf{b}\in \mathbb{R}^m\), and \(\mathbf{x} = \begin{bmatrix} x_1\\ \vdots \\ x_n\end{bmatrix}\) is a tuple of variables) has no solution if and only if there exists \(\mathbf{y} \in \mathbb{R}^m\) such that \(\mathbf{y}^\mathsf{T}\mathbf{A} = \mathbf{0}\) and \(\mathbf{y}^\mathsf{T} \mathbf{b} \neq 0\).

It is easily seen that if such a \(\mathbf{y}\) exists, then the system \(\mathbf{A}\mathbf{x} = \mathbf{b}\) cannot have a solution. (Simply multiply both sides of \(\mathbf{A}\mathbf{x} = \mathbf{b}\) on the left by \(\mathbf{y}^\mathsf{T}\).) However, proving the converse requires a bit of work. A standard elementary proof involves using Gauss-Jordan elimination to reduce the original system to an equivalent system \(\mathbf{R}\mathbf{x} = \mathbf{d}\) such that \(\mathbf{R}\) has a row of zero, say in row \(i\), with \(d_i \neq 0\). The process can be captured by a square matrix \(\mathbf{M}\) satisfying \(\mathbf{M}\mathbf{A} = \mathbf{R}\). We can then take \(\mathbf{y}^\mathsf{T}\) to be the \(i\)th row of \(\mathbf{M}\).

An analogous result holds for systems of linear inequalities. The following result is one of the many variants of Farkas' Lemma:

Theorem 2.1. With \(\mathbf{A}\), \(\mathbf{x}\), and \(\mathbf{b}\) as above, the system \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\) has no solution if and only if there exists \(\mathbf{y} \in \mathbb{R}^m\) such that \[\mathbf{y} \geq \mathbf{0},~\mathbf{y}^\mathsf{T} \mathbf{A} = \mathbf{0},~ \mathbf{y}^\mathsf{T}\mathbf{b} \gt 0.\]

In other words, the system \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\) has no solution if and only if one can infer the inequality \(0 \geq \gamma\) for some \(\gamma \gt 0\) by taking a nonnegative linear combination of the inequalities.

This result essentially says that there is always a certificate (the \(m\)-tuple \(\mathbf{y}\) with the prescribed properties) for the infeasibility of the system \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\). This allows third parties to verify the claim of infeasibility without having to solve the system from scratch.

Example. For the system \begin{eqnarray*} 2x - y + z \geq 2 \\ -x + y - z \geq 0 \\ - y + z \geq 0, \end{eqnarray*} adding two times the second inequality and the third inequality to the first inequality gives \(0 \geq 2\). Hence, \(\mathbf{y} = \begin{bmatrix} 1\\ 2 \\ 1\end{bmatrix}\) is a certificate of infeasibility.

We now give a proof of the lemma above.

Proof of Theorem 2.1. It is easy to see that if such a \(\mathbf{y}\) exists, then the system \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\) has no solution.

Conversely, suppose that the system \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\) has no solution. It suffices to show that we can infer the inequality \(0 \geq \alpha\) for some postive \(\alpha\) by taking nonnegative linear combination of the inequalities in the system \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\). If the system already contains an inequality \(0 \geq \alpha\) for some positive \(\alpha\), then we are done. Otherwise, we show by induction on \(n\) that we can infer such an inequality.

Base case: The system \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\) has only one variable.

For the system to have no solution, there must exist two inequalites \(ax_1 \geq t\) and \(-a'x_1 \geq t'\) such that \(a, a' \gt 0\) and \(\frac{t}{a} \gt \frac{-t'}{a'}\). Adding \(\frac{1}{a}\) times the inequality \(ax_1 \geq t\) and \(\frac{1}{a'}\) times the inequality \(-a'x_1 \geq t'\) gives the inequality \(0 \geq \frac{t}{a} + \frac{t'}{a'}\) with a positive right-hand side. This establishes the base case.

Induction hypothesis: Let \(n \geq 2\) be an integer. Assume that given any system of linear inequalities \(\mathbf{A}'\mathbf{x} \geq \mathbf{b}'\) in \(n-1\) variables having no solution, one can infer the inequality \(0 \geq \alpha'\) for some positive \(\alpha'\) by taking a nonnegative linear combination of the inequalities in the system \(\mathbf{A}'\mathbf{x} \geq \mathbf{b}'\).

Apply Fourier-Motzkin elimination to eliminate \(x_n\) from \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\) to obtain the system \(\mathbf{A}'\mathbf{x} \geq \mathbf{b}'\). As \(\mathbf{A}\mathbf{x}\geq \mathbf{b}\) has no solution, \(\mathbf{A}'\mathbf{x} \geq \mathbf{b}'\) also has no solution.

By the induction hypothesis, one can infer the inequality \(0 \geq \alpha\) for some positive \(\alpha\) by taking a nonnegative linear combination of the inequalities in \(\mathbf{A}'\mathbf{x} \geq \mathbf{b}'\). However, each inequality in \(\mathbf{A}'\mathbf{x} \geq \mathbf{b}'\) can be obtained from a nonnegative linear combination of the inequalites in \(\mathbf{A}\mathbf{x} \geq \mathbf{b}\). Hence, one can infer the inequality \(0 \geq \alpha\) by taking a nonnegative linear combination of nonnegative linear cominbations of the inequalities in \(\mathbf{A}\mathbf{x}\geq \mathbf{b}\). Since a nonnegative linear combination of nonnegative linear cominbations of the inequalities in \(\mathbf{A}\mathbf{x}\geq \mathbf{b}\) is simply a nonnegative linear combination of the inequalities in \(\mathbf{A}\mathbf{x}\geq \mathbf{b}\), the result follows.

Remark. Notice that in the proof above, if \(\mathbf{A}\) and \(\mathbf{b}\) have only rational entries, then we can take \(\mathbf{y}\) to have only rational entries as well.

Corollary 2.2. Let \(\mathbf{A} \in \mathbb{R}^{m\times n}\) and let \(\mathbf{b} \in \mathbb{R}^m\). Prove that \begin{eqnarray*} \mathbf{A}\mathbf{x} = \mathbf{b} \\ \mathbf{x} \geq \mathbf{0} \end{eqnarray*} has no solution if and only if there exists \(\mathbf{y} \in \mathbb{R}^m\) such that \(\mathbf{y}^\mathsf{T} \mathbf{A} \geq \mathbf{0}\) and \(\mathbf{y}^\mathsf{T}\mathbf{b} \lt 0\). Furthermore, if \(\mathbf{A}\) and \(\mathbf{b}\) are rational, \(\mathbf{y}\) can be taken to be rational.

Worked examples

  1. You are given that the following system has no solution. \begin{eqnarray*} x_1 + x_2 + 2x_3& \geq & 1 \\ -x_1 + x_2 + x_3 & \geq & 2 \\ x_1-x_2 + x_3 & \geq & 1 \\ -x_2 - 3x_3 & \geq & 0. \end{eqnarray*} Obtain a certificate of infeasibility for the system.

  2. Prove Corollary 2.2.

  3. Let \(\mathbf{A} \in \mathbb{R}^{m\times n}\) and let \(\mathbf{b} \in \mathbb{R}^m\). Prove that \begin{align*} \mathbf{A}\mathbf{x} & \geq \mathbf{b} \\ \mathbf{x} & \geq \mathbf{0} \end{align*} has no solution if and only if there exists \(\mathbf{y} \in \mathbb{R}^m\) such that \(\mathbf{y} \geq \mathbf{0},~\mathbf{y}^\mathsf{T} \mathbf{A} \leq \mathbf{0}\) and \(\mathbf{y}^\mathsf{T}\mathbf{b} \gt 0\).