Tutorials › Linear Algebra › Ill-Conditioning in Nearly Dependent Systems

LU Factorization and Numerical Considerations · Tutorial 922 of 1000

Ill-Conditioning in Nearly Dependent Systems

See how nearly dependent rows or columns can make a small change in the right-hand side produce a much larger change in the solution.

Intermediate 10 min read

What You'll Learn

  • Recognize nearly dependent rows and columns in a small system
  • Compute infinity-norm condition numbers for exact examples
  • Check how right-hand-side perturbations change solutions
  • Prove a lower bound linking near dependence to conditioning
  • Distinguish a sensitive system from a well-conditioned one

When a Small Data Change Matters

A linear system can have a unique solution and still be difficult to solve reliably. The issue is sensitivity: if a small change in the data produces a much larger change in the solution, then the system is ill-conditioned. This often happens when rows or columns are nearly dependent. Nearly dependent rows make two equations almost redundant; nearly dependent columns make two directions in the output almost indistinguishable. In either case, recovering the solution may require magnifying a small difference in the data.

We will use the infinity norm to make these comparisons exact. For a vector \(\mathbf{x}\in\mathbb{R}^n\), \(\|\mathbf{x}\|_{\infty}\) is the largest absolute value of its entries. For a matrix \(\mathbf{A}\), the induced infinity norm is the largest absolute row sum. For a nonsingular square matrix, its infinity-norm condition number is the product of the norms of the matrix and its inverse.

Definition: If \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is nonsingular, its infinity-norm condition number is \(\kappa_{\infty}(\mathbf{A})=\|\mathbf{A}\|_{\infty}\|\mathbf{A}^{-1}\|_{\infty}\). A large condition number indicates that relative changes in the right-hand side can, in the worst case, produce much larger relative changes in the solution. The condition number is at least \(1\), since \(\|\mathbf{I}_n\|_{\infty}=\|\mathbf{A}\mathbf{A}^{-1}\|_{\infty}\leq\|\mathbf{A}\|_{\infty}\|\mathbf{A}^{-1}\|_{\infty}\).

Here, “nearly dependent” means that one row or column is close to a multiple or combination of others, so the corresponding difference is small. It does not mean that the system is singular: the systems below have unique solutions for every positive parameter. As the parameter gets smaller, however, the small difference that distinguishes the equations or columns becomes increasingly important.

Nearly Equal Rows and a Sensitive Solution

Worked Example: Two Nearly Dependent Rows

For \(\varepsilon>0\), consider \(\mathbf{A}_{\varepsilon}=\begin{bmatrix}1&1\\1&1+\varepsilon\end{bmatrix}\). Its second row differs from the first by \((0,\varepsilon)\), so the rows are nearly equal when \(\varepsilon\) is small. The matrix is nonsingular for \(\varepsilon>0\), as the inverse computed below confirms.

Solving the two-by-two inverse formula, or multiplying the proposed inverse by the matrix, gives

$$ \mathbf{A}_{\varepsilon}^{-1} =\frac{1}{\varepsilon} \begin{bmatrix}1+\varepsilon&-1\\-1&1\end{bmatrix}. $$

For \(\varepsilon=\tfrac{1}{100}\), the matrix and inverse are

$$ \mathbf{A}_{\varepsilon} =\begin{bmatrix}1&1\\1&\tfrac{101}{100}\end{bmatrix}, \qquad \mathbf{A}_{\varepsilon}^{-1} =\begin{bmatrix}101&-100\\-100&100\end{bmatrix}. $$

The absolute row sums of \(\mathbf{A}_{\varepsilon}\) are \(2\) and \(\tfrac{201}{100}\), so \(\|\mathbf{A}_{\varepsilon}\|_{\infty}=\tfrac{201}{100}\). The first row of the inverse has absolute row sum \(101+100=201\); the second row has absolute row sum \(100+100=200\). Therefore \(\|\mathbf{A}_{\varepsilon}^{-1}\|_{\infty}=201\), and

$$ \kappa_{\infty}(\mathbf{A}_{\varepsilon}) =\frac{201}{100}\cdot 201 =\frac{40401}{100}. $$

