...

/

Solution Set of a Linear System

Solution Set of a Linear System

Learn about the different possible solutions of a linear system and how to interpret them using reduced row echelon form.

Given a system of linear equations, there are two questions we can ask about its solution:

  • Does a solution exist?
  • If a solution exists, is it unique?

Solution set of a linear system and rrefrref

Because the reduced row echelon form (rrefrref) is the maximally simplified version of a linear system, it’s easier to comprehend the solution from the rrefrref than from the original system. The two questions stated above can be answered by a simple analysis of rrefrref of a linear system. However, to perform that analysis, we need to be familiar with a few simple terminologies.

Pivot variables vs. free variables

A variable with a corresponding column that has a pivot is called a pivot variable. In contrast, a variable with a corresponding column in rrefrref that doesn’t contain a pivot is called a free variable.

In the rrefrref above, both variables x1x_1 and x3x_3 correspond to a pivot column. Therefore, they’re pivot variables. In contrast, the column corresponding to variable x2x_2 doesn’t have a pivot. Therefore, x2x_2 is a free variable. The getStats function accepts an augmented matrix and returns the number of the pivot and free variables.

Press + to interact
from sympy import *
import numpy as np
def getStats(mat):
rref, inds = Matrix(mat).rref()
numPivots = len(inds) if len(inds) < mat.shape[1] else len(inds)-1
numFree = mat.shape[1]-numPivots-1
return np.array(rref), numPivots, numFree
mat = np.round(100*np.random.randn(4, 5))
rref_mat, numPivots, numFree = getStats(mat)
print(f'The matrix is \n{mat}')
print("The reduced row echelon form of matrix is :\n", rref_mat)
print(f'The number of pivot variables = {numPivots}')
print(f'The number of free variables = {numFree}')

Does a solution exist?

The first question we ask about the solution set of a linear system is its existence. After converting the linear system to its rrefrref the answer to this question can be inferred by simply checking the rows of the rrefrref, as described below.

No-solution

Let’s consider the case when the rrefrref of an augmented matrix has a pivot in the last column, meaning that it contains a row of the following form:

(001)\left(\begin{array}{ccc|c} 0 & 0 & \cdots & 1 \end{array}\right)

In such cases, the system has no solution. For instance, consider the following rrefrref ...