Skip to main content

Section 6.1 Classification of linear systems

A system of \(m\) linear equations with \(n\) unknowns can be written as \(Ax=b\) where \(A\) is a \(m\times n\) matrix, \(x\) is an unknown column vector with \(n\) coordinates, and \(b\) is a known column vector with \(m\) coordinates. Linear systems are classified by consistency and shape.

A linear system is called consistent if it has at least one solution. Otherwise it is inconsistent. So, in terms of solutions there are three possibilities:

  1. consistent with a unique solution
  2. consistent with infinitely many solutions
  3. inconsistent

These possibilities are easy to visualize in terms of 2×2 systems:

\begin{align*} a_{11}x_1 + a_{12}x_2 \amp = b_1\\ a_{21}x_1 + a_{22}x_2 \amp = b_2 \end{align*}

Each of these equations determines a line in the plane. In Case 1 the two lines intersect; in Case 2 they are the same line; in Case 3 they are parallel.

In terms of shape, a linear system is square if it has as many equations as unknowns, \(m = n\text{.}\) It is called underdetermined there are fewer equations than variables: \(m \lt n\text{,}\) matrix has more columns than rows. A system is overdetermined if it has more equations than variables: \(m \gt n\text{,}\) matrix has more rows than columns.

The three shapes do not exactly correspond to the three classes based on consistency. But if you pick a matrix at random (like using rand), you will find that overdetermined systems are usually inconsistent, underdetermined systems are usually consistent with infinite solutions, and square systems are usually consistent with a unique solution.

The consistency can be analyzed in terms of the rank of a matrix. By definition, a matrix has rank \(r\) if it has \(r\) linearly independent columns, and all other columns are their linear combinations. One can replace “columns” by “rows” in the previous sentence. One can compute the rank with rank in Matlab. Also, the Matlab formula [A b] forms the augmented matrix of the system \(Ax=b\text{,}\) which has an extra column with the entries of \(b\text{.}\)

Use an if-elseif-else statement with rank to determine the consistency and the number of solutions of the system with matrix

\begin{equation*} A = \begin{pmatrix} 1 \amp 2\amp 3 \\ 4 \amp 5 \amp 6\\ 7\amp 8 \amp 9 \end{pmatrix} \end{equation*}

and with

\begin{equation*} b = \begin{pmatrix} 10 \\ 11 \\ 12\end{pmatrix} \end{equation*}
Answer
m = 3;
n = 3;
A = [1 2 3; 4 5 6; 7 8 9];
b = [10 11 12]';
if rank(A) < rank([A b])
    disp('Inconsistent')
elseif rank(A) == n
    disp('Consistent with a unique solution')
else 
    disp('Consistent with infinitely many solutions')
end