Skip to main content
Logo image

Coordinated Linear Algebra

Section 2.3 Matrix Equations

Subsection 2.3.1 Matrix-Vector Multiplication

In the previous section, we saw that a linear comination equation can be expressed as a system of linear equations. Linear combinations are not the only type of equations that can be reinterpreted as systems of linear equations. In this section, we will introduce matrix equations, which are another representation of a system of linear equations. Before we do that, we need to introduce the concept of matrix-vector multiplication.
Matrix-vector multiplication or the matrix-vector product is an operation between a matrix \(A\) and a vector \(\mathbf{x}\) that produces another vector, their product \(A\mathbf{x}\text{.}\) The formal definition requires dense notation, so we work through an example before presenting it.

Example 2.3.1.

Let
\begin{equation*} A=\begin{bmatrix}2\amp -1\amp 3\amp 2\\0\amp 3\amp -2\amp 1\\-2\amp 4\amp 1\amp 0\end{bmatrix}\quad\text{and}\quad \mathbf{x}=\begin{bmatrix}3\\-1\\4\\1\end{bmatrix}. \end{equation*}
The matrix-vector product \(A\mathbf{x}\) is a linear combination of the columns of \(A\) with coefficients given by the entries in \(x\text{.}\) For this example,
\begin{align*} A\mathbf{x} \amp =\begin{bmatrix}\color{red}2\amp \color{blue}-1\amp \color{brown}3\amp 2\\ \color{red}0\amp \color{blue}3\amp \color{brown}-2\amp 1\\ \color{red}-2\amp \color{blue}4\amp \color{brown}1\amp 0\end{bmatrix}\begin{bmatrix}\color{red}3\\ \color{blue}-1\\ \color{brown}4\\1\end{bmatrix} \\ = \color{red}3\begin{bmatrix}\color{red}2\\ \color{red}0\\ \color{red}-2\end{bmatrix}\color{black}+ \color{blue}(-1)\begin{bmatrix}\color{blue}-1\\ \color{blue}3\\ \color{blue}4\end{bmatrix} \color{black}+\color{brown}4\begin{bmatrix}\color{brown}3\\ \color{brown}-2\\ \color{brown}1\end{bmatrix} \color{black}+\begin{bmatrix}2\\1\\0\end{bmatrix} \\ =\begin{bmatrix}21\\-10 \\ -6\end{bmatrix}. \end{align*}
We can also compute the product one entry at a time. First, let’s focus on the first row of \(A\text{.}\)
\begin{align*} \amp \begin{bmatrix}{\color{red}2}\amp {\color{blue}-1}\amp {\color{brown}3}\amp 2\\0\amp 3\amp -2\amp 1\\-2\amp 4\amp 1\amp 0\end{bmatrix}\begin{bmatrix}{\color{red}3}\\{\color{blue}-1}\\{\color{brown}4}\\1\end{bmatrix} \\ \amp= \begin{bmatrix}{\color{red}(2)( 3)}+{\color{blue}(-1)(-1)}+{\color{brown}(3)(4)}+(2)(1)\\ \\ \\\end{bmatrix}=\begin{bmatrix}21\\ \\ \\\end{bmatrix}. \end{align*}
Next, let’s look a the second row of \(A\text{.}\)
\begin{align*} \amp \begin{bmatrix}2\amp -1\amp 3\amp 2\\{\color{red}0}\amp {\color{blue}3}\amp {\color{brown}-2}\amp 1\\-2\amp 4\amp 1\amp 0\end{bmatrix}\begin{bmatrix}{\color{red}3}\\{\color{blue}-1}\\{\color{brown}4}\\1\end{bmatrix}=\begin{bmatrix}21\\{\color{red}(0)( 3)}+{\color{blue}(3)(-1)}+{\color{brown}(-2)(4)}+(1)(1)\\ \\ \end{bmatrix} \\ \amp =\begin{bmatrix}21\\-10 \\ \\\end{bmatrix}. \end{align*}
Finally, let’s do the third row of \(A\text{.}\)
\begin{align*} \amp \begin{bmatrix}2\amp -1\amp 3\amp 2\\0\amp 3\amp -2\amp 1\\{\color{red}-2}\amp {\color{blue}4}\amp {\color{brown}1}\amp 0\end{bmatrix}\begin{bmatrix}{\color{red}3}\\{\color{blue}-1}\\{\color{brown}4}\\1\end{bmatrix}=\begin{bmatrix}21\\-10\\{\color{red}(-2)( 3)}+{\color{blue}(4)(-1)}+{\color{brown}(1)(4)}+(0)(1) \end{bmatrix} \\ \amp =\begin{bmatrix}21\\-10 \\ -6\end{bmatrix}. \end{align*}

Definition 2.3.2.

Let \(A\) be an \(m\times n\) matrix, and let \(\mathbf{x}\) be an \(n\times 1\) vector. The product \(A\mathbf{x}\) is the \(m\times 1\) vector given by:
\begin{align*} A\mathbf{x} \amp =\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} \\ \amp = x_1\begin{bmatrix}a_{11}\\a_{21}\\ \vdots \\a_{m1}\end{bmatrix}+ x_2\begin{bmatrix}a_{12}\\a_{22}\\ \vdots \\a_{m2}\end{bmatrix}+\dots+ x_n\begin{bmatrix}a_{1n}\\a_{2n}\\ \vdots \\a_{mn}\end{bmatrix} \end{align*}
or, equivalently,
\begin{equation*} A\mathbf{x}=\begin{bmatrix}a_{11}x_1+a_{12}x_2+\ldots +a_{1n}x_n\\a_{21}x_1+a_{22}x_2+\ldots +a_{2n}x_n\\\vdots\\a_{m1}x_1+a_{m2}x_2+\ldots +a_{mn}x_n\end{bmatrix}. \end{equation*}
We can now make a couple of observations about the matrix-vector product. The first observation is part of the definition, but it is still worth pointing out.