Now solve \(\mathbf{A}_{\varepsilon}\mathbf{x}=\mathbf{b}\) for \(\mathbf{b}=(2,2)^{\top}\). Subtracting the first equation from the second gives \(\tfrac{1}{100}x_2=0\), hence \(x_2=0\) and \(x_1=2\). Check: \(\begin{bmatrix}1&1\\1&\tfrac{101}{100}\end{bmatrix}\begin{bmatrix}2\\0\end{bmatrix}=\begin{bmatrix}2\\2\end{bmatrix}\).

Change only the second entry of the right-hand side by \(\tfrac{1}{1000}\), giving \(\widetilde{\mathbf{b}}=(2,\tfrac{2001}{1000})^{\top}\). Subtracting the first equation from the second now gives \(\tfrac{1}{100}x_2=\tfrac{1}{1000}\), so \(x_2=\tfrac{1}{10}\). The first equation then gives \(x_1=\tfrac{19}{10}\). Check: the first output entry is \(\tfrac{19}{10}+\tfrac{1}{10}=2\); the second is \(\tfrac{19}{10}+\tfrac{101}{100}\cdot\tfrac{1}{10}=\tfrac{190}{100}+\tfrac{101}{1000}=\tfrac{2001}{1000}\).

The right-hand-side change has relative infinity norm \(\tfrac{1/1000}{2}=\tfrac{1}{2000}\). The solution changes by \((-\tfrac{1}{10},\tfrac{1}{10})^{\top}\), whose infinity norm relative to the original solution is \(\tfrac{1/10}{2}=\tfrac{1}{20}\). The relative solution change is \(100\) times the relative data change.

Why Near Dependence Signals Ill-Conditioning

The example’s subtraction step exposes the mechanism: the equations determine \(x_2\) through a coefficient of only \(\varepsilon\). A small change in the difference between the right-hand sides is divided by \(\varepsilon\). A corresponding effect occurs when two columns are close: a small output difference can require a large change in the coefficients of those columns.

Proposition: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) be nonsingular and let \(\mathbf{c}\ne\mathbf{0}\). Then \[ \|\mathbf{A}^{-1}\|_{\infty}\geq \frac{\|\mathbf{c}\|_{\infty}}{\|\mathbf{A}\mathbf{c}\|_{\infty}}, \qquad \kappa_{\infty}(\mathbf{A})\geq \frac{\|\mathbf{A}\|_{\infty}\|\mathbf{c}\|_{\infty}}{\|\mathbf{A}\mathbf{c}\|_{\infty}}. \] Thus, if \(\mathbf{A}\mathbf{c}\) is small compared with \(\mathbf{c}\), the condition number must be large.

Proof. Since \(\mathbf{A}\) is nonsingular and \(\mathbf{c}\ne\mathbf{0}\), the vector \(\mathbf{A}\mathbf{c}\ne\mathbf{0}\). Also, \(\mathbf{A}^{-1}(\mathbf{A}\mathbf{c})=\mathbf{c}\). By the defining bound for an induced matrix norm, \(\|\mathbf{A}^{-1}(\mathbf{A}\mathbf{c})\|_{\infty}\leq\|\mathbf{A}^{-1}\|_{\infty}\|\mathbf{A}\mathbf{c}\|_{\infty}\). The left side is \(\|\mathbf{c}\|_{\infty}\); dividing by the positive number \(\|\mathbf{A}\mathbf{c}\|_{\infty}\) proves the first inequality. Multiplying it by \(\|\mathbf{A}\|_{\infty}\) proves the second. \(\square\)

For a matrix whose columns are nearly dependent, choose coefficients \(\mathbf{c}\) that nearly cancel the columns. Then \(\mathbf{A}\mathbf{c}\) is small even though \(\mathbf{c}\) is not, and the proposition forces a large condition number. The same logic applies when rows are nearly dependent: the inverse can become large, as the explicit row-sum calculation in the example shows.

Worked Example: Nearly Dependent Columns

Consider \(\mathbf{B}_{\varepsilon}=\begin{bmatrix}1&1\\0&\varepsilon\end{bmatrix}\). Its columns are \(\mathbf{b}_1=(1,0)^{\top}\) and \(\mathbf{b}_2=(1,\varepsilon)^{\top}\), which are close when \(\varepsilon\) is small. For \(\varepsilon=\tfrac{1}{100}\),

