Skip to main content

Linear Algebra

Module 7 Matrix Representations of Systems of Linear Equations

In this module you will learn
  • How to represent a system of linear equations as a matrix equation.
  • Multiple ways to interpret solutions of systems of linear equations.
  • How linear independence/dependence relates to solutions to matrix equations.
  • How to use matrix equations to find normal vectors to lines or planes.
Matrix-vector multiplication gives a compact way to represent systems of linear equations.
Consider the system
\begin{equation} \left\{ \begin{array}{rcrcrl} x&+&2y&-&2z&=-15\\2x&+&y&-&5z&=-21\\x&-&4y&+&z&=18 \end{array}\right.,\tag{7.0.1} \end{equation}
which is equivalent to the vector equation
\begin{equation*} \mat{x+2y-2z\\ 2x+y-5z\\ x-4y+z}=\mat{-15\\-21\\18}. \end{equation*}
We can rewrite (7.0.1) using matrix-vector multiplication:
\begin{equation*} \underbrace{\mat{1&2&-2\\2&1&-5\\1&-4&1}}_{A}\mat{x\\y\\z}=\mat{-15\\-21\\18}. \end{equation*}
The matrix \(A\) on the left is called the coefficient matrix because it is made up of the coefficients from equation (7.0.1).
By using coefficient matrices, every system of linear equations can be rewritten as a single matrix equation of the form
\begin{equation*} A\vec x=\vec b \end{equation*}
where \(A\) is a coefficient matrix, \(\vec x\) is a column vector of variables, and \(\vec b\) is a column vector of constants.

Example 7.0.1.

Consider the one equation system
\begin{equation} \left\{ \begin{array}{rcrcrl} x&-&4y&+&z&=5 \end{array}\right.\tag{7.0.2} \end{equation}
and the two-equation system
\begin{equation} \left\{ \begin{array}{rcrcrl} x&-&4y&+&z&=5\\&&y&-&z&=9 \end{array}\right..\tag{7.0.3} \end{equation}
Rewrite each system as a single matrix equation.

Solution.

We can rewrite (7.0.2) as
\begin{equation*} \mat{1&-4&1}\mat{x\\y\\z}=\mat{5}. \end{equation*}
Multiplying out to verify, we see,
\begin{equation*} \mat{1&-4&1}\mat{x\\y\\z}=\mat{x-4y+z}=\mat{5}, \end{equation*}
which is indeed equivalent to (7.0.2).
Similarly, we can rewrite (7.0.3) as
\begin{equation*} \mat{1&-4&1\\0&1&-1}\mat{x\\y\\z}=\mat{5\\9}. \end{equation*}
Multiplying out to verify, we see,
\begin{equation*} \mat{1&-4&1\\0&1&-1}\mat{x\\y\\z}=\mat{x-4y+z\\0x+y-z}=\mat{5\\9}, \end{equation*}
which is equivalent to (7.0.3).

Section 7.1 Interpretations of Matrix Equations

The solution set to a system of linear equations, like
\begin{equation} \left\{ \begin{array}{rcrcrl} x&+&2y&-&2z&=-15\\2x&+&y&-&5z&=-21\\x&-&4y&+&z&=18 \end{array}\right.,\tag{7.1.1} \end{equation}
can be interpreted as the intersection of three planes (or hyperplanes if there were more variables). Each equation (each row) specifies a plane, and the solution set is the intersection of all of these planes. Rewriting a system of equations in matrix form gives two additional ways to interpret the solution set.

Section 7.2 The Column Picture

Using the column interpretation of matrix-vector multiplication, we see that system (7.1.1) is equivalent to
\begin{equation*} \mat{1&2&-2\\2&1&-5\\1&-4&1}\mat{x\\y\\z}= x\mat{1\\2\\1}+y\mat{2\\1\\-4}+z\mat{-2\\-5\\1}=\mat{-15\\-21\\18}. \end{equation*}
We now see that asking, “What coefficients allow \(\mat{1\\2\\1}\text{,}\) \(\mat{2\\1\\-4}\text{,}\) and \(\mat{-2\\-5\\1}\) to form \(\mat{-15\\-21\\18}\) as a linear combination?” is equivalent to asking, “What are the solutions to system (7.1.1)?” Here, \(\mat{1\\2\\1}\text{,}\) \(\mat{2\\1\\-4}\text{,}\) and \(\mat{-2\\-5\\1}\) are the columns of the coefficient matrix.

Section 7.3 The Row Picture

The row interpretation gives another perspective. Let \(\vec r_{1}\text{,}\) \(\vec r_{2}\text{,}\) and \(\vec r_{3}\) be the rows of the coefficient matrix for system (7.1.1). Then, system (7.1.1) is equivalent to
\begin{equation*} \mat{1&2&-2\\2&1&-5\\1&-4&1}\mat{x\\y\\z}= \left[\begin{array}{c}\vec r_1\\\hline\vec r_2\\\hline\vec r_3\end{array}\right]\vec x= \mat{\vec r_1\cdot \vec x\\\vec r_2\cdot\vec x\\\vec r_3\cdot \vec x}=\mat{-15\\-21\\18}. \end{equation*}
In other words, we can interpret solutions to system (7.1.1) as vectors whose dot product with \(\vec r_{1}\) is \(-15\text{,}\) whose dot product with \(\vec r_{2}\) is \(-21\text{,}\) and whose dot product with \(\vec r_{3}\) is \(18\text{.}\) Given that the dot product has a geometric interpretation, this perspective is powerful (especially when the right side of the equation is all zeros!).

Section 7.4 Interpreting Homogeneous Systems

Consider the homogeneous system/matrix equation
\begin{equation} \left. \begin{array}{rcrcrl} x&+&2y&-&2z&=0\\2x&+&y&-&5z&=0\\x&-&4y&+&z&=0 \end{array}\right.\qquad\iff\qquad \underbrace{\mat{1&2&-2\\2&1&-5\\1&-4&1}}_{A}\mat{x\\y\\z}=\mat{0\\0\\0}.\tag{7.4.1} \end{equation}
Now, the column interpretation of system (7.4.1) is: what linear combinations of the column vectors of \(A\) give \(\vec 0\text{?}\) This directly relates to the question of whether the column vectors of \(A\) are linearly independent.
Let \(\vec r_{1}\text{,}\) \(\vec r_{2}\text{,}\) and \(\vec r_{3}\) be the rows of \(A\text{.}\) The row interpretation of system (7.4.1) asks: what vectors are simultaneously orthogonal to \(\vec r_{1}\text{,}\) \(\vec r_{2}\text{,}\) and \(\vec r_{3}\text{?}\)

Takeaway 7.4.1.

There are three ways to interpret solutions to a matrix equation \(A\vec x=\vec b\text{:}\) (i) the intersection of hyperplanes specified by the rows; (ii) what linear combinations of the columns of \(A\) give \(\vec b\text{;}\) (iii) what vectors yield the entries of \(\vec b\) when dot producted with the rows of \(A\text{.}\)

Example 7.4.2.

Find all vectors orthogonal to \(\vec a=\mat{1\\1\\1}\) and \(\vec b=\mat{1\\2\\1}\text{.}\)

Solution.

To find all vectors orthogonal to \(\vec a\) and \(\vec b\) we need to find vectors \(\vec x\) satisfying \(\vec a\cdot \vec x=0\) and \(\vec b\cdot \vec x=0\text{.}\) This is equivalent to solving the matrix equation
\begin{equation*} \left[\begin{array}{c}\vec a\\\hline\\[-9pt]\vec b\end{array}\right]\vec x =\mat{\vec a\cdot \vec x\\\vec b\cdot\vec x}=\underbrace{\mat{1&1&1\\1&2&1}}_{A}\mat{x\\y\\z}=\mat{0\\0}. \end{equation*}
By row reducing \(A\text{,}\) we get
\begin{equation*} \Rref(A) = \mat{1&0&1\\0&1&0}, \end{equation*}
and so the complete solution expressed in vector form is
\begin{equation*} \vec x = t\mat{-1\\0\\1}. \end{equation*}
The row picture is particularly applicable when trying to find normal vectors.

Example 7.4.3.

Let \(\mathcal{Q}\) be the hyperplane specified in vector form by
\begin{equation*} \vec x=t\mat{1\\1\\-1\\1}+s\mat{0\\1\\0\\1}+r\mat{2\\0\\0\\0}+\mat{1\\2\\3\\4}. \end{equation*}
Find a normal vector for \(\mathcal{Q}\) and write \(\mathcal{Q}\) in normal form.

Solution.

Like the above example, since normal vectors for \(\mathcal{Q}\) need to be orthogonal to \(\vec d_{1}=\mat{1\\1\\-1\\1}\text{,}\) \(\vec d_{2}=\mat{0\\1\\0\\1}\text{,}\) and \(\vec d_{3}=\mat{2\\0\\0\\0}\text{,}\) we can find the normal vectors by solving
\begin{equation*} \underbrace{\mat{1&1&-1&1\\0&1&0&1\\2&0&0&0}}_{A}\mat{x\\y\\z\\w}=\mat{0\\0\\0}. \end{equation*}
By row reducing \(A\text{,}\) we get
\begin{equation*} \Rref(A) = \mat{1&0&0&0\\0&1&0&1\\0&0&1&0}, \end{equation*}
and so we get that the complete solution expressed in vector form is
\begin{equation*} \vec x = t\mat{0\\-1\\0\\1}. \end{equation*}
Therefore, any non-zero multiple of \(\mat{0\\-1\\0\\1}\) is a normal vector for \(\mathcal{Q}\text{.}\) For example, \(\vec n =\mat{0\\-1\\0\\1}\) is a normal vector for \(\mathcal{Q}\text{,}\) and \(\mathcal{Q}\) can be written in normal form as
\begin{equation*} \mat{0\\-1\\0\\1}\cdot\left(\mat{x\\y\\z\\w}-\mat{1\\2\\3\\4}\right)=0. \end{equation*}

Exercises 7.5 Exercises

1.

Each system of equations below concerns the variables \(x\text{,}\) \(y\text{,}\) and \(z\text{.}\) Rewrite each system as a single matrix equation.
  1. \(\displaystyle \left\{\begin{array}{rcrcrl}x&-&y&+&z&=1\\2x&-&y&+&z&=2\\3x&+&y&-&z&=3\end{array}\right.\)
  2. \(\displaystyle \left\{\begin{array}{rcrl}x&+&z&=6\end{array}\right.\)
  3. \(\displaystyle \left\{\begin{array}{rcrcrl}5x&-&9y&+&2z&=0\\&-&y&&&=1\end{array}\right.\)
Solution.
  1. \(\displaystyle \mat{1&-1&1\\2&-1&1\\3&1&-1}\mat{x\\y\\z}= \mat{1\\2\\3}\)
  2. \(\displaystyle \mat{1&0&1}\mat{x\\y\\z}= \mat{6}\)
  3. \(\displaystyle \mat{5&-9&2\\0&-1&0}\mat{x\\y\\z}= \mat{0\\1}\)

2.

Find all vectors orthogonal to:
  1. \(\mat{1\\2\\3}\) and \(\mat{2\\2\\3}\)
  2. \(\mat{0\\5\\6}\) and \(\mat{1\\10\\2}\)
  3. \(\mat{1\\0\\0}\text{,}\) \(\mat{0\\1\\0}\text{,}\) and \(\mat{0\\0\\1}\)
  4. \(\displaystyle \mat{2\\6\\-1}\)
Solution.
  1. If \(\vec{x}= \mat{x\\y\\z}\) is orthogonal to \(\mat{1\\2\\3}\) and \(\mat{2\\2\\3}\text{,}\) then
    \begin{align*} \vec x \cdot \mat{1\\2\\3}&= 0 \quad\implies\quad x+2y+3z = 0 \\ \vec x \cdot \mat{2\\2\\3}&= 0 \quad\implies\quad 2x+2y+3z = 0. \end{align*}
    This means we need to solve the system
    \begin{equation*} \underbrace{\mat{1&2&3\\2&2&3}}_{A}\mat{x\\y\\z}= \mat{0\\0}. \end{equation*}
    Row reducing \(A\) yields
    \begin{equation*} \rref(A) = \mat{1&0&0\\0&1&3/2}, \end{equation*}
    so third column corresponds to a free variable. Let \(z=t\text{,}\) then \(x=0\) and \(y = -\frac{3t}{2}\text{.}\) The complete solution expressed in vector form is
    \begin{equation*} \vec x = t\mat{0\\-3/2\\1}\quad \text{or}\quad \vec x = t\mat{0\\-3\\2}. \end{equation*}
  2. Proceeding as in 7.5.2.a, we need to solve the matrix equation
    \begin{equation*} \underbrace{\mat{0&5&6\\1&10&2} }_{B}\underbrace{\mat{x\\y\\z}}_{\vec{x}}= \mat{0\\0}. \end{equation*}
    We obtain
    \begin{equation*} \rref (B) = \mat{1&0&-10\\0&1&6/5}, \end{equation*}
    so the complete solution is
    \begin{equation*} \vec x = t\mat{10\\-6/5\\1}\quad \text{or}\quad \vec x = t\mat{50\\-6\\5}. \end{equation*}
  3. We need to solve the matrix equation
    \begin{equation*} \mat{1&0&0\\0&1&0\\0&0&1}\mat{x\\y\\z}= \mat{0\\0\\0}. \end{equation*}
    The only solution is \(\vec x = \vec 0\text{.}\)
  4. We need to solve the matrix equation
    \begin{equation*} \underbrace{\mat{2&6&-1} }_{A}\underbrace{\mat{x\\y\\z}}_{\vec x}= \mat{0}. \end{equation*}
    Row reducing, we obtain
    \begin{equation*} \rref (A) = \mat{1&3&-1/2}. \end{equation*}
    Both the second and third columns correspond to free variables. Let \(y=s\) and \(z=t\text{,}\) then \(x = -3s + \frac{t}{2}\text{,}\) so we have
    \begin{equation*} \mat{x\\y\\z}= \matc{-3s+t/2\\s\\t}= s\mat{-3\\1\\0}+ t\mat{1/2\\0\\1}. \end{equation*}
    Therefore, the complete solution is
    \begin{equation*} \vec x = s\mat{-3\\1\\0}+ t\mat{1/2\\0\\1}. \end{equation*}

3.

Express each plane or hyperplane in normal form.
  1. \(\displaystyle \vec x = t\mat{0\\2\\2}+s\mat{1\\1\\1}+\mat{1\\0\\3}\)
  2. \(\displaystyle \vec x = t\mat{1\\6\\8}+s\mat{2\\0\\2}+\mat{0\\0\\9}\)
  3. \(\displaystyle \vec x = t\mat{1\\5\\15\\20}+s\mat{3\\0\\35\\59}+ r\mat{1\\4\\0\\18}+\mat{1\\6\\0\\0}\)
Solution.
Key fact to remember: a normal vector is orthogonal to the direction vectors.
  1. If \(\vec{n}= \mat{n_x\\n_y\\n_z}\) is a normal vector, then
    \begin{align*} \vec n \cdot \mat{0\\2\\2}&= 0 \quad\implies\quad 2n_{y}+2n_{z} = 0\\ \vec n \cdot \mat{1\\1\\1}&= 0 \quad\implies\quad n_{x}+n_{y}+n_{z} = 0. \end{align*}
    Expressed in matrix form, this system becomes
    \begin{equation*} \underbrace{\mat{0&2&2\\1&1&1}}_{A}\mat{n_x\\n_y\\n_z}= \mat{0\\0}. \end{equation*}
    Row reduction yields
    \begin{equation*} \Rref(A) = \mat{1&0&0\\0&1&1}, \end{equation*}
    so complete solution in vector form is
    \begin{equation*} \vec n = t\mat{0\\-1\\1}. \end{equation*}
    This means that any non-zero multiple of \(\mat{0\\-1\\1}\) is a normal vector for this plane, so a normal form of the plane is
    \begin{equation*} \mat{0\\-1\\1}\cdot \left(\mat{x\\y\\z}- \mat{1\\0\\3}\right)=0. \end{equation*}
  2. We first wish to find all vectors \(\vec n\) orthogonal to \(\mat{1\\6\\8}\) and \(\mat{2\\0\\2}\text{.}\) To do this, we solve the system
    \begin{equation*} \mat{1&6&8\\2&0&2}\mat{n_x\\n_y\\n_z}=\mat{0\\0}. \end{equation*}
    Row reducing, we have
    \begin{align*} \mat{1&6&8\\2&0&2}&\rightarrow \mat{1&6&8\\0&-12&-14}\\ &\rightarrow \mat{1&6&8\\0&6&7}\\ &\rightarrow \mat{1&0&1\\0&6&7}\\ \end{align*}
    which has nullspace equal to \(\Span\Set{\mat{6\\7\\-6}}\text{.}\)
    Since \(\mat{0\\0\\9}\) is a point on the plane, we then get that a normal form of the plane is
    \begin{equation*} \mat{6\\7\\-6}\cdot \left(\mat{x\\y\\z}-\mat{0\\0\\9}\right)=0. \end{equation*}
  3. We first wish to find all vectors \(\vec n\) orthogonal to \(\mat{1\\5\\15\\20}\text{,}\) \(\mat{3\\0\\35\\59}\text{,}\) and \(\mat{1\\4\\0\\18}\text{.}\) To do this we solve the system
    \begin{equation*} \mat{1&5&15&20\\3&0&35&59\\1&4&0&18}\mat{n_x\\n_y\\n_z\\n_w}=\mat{0\\0\\0}. \end{equation*}
    Row reducing, we have
    \begin{align*} \mat{1&5&15&20\\3&0&35&59\\1&4&0&18}&\rightarrow \mat{1&5&15&20\\3&0&35&59\\0&-1&-15&-2}\\ &\rightarrow \mat{1&5&15&20\\0&-15&-10&-1\\0&-1&-15&-2}\\ &\rightarrow \mat{1&5&15&20\\0&15&10&1\\0&1&15&2}\\ &\rightarrow \mat{1&5&15&20\\0&1&15&2\\0&15&10&1}\\ &\rightarrow \mat{1&5&15&20\\0&1&15&2\\0&0&-215&-29}\\ &\rightarrow \mat{1&0&-60&10\\0&1&15&2\\0&0&-215&-29}\\ &\rightarrow \mat{1&0&-60&10\\0&1&15&2\\0&0&215&29}\\ &\rightarrow \mat{1&0&-60&10\\0&1&0&-\frac{1}{43}\\0&0&215&29}\\ &\rightarrow \mat{1&0&0&\frac{778}{43}\\0&1&0&-\frac{1}{43}\\0&0&215&29}\\ &\rightarrow \mat{1&0&0&\frac{778}{43}\\0&1&0&-\frac{1}{43}\\0&0&1&\frac{29}{215}} \end{align*}
    which has nullspace equal to \(\Span\Set{\mat{3890\\-5\\29\\-215}}\text{.}\) Thus, since \(\mat{1\\6\\0\\0}\) is a point on the hyperplane, we then get that the normal form of the hyperplane is
    \begin{equation*} \mat{3890\\-5\\29\\-215}\cdot\left(\mat{x\\y\\z\\w}-\mat{1\\6\\0\\0}\right)=0. \end{equation*}

4.

Let \(\mathcal{P}= \Set{(x,y,z)\given 2x+4y-4z=7}\text{,}\) let \(\mathcal{Q}\) be the plane specified in vector form by
\begin{equation*} \vec x = t\mat{-1\\2\\0}+s\mat{5\\0\\2}+\mat{0\\7\\1}, \end{equation*}
and let \(\mathcal{R}\) be the plane specified in normal form by
\begin{equation*} \mat{2\\-8\\2}\cdot \left(\mat{x\\y\\z}-\mat{1\\7\\0}\right)=0. \end{equation*}
Find \(\mathcal{P}\cap\mathcal{Q}\cap\mathcal{R}\text{.}\)
Solution.
We first express all the planes in the same form (any form works but we choose to use the equation form). \(\mathcal{P}\) is already expressed in this form: \(2x+4y-4z=7\text{.}\) We are given \(\mathcal{Q}\) in the form
\begin{equation*} \vec x=t\mat{-1\\2\\0}+s\mat{5\\0\\2}+\mat{0\\7\\1}. \end{equation*}
Writing this into vector form yields
\begin{align*} x&=-t+5s\\ y&=2t+7\\ z&=2s+1 \end{align*}
then substituting the above values yields
\begin{align*} 2x&=-2t+5(2s)\\ 2x&=-(y-7)+5(z-1)\\ 2x+y-5z&=2. \end{align*}
Thus, having eliminated \(t\) and \(s\) from our original equations we find that the equation form of \(\mathcal{Q}\) is \(2x+y-5z=2\text{.}\) We are given \(\mathcal{R}\) in the form
\begin{equation*} \mat{2\\-8\\2}\cdot \left(\mat{x\\y\\z}-\mat{1\\7\\0}\right)=0 \end{equation*}
which, expanding the dot product, yields
\begin{align*} \mat{2\\-8\\2}\cdot \mat{x\\y\\z}&=\mat{2\\-8\\2}\cdot\mat{1\\7\\0}\\ 2x-8y+2z&=2-7(8)\\ 2x-8y+2z&=-54. \end{align*}
Thus the equation form of \(\mathcal{R}\) is \(2x-8y+2z=-54\text{.}\) Having written all three planes in equation form, finding \(\mathcal{P}\cap\mathcal{Q}\cap\mathcal{R}\) is the same as finding the solution set to the matrix equation
\begin{equation*} \mat{2&4&-4\\2&1&-5\\2&-8&2}\mat{x\\y\\z}=\mat{7\\2\\-54}. \end{equation*}
Row-reducing on both sides yields
\begin{align*} &\mat{2&4&-4\\2&1&-5\\2&-8&2}\mat{x\\y\\z}=\mat{7\\2\\-54}\\ \rightarrow&\mat{2&4&-4\\0&-3&-1\\2&-8&2}\mat{x\\y\\z}=\mat{7\\-5\\-54}\\ \rightarrow&\mat{2&4&-4\\0&-3&-1\\0&-12&6}\mat{x\\y\\z}=\mat{7\\-5\\-61}\\ \rightarrow&\mat{2&0&-\frac{16}{3}\\0&-3&-1\\0&-12&6}\mat{x\\y\\z}=\mat{\frac{1}{3}\\-5\\-61}\\ \rightarrow&\mat{2&0&-\frac{16}{3}\\0&-3&-1\\0&0&10}\mat{x\\y\\z}=\mat{\frac{1}{3}\\-5\\-41}\\ \rightarrow&\mat{2&0&-\frac{16}{3}\\0&-3&-1\\0&0&1}\mat{x\\y\\z}=\mat{\frac{1}{3}\\-5\\-\frac{41}{10}}\\ \rightarrow&\mat{2&0&0\\0&-3&-1\\0&0&1}\mat{x\\y\\z}=\mat{-\frac{323}{15}\\-5\\-\frac{41}{10}}\\ \rightarrow&\mat{2&0&0\\0&-3&0\\0&0&1}\mat{x\\y\\z}=\mat{-\frac{323}{15}\\-\frac{91}{10}\\-\frac{41}{10}}\\ \rightarrow&\mat{1&0&0\\0&1&0\\0&0&1}\mat{x\\y\\z}=\mat{-\frac{323}{30}\\ \frac{91}{30}\\-\frac{41}{10}} \end{align*}
so that \(\mathcal{P}\cap\mathcal{Q}\cap\mathcal{R}\) consists of exactly one point.
\begin{equation*} \mathcal{P}\cap\mathcal{Q}\cap\mathcal{R}=\left\lbrace\mat{-\frac{323}{30}\\ \frac{91}{30}\\-\frac{41}{10}}\right\rbrace. \end{equation*}