Observation 2.3.3.

In order for the product \(A\mathbf{x}\) to exist, \(A\) and \(\mathbf{x}\) must have compatible dimensions. In particular, vector \(\mathbf{x}\) must have as many components as the number of columns of \(A\) (otherwise, we would not be have a well-defined linear combination of the columns). So, if \(A\) is an \(m\times n\) matrix, \(\mathbf{x}\) must be an \(n\times 1\) vector. If we write these dimensions next to each other, we will notice that the inner dimensions (\(n\)) must match, while the outer dimensions, \(m\) and \(1\text{,}\) give us the dimensions of the product.
\begin{equation*} \begin{array}{ccccc} A\amp \amp \mathbf{x} \amp =\amp A\mathbf{x}\\ (m\times n) \amp \amp (n\times 1) \amp \amp (m\times 1) \end{array} \end{equation*}
Let’s find another matrix-vector product.

Example 2.3.4.

Let
\begin{equation*} A=\begin{bmatrix}1\amp -1\\2\amp 3\\-2\amp 1\\4\amp 0\end{bmatrix}\quad\text{and}\quad\mathbf{x}=\begin{bmatrix}-3\\5\end{bmatrix}. \end{equation*}
Find \(A\mathbf{x}\text{.}\)
Answer.
\begin{equation*} A\mathbf{x} = \begin{bmatrix}1\amp -1\\2\amp 3\\-2\amp 1\\4\amp 0\end{bmatrix} \begin{bmatrix}-3\\5\end{bmatrix} = -3\begin{bmatrix}1\\2\\-2\\4\end{bmatrix} + 5\begin{bmatrix}-1\\3\\1\\0\end{bmatrix} = \begin{bmatrix}-8\\9\\11\\-12\end{bmatrix}. \end{equation*}

Example 2.3.5.

Compute the matrix-vector product
\begin{equation*} \begin{bmatrix} 1 \amp 0 \amp 0 \amp 0\\ 0 \amp 1 \amp 0 \amp 0\\ 0 \amp 0 \amp 1 \amp 0\\ 0 \amp 0 \amp 0 \amp 1 \end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4 \end{bmatrix}. \end{equation*}
Answer.
The matrix-vector product is
\begin{equation*} \begin{bmatrix} 1 \amp 0 \amp 0 \amp 0\\ 0 \amp 1 \amp 0 \amp 0\\ 0 \amp 0 \amp 1 \amp 0\\ 0 \amp 0 \amp 0 \amp 1 \end{bmatrix} \begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4 \end{bmatrix} =x_1\begin{bmatrix} 1\\ 0\\ 0\\ 0 \end{bmatrix} +x_2\begin{bmatrix} 0\\ 1\\ 0\\ 0 \end{bmatrix} +x_3\begin{bmatrix} 0\\ 0\\ 1\\ 0 \end{bmatrix} +x_4\begin{bmatrix} 0\\ 0\\ 0\\ 1 \end{bmatrix} =\begin{bmatrix} x_1\\ x_2\\ x_3\\ x_4 \end{bmatrix}. \end{equation*}
In the previous example, we see that the matrix-vector product of any vector with a square matrix with one’s along its diagonal and zeros elsewhere is the vector itself. For this reason, we call such a matrix the identity matrix and denote the \(n\times n\) indentity matrix by \(I_n\text{.}\) In general, if \(\mathbf{x}\) is a vector in \(\R\text{,}\) then the matrix-vector product \(I_n\mathbf{x}=\mathbf{x}\text{.}\)

Remark 2.3.6.

We have several operations we can do to vectors. From Section 2.1, we can add vectors together and multiply vectors by scalars. What we want to observe here is that both of these old operations work nicely with our new operation of multiplying a vector by a matrix. That is, for \(A\) an \(m\times n\) matrix, and \(\mathbf{x}\) and \(\mathbf{y}\) in \(\R^n\text{,}\)
\begin{equation*} A(\mathbf{x}+\mathbf{y}) = A\mathbf{x}+A\mathbf{y} \end{equation*}
and for a scalar \(k\)
\begin{equation*} A(k\mathbf{x}) = k(A\mathbf{x}) \end{equation*}

Subsection 2.3.2 Matrix Equations

Given an \(m\times n\) matrix \(A\) and an \(m\times 1\) constant vector \(\mathbf{b}\text{,}\) a matrix equation is an equation of the form \(A\mathbf{x}=\mathbf{b}\text{.}\) The solution, if it exists, is an \(n\times 1\) vector \(\mathbf{x}\) that satisfies the equation, that is, mutiplying \(\mathbf{x}\) by the matrix \(A\) on the left gives the vector \(\mathbf{b}\text{.}\)

Exploration 2.3.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 2.3.7.

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*}
  1. Write the system as a matrix equation
  2. 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 2.3.8.

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{2.3.1} \end{equation}
The solution given in (2.3.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 2.3.3 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 this subsection with a motivating example.

Example 2.3.9.

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 2.3.9 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 2.3.10.

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 produce particularly well-behaved matrix equations.

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 2.3.12.

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 2.3.11, 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 2.3.13.

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.
  1. \begin{equation*} \mathbf{b}_1=\begin{bmatrix}4\\-1\\3\end{bmatrix} \end{equation*}
  2. \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 2.3.4 Connection to Linear Combination Equations

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 2.3.14.

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{.}\)
  1. \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*}
  2. \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 2.3.5 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.