$$ \mathbf{B}_{\varepsilon} =\begin{bmatrix}1&1\\0&\tfrac{1}{100}\end{bmatrix}, \qquad \mathbf{B}_{\varepsilon}^{-1} =\begin{bmatrix}1&-100\\0&100\end{bmatrix}. $$

Multiplying to check the inverse gives \(\begin{bmatrix}1&1\\0&\tfrac{1}{100}\end{bmatrix}\begin{bmatrix}1&-100\\0&100\end{bmatrix} =\begin{bmatrix}1&0\\0&1\end{bmatrix}\). The absolute row sums of \(\mathbf{B}_{\varepsilon}\) are \(2\) and \(\tfrac{1}{100}\), so its infinity norm is \(2\). The inverse’s row sums are \(101\) and \(100\), so its infinity norm is \(101\). Therefore \(\kappa_{\infty}(\mathbf{B}_{\varepsilon})=202\).

Use \(\mathbf{b}=(2,0)^{\top}\). The solution is \(\mathbf{x}=(2,0)^{\top}\), since \(\mathbf{B}_{\varepsilon}\mathbf{x}=(2,0)^{\top}\). Perturb the right-hand side to \(\widetilde{\mathbf{b}}=(2,\tfrac{1}{1000})^{\top}\). The second equation gives \(\tfrac{1}{100}x_2=\tfrac{1}{1000}\), so \(x_2=\tfrac{1}{10}\); the first gives \(x_1=\tfrac{19}{10}\). Check: \(\tfrac{19}{10}+\tfrac{1}{10}=2\) and \(\tfrac{1}{100}\cdot\tfrac{1}{10}=\tfrac{1}{1000}\). As in the row example, the relative data change is \(\tfrac{1}{2000}\), while the relative solution change is \(\tfrac{1}{20}\), a factor of \(100\).

The proposition gives a direct explanation. With \(\mathbf{c}=(1,-1)^{\top}\), \(\|\mathbf{c}\|_{\infty}=1\), while \(\mathbf{B}_{\varepsilon}\mathbf{c}=(0,-\tfrac{1}{100})^{\top}\), whose infinity norm is \(\tfrac{1}{100}\). The columns nearly cancel, so the inverse must be large.

Comparing with a Well-Conditioned System

A large condition number is a worst-case sensitivity measure, not a prediction that every perturbation will be amplified by exactly that amount. The following comparison uses the same right-hand side and perturbation as before, but an identity matrix. It separates sensitivity caused by the system from the size of the data change itself.

Worked Example: The Same Perturbation with the Identity Matrix

Let \(\mathbf{C}=\mathbf{I}_2\). Then \(\|\mathbf{C}\|_{\infty}=1\), \(\mathbf{C}^{-1}=\mathbf{I}_2\), and \(\kappa_{\infty}(\mathbf{C})=1\). For \(\mathbf{b}=(2,2)^{\top}\), the solution is \(\mathbf{x}=(2,2)^{\top}\). Change the right-hand side to \(\widetilde{\mathbf{b}}=(2,\tfrac{2001}{1000})^{\top}\); the new solution is \(\widetilde{\mathbf{x}}=(2,\tfrac{2001}{1000})^{\top}\), since multiplication by the identity leaves a vector unchanged.

Check: \(\mathbf{C}\mathbf{x}=(2,2)^{\top}\) and \(\mathbf{C}\widetilde{\mathbf{x}}=(2,\tfrac{2001}{1000})^{\top}\). Both the relative data change and the relative solution change equal \(\tfrac{1}{2000}\), so the perturbation is not amplified. In contrast, the nearly dependent examples transformed a relative data change of \(\tfrac{1}{2000}\) into a relative solution change of \(\tfrac{1}{20}\).

Result (right-hand-side sensitivity): Suppose \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is nonsingular, \(\mathbf{b}\ne\mathbf{0}\), \(\mathbf{x}=\mathbf{A}^{-1}\mathbf{b}\), and \(\widetilde{\mathbf{b}}=\mathbf{b}+\delta\mathbf{b}\) has solution \(\widetilde{\mathbf{x}}=\mathbf{A}^{-1}\widetilde{\mathbf{b}}\). Then \[ \frac{\|\widetilde{\mathbf{x}}-\mathbf{x}\|_{\infty}}{\|\mathbf{x}\|_{\infty}} \leq \kappa_{\infty}(\mathbf{A}) \frac{\|\delta\mathbf{b}\|_{\infty}}{\|\mathbf{b}\|_{\infty}}. \]

