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
Because the reduced row echelon form () is the maximally simplified version of a linear system, it’s easier to comprehend the solution from the than from the original system. The two questions stated above can be answered by a simple analysis of 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 that doesn’t contain a pivot is called a free variable.
In the above, both variables and correspond to a pivot column. Therefore, they’re pivot variables. In contrast, the column corresponding to variable doesn’t have a pivot. Therefore, is a free variable. The getStats
function accepts an augmented matrix and returns the number of the pivot and free variables.
from sympy import *import numpy as npdef getStats(mat):rref, inds = Matrix(mat).rref()numPivots = len(inds) if len(inds) < mat.shape[1] else len(inds)-1numFree = mat.shape[1]-numPivots-1return np.array(rref), numPivots, numFreemat = 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 the answer to this question can be inferred by simply checking the rows of the , as described below.
No-solution
Let’s consider the case when the of an augmented matrix has a pivot in the last column, meaning that it contains a row of the following form:
In such cases, the system has no solution. For instance, consider the following ...