Section 4.2 Linear Systems as Matrix and Linear Combination Equations
Exploration 4.2.1.
Consider the linear system
\begin{equation*}
\begin{array}{ccccccccc}
3x_1 \amp - \amp 2x_2\amp +\amp 4x_3\amp +\amp x_4\amp = \amp 5 \\
-x_1\amp \amp \amp +\amp 5x_3\amp -\amp 2x_4\amp =\amp 1\\
2x_1\amp +\amp x_2\amp -\amp x_3\amp +\amp 3x_4\amp =\amp -4
\end{array}
\end{equation*}
Let’s construct the coefficient matrix \(A\) and multiply it by \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\\x_3\\x_4\end{bmatrix}\) on the right:
\begin{equation*}
A\mathbf{x}=\begin{bmatrix}3\amp -2\amp 4\amp 1\\-1\amp 0\amp 5\amp -2\\2\amp 1\amp -1\amp 3\end{bmatrix}\begin{bmatrix}x_1\\x_2\\x_3\\x_4\end{bmatrix}=\begin{bmatrix}3x_1-2x_2+4x_3+x_4\\-x_1+5x_3-2x_4\\2x_1+x_2-x_3+3x_4\end{bmatrix}.
\end{equation*}
Observe that each component of the product vector corresponds to one of the equations in the system. Let \(\mathbf{b}=\begin{bmatrix}5\\1\\-4\end{bmatrix}\text{.}\) Then
\begin{equation*}
A\mathbf{x}=\mathbf{b},
\end{equation*}
\begin{equation*}
\begin{bmatrix}3\amp -2\amp 4\amp 1\\-1\amp 0\amp 5\amp -2\\2\amp 1\amp -1\amp 3\end{bmatrix}\begin{bmatrix}x_1\\x_2\\x_3\\x_4\end{bmatrix}=\begin{bmatrix}5\\1\\-4\end{bmatrix}.
\end{equation*}
is a matrix equation that corresponds to our system of equations.
In general, a system of linear equations
\begin{equation*}
\begin{array}{ccccccccc}
a_{11}x_1 \amp + \amp a_{12}x_2\amp +\amp \ldots\amp +\amp a_{1n}x_n\amp = \amp b_1 \\
a_{21}x_1 \amp + \amp a_{22}x_2\amp +\amp \ldots\amp +\amp a_{2n}x_n\amp = \amp b_2 \\
\amp \amp \amp \amp \vdots\amp \amp \amp \amp \\
a_{m1}x_1 \amp + \amp a_{m2}x_2\amp +\amp \ldots\amp +\amp a_{mn}x_n\amp = \amp b_m
\end{array}
\end{equation*}
can be written as a matrix equation as follows:
\begin{equation*}
\begin{bmatrix}
a_{11} \amp a_{12}\amp \dots\amp a_{1n}\\
a_{21}\amp a_{22} \amp \dots \amp a_{2n}\\
\vdots \amp \vdots\amp \ddots \amp \vdots\\
a_{m1}\amp \dots \amp \dots \amp a_{mn}
\end{bmatrix}
\begin{bmatrix}
x_1\\
x_2\\
\vdots \\
x_n
\end{bmatrix} = \begin{bmatrix}
b_1\\
b_2\\
\vdots \\
b_m
\end{bmatrix}
\end{equation*}
Solving this matrix equation (or showing that a solution does not exist) amounts to finding the reduced row-echelon form of the augmented matrix
\begin{equation*}
\left[\begin{array}{cccc|c}
a_{11} \amp a_{12}\amp \dots\amp a_{1n}\amp b_1\\
a_{21}\amp a_{22} \amp \dots \amp a_{2n}\amp b_2\\
\vdots \amp \vdots\amp \ddots \amp \vdots\amp \vdots\\
a_{m1}\amp \dots \amp \dots \amp a_{mn}\amp b_m
\end{array}\right]
\end{equation*}
Being able to use matrices to rewrite and solve systems of equations is crucial, so here are two examples to get you into this mindset.
Example 4.2.1.
Given a linear system
\begin{align*}
x\amp +\amp 2y\amp =\amp 0 \\
-x \amp +\amp y\amp = \amp -3 \\
\amp \amp y\amp =\amp -1 \\
x\amp \amp \amp =\amp 2
\end{align*}
Write the system as a matrix equation
Solve the system and the matrix equation
Answer.
The matrix equation
Item 1 that corresponds to the system is
\begin{equation*}
\begin{bmatrix}1\amp 2\\-1\amp 1\\0\amp 1\\1\amp 0\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}0\\-3\\-1\\2\end{bmatrix}
\end{equation*}
The augmented matrix
Item 2 that corresponds to the original system and its reduced row-echelon form are
\begin{equation*}
\left[\begin{array}{cc|c}
1\amp 2\amp 0\\-1\amp 1\amp -3\\0\amp 1\amp -1\\1\amp 0\amp 2
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{cc|c}
1\amp 0\amp 2\\0\amp 1\amp -1\\0\amp 0\amp 0\\0\amp 0\amp 0
\end{array}\right]
\end{equation*}
This shows that the ordered pair
\((2, -1)\) is a solution to the system. We conclude that
\(\mathbf{x}=\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}2\\-1\end{bmatrix}\) is a solution to the matrix equation in
Item 1. A quick verification confirms this
\begin{equation*}
\begin{bmatrix}1\amp 2\\-1\amp 1\\0\amp 1\\1\amp 0\end{bmatrix}\begin{bmatrix}2\\-1\end{bmatrix}=\begin{bmatrix}0\\-3\\-1\\2\end{bmatrix}
\end{equation*}
Example 4.2.2.
Let
\begin{equation*}
A=\begin{bmatrix}2\amp 1\amp -1\amp 2\\1\amp 1\amp 0\amp 3\end{bmatrix}\quad\text{and}\quad\mathbf{b}=\begin{bmatrix}0\\-2\end{bmatrix}
\end{equation*}
Solve \(A\mathbf{x}=\mathbf{b}\text{.}\)
Answer.
We write the equation \(A\mathbf{x}=\mathbf{b}\) in augmented matrix form and apply elementary row operations to find its reduced row-echelon form.
\begin{equation*}
\left[\begin{array}{cccc|c}
2\amp 1\amp -1\amp 2\amp 0\\1\amp 1\amp 0\amp 3\amp -2
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{cccc|c}
1\amp 0\amp -1\amp -1\amp 2\\0\amp 1\amp 1\amp 4\amp -4
\end{array}\right]
\end{equation*}
One way to obtain a solution is to convert this to a system of equations. It is not necessary to write the system down, but it helps to think about it as you write out your solution vector.
\begin{align*}
\end{align*}
We see that \(x_1\) and \(x_2\) are leading variables because they correspond to leading 1s in the reduced row-echelon form , while \(x_3\) and \(x_4\) are free variables. We start by assigning parameters \(s\) and \(t\) to \(x_3\) and \(x_4\text{,}\) respectively, then solve for \(x_1\) and \(x_2\text{.}\)
\begin{align*}
x_1\amp =2+s+t \\
x_2\amp =-4-s-4t \\
x_3\amp =s \\
x_4\amp =t
\end{align*}
We can now write the solution vector as follows
\begin{equation}
\mathbf{x}=\begin{bmatrix}2+s+t\\-4-s-4t\\s\\t\end{bmatrix}=\begin{bmatrix}2\\-4\\0\\0\end{bmatrix}+\begin{bmatrix}1\\-1\\1\\0\end{bmatrix}s+\begin{bmatrix}1\\-4\\0\\1\end{bmatrix}t\tag{4.2.1}
\end{equation}
The solution given in
(4.2.1) is an example of a
general solution because it accounts for all of the solutions to the system. Letting
\(s\) and
\(t\) take on specific values produces
particular solutions. For example,
\([2\\-1\\1\\-1]\) is a particular solution that corresponds to
\(s=1\text{,}\) \(t=-1\text{.}\)
Subsection 4.2.1 Singular and Nonsingular Matrices
Our examples so far involved non-square matrices. Square matrices, however, play a very important role in linear algebra. This section will focus on square matrices. We start the paragraph with an example to motivate.
Example 4.2.3.
Let
\begin{equation*}
A=\begin{bmatrix}3\amp -1\amp 1\\0\amp 1\amp 2\\1\amp 2\amp 2\end{bmatrix}\quad\text{and}\quad\mathbf{b}=\begin{bmatrix}2\\1\\0\end{bmatrix}.
\end{equation*}
Solve \(A\mathbf{x}=\mathbf{b}\text{.}\)
Answer.
We apply elementary row operations to bring the augmented matrix to its reduced row-echelon form.
\begin{equation*}
\left[\begin{array}{ccc|c}
3\amp -1\amp 1\amp 2\\0\amp 1\amp 2\amp 1\\1\amp 2\amp 2\amp 0
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{ccc|c}
1\amp 0\amp 0\amp 0\\0\amp 1\amp 0\amp -1\\0\amp 0\amp 1\amp 1
\end{array}\right].
\end{equation*}
We can immediately see that the solution vector is
\begin{equation*}
\mathbf{x}=\begin{bmatrix}0\\-1\\1\end{bmatrix}.
\end{equation*}
Observe that the left-hand side of the augmented matrix in
Example 4.2.3 is the identity matrix
\(I\text{.}\) This means that
\(\mbox{rref}(A)=I\text{.}\)
The elementary row operations that carried \(A\) to \(I\) were not dependent on the vector \(\mathbf{b}\text{.}\) In fact, the same row reduction process can be applied to the matrix equation \(A\mathbf{x}=\mathbf{b}\) for any vector \(\mathbf{b}\) to obtain a unique solution.
\begin{equation*}
\left[\begin{array}{ccc|c}
3\amp -1\amp 1\amp a\\0\amp 1\amp 2\amp b\\1\amp 2\amp 2\amp c
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{ccc|c}
1\amp 0\amp 0\amp a^*\\0\amp 1\amp 0\amp b^*\\0\amp 0\amp 1\amp c^*
\end{array}\right]
\end{equation*}
\begin{equation*}
\mathbf{x}=\begin{bmatrix}a^*\\b^*\\c^*\end{bmatrix}
\end{equation*}
Given a matrix \(A\) such that \(\mbox{rref}(A)=I\text{,}\) the system \(A\mathbf{x}=\mathbf{b}\) will never be inconsistent because we will never have a row like this: \(\left[\begin{array}{cccc|c}
0\amp 0\amp \ldots\amp 0\amp 1
\end{array}\right]\text{.}\) Neither will we have infinitely many solutions because there will never be free variables. Matrices such as \(A\) deserve special attention.
Definition 4.2.4.
A square matrix \(A\) is said to be nonsingular provided that \(\mbox{rref}(A)=I\text{.}\) Otherwise we say that \(A\) is singular.
Non-singular matrices have many useful properties.
Theorem 4.2.5.
The following statements are equivalent for an \(n\times n\) matrix \(A\text{.}\)
\(A\) is nonsingular
\(A\mathbf{x}=\mathbf{b}\) has a unique solution for any \(\mathbf{b}\) in \(\R^n\)
\(A\mathbf{x}=\mathbf{0}\) has only the trivial solution \(\mathbf{x}=\mathbf{0}\)
Proof.
We will prove equivalence of the three statements by showing that
Item 1\(\Rightarrow\)Item 2\(\Rightarrow\)Item 3\(\Rightarrow\)Item 1
[Proof of
Item 1\(\Rightarrow\)Item 2]: Suppose
\(\mbox{rref}(A)=I\text{.}\) Given any vector
\(\mathbf{b}\) in
\(\R^n\text{,}\) the augmented matrix
\([A|\mathbf{b}]\) can be carried to its reduced row-echelon form
\([I|\mathbf{b}^*]\text{.}\) Uniqueness of the reduced row-echelon form guarantees that
\(\mathbf{b}^*\) is the unique solution of
\(A\mathbf{x}=\mathbf{b}\text{.}\)
[Proof of
Item 2\(\Rightarrow\)Item 3]: Suppose
\(A\mathbf{x}=\mathbf{b}\) has a unique solution for all vectors
\(\mathbf{b}\text{.}\) Then
\(A\mathbf{x}=\mathbf{0}\) has a unique solution. But
\(\mathbf{x}=\mathbf{0}\) is always a solution to
\(A\mathbf{x}=\mathbf{0}\text{.}\) Therefore
\(\mathbf{x}=\mathbf{0}\) is the only solution.
[Proof of
Item 3\(\Rightarrow\)Item 1]: Suppose
\(A\mathbf{x}=\mathbf{0}\) has only the trivial solution. This means that
\(x_1=0, x_2=0,\dots ,x_n=0\) is the only solution of
\(A\mathbf{x}=\mathbf{0}\text{.}\) But then, we know that the augmented matrix
\([A|\mathbf{0}]\) can be reduced to
\([I|\mathbf{0}]\text{.}\) The same row operations will carry
\(A\) to
\(I\text{.}\)
Remark 4.2.6.
Not all square matrices are nonsingular. For example,
\begin{equation*}
\mbox{rref}\left(\begin{bmatrix}2\amp -1\amp 1\\1\amp 1\amp 1\\3\amp 0\amp 2\end{bmatrix}\right)=\begin{bmatrix}1\amp 0\amp 2/3\\0\amp 1\amp 1/3\\0\amp 0\amp 0\end{bmatrix}\neq I
\end{equation*}
By
Theorem 4.2.5, a matrix equation
\(A\mathbf{x}=\mathbf{b}\) involving a singular matrix
\(A\) cannot have a unique solution. The following example illustrates the two scenarios that arise when solving equations that involve singular matrices.
Example 4.2.7.
Let
\begin{equation*}
A=\begin{bmatrix}2\amp -1\amp 1\\1\amp 1\amp 1\\3\amp 0\amp 2\end{bmatrix}
\end{equation*}
Solve the equation \(A\mathbf{x}=\mathbf{b}\) for each case of \(b\) below or show that hte system is inconsistent.
\begin{equation*}
\mathbf{b}_1=\begin{bmatrix}4\\-1\\3\end{bmatrix}
\end{equation*}
\begin{equation*}
\mathbf{b}_2=\begin{bmatrix}1\\-1\\1\end{bmatrix}
\end{equation*}
Answer.
For \(b_1 \text{,}\) row reduction gives us
\begin{equation*}
\left[\begin{array}{ccc|c}
2\amp -1\amp 1\amp 4\\1\amp 1\amp 1\amp -1\\3\amp 0\amp 2\amp 3
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{ccc|c}
1\amp 0\amp 2/3\amp 1\\0\amp 1\amp 1/3\amp -2\\0\amp 0\amp 0\amp 0
\end{array}\right].
\end{equation*}
There are infinitely many solutions and they all have the following form:
\begin{equation*}
\mathbf{x}=\begin{bmatrix}1-(2/3)t\\-2-(1/3)t\\t\end{bmatrix}=\begin{bmatrix}1\\-2\\0\end{bmatrix}+\begin{bmatrix}-2/3\\-1/3\\1\end{bmatrix}t.
\end{equation*}
For \(b_2\text{,}\) the vector \(\mathbf{b}\) is changed and the row operations that take \(A\) to its reduced row-echelon form produce a \(1\) in the last row of the vector on the right, which shows that the system is inconsistent.
\begin{equation*}
\left[\begin{array}{ccc|c}
2\amp -1\amp 1\amp 1\\1\amp 1\amp 1\amp -1\\3\amp 0\amp 2\amp 1
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{ccc|c}
1\amp 0\amp 2/3\amp 0\\0\amp 1\amp 1/3\amp 0\\0\amp 0\amp 0\amp 1
\end{array}\right].
\end{equation*}
Subsection 4.2.2 A Linear System as a Linear Combination Equation
Recall that the product of a matrix and a vector can be interpreted as a linear combination of the columns of the matrix. For example,
\begin{equation*}
\begin{bmatrix}1\amp 2\amp 3\amp 4\\5\amp 6\amp 7\amp 8\end{bmatrix}\begin{bmatrix}x_1\\x_2\\x_3\\x_4\end{bmatrix}=x_1\begin{bmatrix}1\\5\end{bmatrix}+x_2\begin{bmatrix}2\\6\end{bmatrix}+x_3\begin{bmatrix}3\\7\end{bmatrix}+x_4\begin{bmatrix}4\\8\end{bmatrix}.
\end{equation*}
Example 4.2.8.
For each given matrix \(A\) and vector \(\mathbf{b}\text{,}\) determine whether \(\mathbf{b}\) is a linear combination of the columns of \(A\text{.}\) If possible, express \(\mathbf{b}\) as a linear combination of the columns of \(A\text{.}\)
\begin{equation*}
A=\begin{bmatrix}
3\amp 1\amp -2\\
1\amp 0\amp 3\\
-2\amp 1\amp 1
\end{bmatrix},\,\,\,\mathbf{b}=\begin{bmatrix} -2\\7\\-1\end{bmatrix}.
\end{equation*}
\begin{equation*}
B=\begin{bmatrix}
1\amp -1\amp 3\\
2\amp -1\amp 1\\
0\amp 1\amp -5
\end{bmatrix},\,\,\,\mathbf{b}=\begin{bmatrix} 4\\-1\\2\end{bmatrix}.
\end{equation*}
Answer.
For \(A\text{,}\) we are looking for \(x_1, x_2, x_3\) such that
\begin{equation*}
x_1\begin{bmatrix}3\\1\\-2\end{bmatrix}+x_2\begin{bmatrix}1\\0\\1\end{bmatrix}+x_3\begin{bmatrix}-2\\3\\1\end{bmatrix}=\begin{bmatrix}-2\\7\\-1\end{bmatrix}.
\end{equation*}
Solving this equation amounts to finding \(\mathbf{x}=\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}\) such that \(A\mathbf{x}=\mathbf{b}\text{.}\) The augmented matrix corresponding to this equation, together with its reduced row-echelon form are
\begin{equation*}
\left[\begin{array}{ccc|c}
3\amp 1\amp -2\amp -2\\1\amp 0\amp 3\amp 7\\-2\amp 1\amp 1\amp -1
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{ccc|c}
1\amp 0\amp 0\amp 1\\0\amp 1\amp 0\amp -1\\0\amp 0\amp 1\amp 2
\end{array}\right].
\end{equation*}
So, \(\mathbf{x}=\begin{bmatrix} 1\\-1\\2\end{bmatrix}\) is a solution to the matrix equation. We conclude that \(\mathbf{b}\) is a linear combination of the columns of \(A\text{,}\) and write
\begin{equation*}
\mathbf{b}=\begin{bmatrix} -2\\7\\-1\end{bmatrix}=\begin{bmatrix} 3\\1\\-2\end{bmatrix}-\begin{bmatrix} 1\\0\\1\end{bmatrix}+2\begin{bmatrix} -2\\3\\1\end{bmatrix}.
\end{equation*}
For \(B\) We begin by attempting to solve the matrix equation \(A\mathbf{x}=\mathbf{b}\text{.}\) The augmented matrix corresponding to this equation, together with its reduced row-echelon form are
\begin{equation*}
\left[\begin{array}{ccc|c}
1\amp -1\amp 3\amp 4\\2\amp -1\amp 1\amp -1\\0\amp 1\amp -5\amp 2
\end{array}\right]\begin{array}{c}
\\
\rightsquigarrow\\
\\
\end{array}\left[\begin{array}{ccc|c}
1\amp 0\amp -2\amp 0\\0\amp 1\amp -5\amp 0\\0\amp 0\amp 0\amp 1
\end{array}\right].
\end{equation*}
This shows that this matrix equation has no solutions. We conclude that \(\mathbf{b}\) is not a linear combination of the columns of \(A\text{.}\)
Exercises 4.2.3 Exercises
1.
Given the system of linear equations below, write (a) the corresponding matrix equation, and (b) the corresponding linear combination equation. DO NOT SOLVE.
\begin{align*}
3x\amp - \amp y \amp - \amp 2z\amp = \amp 4 \\
-x\amp \amp \amp + \amp z\amp = \amp -1 \\
\amp \amp -y \amp + \amp 5z\amp =\amp 0
\end{align*}
Exercise Group.
Use an augmented matrix and elementary row operations to find coefficients \(x_1\) and \(x_2\) that make the expression true, or demonstrate that such coefficients do not exist.
2.
\begin{equation*}
x_1\begin{bmatrix}
1\\
-2
\end{bmatrix}+ x_2\begin{bmatrix}
1\\
3
\end{bmatrix}=\begin{bmatrix}
1\\
8
\end{bmatrix}.
\end{equation*}
Answer.
\begin{equation*}
x_1=-1, x_2=2.
\end{equation*}
3.
\begin{equation*}
x_1\begin{bmatrix}
4\\
-1
\end{bmatrix}+ x_2\begin{bmatrix}
-8\\
2
\end{bmatrix}=\begin{bmatrix}
0\\
3
\end{bmatrix}.
\end{equation*}
Answer.
The system is inconsistent and no \(x_1, x_2\) exist.
Exercise Group.
In each problem below determine whether vector \(\mathbf{b}\) is in the span of the given set of vectors.
4.
\(\mathbf{b}=\begin{bmatrix}2\\14\\7\end{bmatrix}\) and \(\left\{\begin{bmatrix}2\\-1\\1\end{bmatrix}, \begin{bmatrix}-3\\4\\1\end{bmatrix}, \begin{bmatrix}1\\-3\\-2\end{bmatrix}\right\}.\)Answer.
The vector \(b\) is not in the span.
5.
\(\mathbf{b}=\begin{bmatrix}5\\2\\4\end{bmatrix}\) and \(\left\{\begin{bmatrix}4\\2\\4\end{bmatrix}, \begin{bmatrix}4\\5\\1\end{bmatrix}, \begin{bmatrix}3\\2\\2\end{bmatrix}, \begin{bmatrix}1\\0\\2\end{bmatrix}\right\}.\)
Answer.
The vector \(b\) is in the span.
6.
\(\mathbf{b}=\begin{bmatrix}2\\4\\-7\\-5\end{bmatrix}\) and \(\left\{\begin{bmatrix}1\\-1\\2\\3\end{bmatrix}, \begin{bmatrix}4\\1\\-3\\1\end{bmatrix}\right\}.\)
Answer.
The vector \(b\) is not in the span.