Proof. Subtract the two equations \(\mathbf{A}\widetilde{\mathbf{x}}=\widetilde{\mathbf{b}}\) and \(\mathbf{A}\mathbf{x}=\mathbf{b}\). This gives \(\mathbf{A}(\widetilde{\mathbf{x}}-\mathbf{x})=\delta\mathbf{b}\), so \(\widetilde{\mathbf{x}}-\mathbf{x}=\mathbf{A}^{-1}\delta\mathbf{b}\). The induced norm bound yields \(\|\widetilde{\mathbf{x}}-\mathbf{x}\|_{\infty}\leq\|\mathbf{A}^{-1}\|_{\infty}\|\delta\mathbf{b}\|_{\infty}\). Also, \(\mathbf{b}=\mathbf{A}\mathbf{x}\), hence \(\|\mathbf{b}\|_{\infty}\leq\|\mathbf{A}\|_{\infty}\|\mathbf{x}\|_{\infty}\). Since \(\mathbf{b}\ne\mathbf{0}\) and \(\mathbf{A}\) is nonsingular, \(\mathbf{x}\ne\mathbf{0}\); divide the first bound by \(\|\mathbf{x}\|_{\infty}\), and use the second bound to obtain the stated inequality. \(\square\)

This result is an upper bound: it says the relative solution change cannot exceed the condition number times the relative right-hand-side change. It need not be attained for a particular perturbation. The exact examples show one direction of sensitivity for which the change is substantial, while the identity example shows that the same data change can have little effect in a well-conditioned system.

Common Pitfalls

Do not confuse a small parameter with a zero parameter. If \(\varepsilon=0\), the rows of \(\mathbf{A}_{\varepsilon}\) coincide and the matrix is singular, so the inverse and condition number are not defined. For \(\varepsilon>0\), the system has a unique solution, but its condition number grows as the row difference shrinks.

Check each row sum before taking a matrix infinity norm. For the inverse in the first example, the first absolute row sum is \(201\), while the second is \(200\). A tempting but incorrect calculation is to assign \(201\) to both rows, perhaps by using the first row’s sum twice. The correction is to calculate each row separately: the norm is still \(201\), because it is the maximum of \(201\) and \(200\), not because the two sums agree. Likewise, for general \(\varepsilon>0\), the first inverse row sum is \(\tfrac{2+\varepsilon}{\varepsilon}\), and the second is \(\tfrac{2}{\varepsilon}\); the maximum is the first.

A large condition number does not mean every change is amplified by that factor. The condition number bounds worst-case relative sensitivity. A particular perturbation may have a smaller effect; calculate the changed solution or apply the bound with the actual perturbation rather than treating the bound as an equality.

Nearly dependent systems matter whenever equations encode almost the same constraint or columns encode almost the same direction. The solution may be mathematically unique, but small uncertainty in the data can then lead to substantial uncertainty in the answer. Checking row or column relationships and comparing condition numbers helps distinguish uniqueness from practical stability.

Check Your Understanding

Use the infinity norm and show enough work to justify each conclusion.

  1. For \(\mathbf{A}_{\varepsilon}=\begin{bmatrix}1&1\\1&1+\varepsilon\end{bmatrix}\), explain why subtracting the first equation from the second makes the solution sensitive when \(\varepsilon\) is small.
  2. For \(\mathbf{B}=\begin{bmatrix}1&1\\0&\tfrac{1}{10}\end{bmatrix}\), calculate \(\|\mathbf{B}\|_{\infty}\), \(\|\mathbf{B}^{-1}\|_{\infty}\), and \(\kappa_{\infty}(\mathbf{B})\).
  3. For the columns of \(\mathbf{B}_{\varepsilon}\) in the worked example, choose a nonzero coefficient vector that nearly cancels them and compute the resulting product.
  4. If a nonsingular system has condition number \(50\) and the relative right-hand-side change is at most \(\tfrac{1}{1000}\), what upper bound does the sensitivity result give for the relative solution change?
  5. Why is the condition number undefined for \(\mathbf{A}_{0}\), even though the formula for \(\mathbf{A}_{\varepsilon}\) still gives a matrix when \(\varepsilon=0\)?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon