Linear Combinations#
Table of Contents#
Linear Combinations#
Example
\(\text{span}\left\{\begin{bmatrix}1\\1\\1\\\end{bmatrix}\right\}\) is the line consisting of vectors of the form \(\begin{bmatrix}r\\r\\r\\\end{bmatrix}\) for any \(r \in \mathbb{R}\).
Example
Let \(\mathbf{v} = \begin{bmatrix}0\\1\\1\\\end{bmatrix}\) and \(\mathbf{w} = \begin{bmatrix*}[r]0\\1\\-1\\\end{bmatrix*}\).
\(\begin{bmatrix}0\\1\\0\\\end{bmatrix} = \frac{1}{2}\mathbf{v} + \frac{1}{2}\mathbf{w}\) and so it is a linear combination of them.
\(\begin{bmatrix}0\\0\\1\\\end{bmatrix} = \frac{1}{2}\mathbf{v} + (-\frac{1}{2})\mathbf{w}\) and so it is a linear combination of them.
\(\begin{bmatrix}1\\0\\0\\\end{bmatrix} \ne c_1\mathbf{v} + c_2\mathbf{w}\) for any \(c_1, c_2\) and so it is not a linear combination of them.
What is \(\text{span}\{\mathbf{v, w}\}\)?
\(\text{span}\{\mathbf{v, w}\} = c_1\mathbf{v} + c_2\mathbf{w}\) for any \(c_1, c_2 \in \mathbb{R}\).
\(\mathbf{v, w}\) are vectors pointing into the first and fourth quadrants of the yz-plane, respectively, and so their span is the entire plane.
For any vector \(\begin{bmatrix}0\\y\\z\\\end{bmatrix}\) in the yz-plane it is the case that
\( \begin{aligned} \begin{bmatrix}0\\y\\z\\\end{bmatrix} = y\begin{bmatrix}0\\1\\0\\\end{bmatrix} + z\begin{bmatrix}0\\0\\1\\\end{bmatrix} &= y\left(\frac{1}{2}\mathbf{v} + \frac{1}{2}\mathbf{w}\right) + z\left(\frac{1}{2}\mathbf{v} - \frac{1}{2}\mathbf{w}\right) \\ &= y\frac{1}{2}\mathbf{v} + y\frac{1}{2}\mathbf{w} + z\frac{1}{2}\mathbf{v} - z\frac{1}{2}\mathbf{w} \\ &= y\frac{1}{2}\mathbf{v} + z\frac{1}{2}\mathbf{v} + y\frac{1}{2}\mathbf{w} - z\frac{1}{2}\mathbf{w} \\ &= \left(\frac{y + z}{2}\right)\mathbf{v} + \left(\frac{y + z}{2}\right)\mathbf{w} \\ \end {aligned} \)
Putting it all together#
Rewriting linear systems as vector equations
The linear system
\( \begin{aligned} 5x_1 && + && 2x_2 && + && 3x_3 && + && 9x_4 && = && 6 \\ 7x_1 && - && 3x_2 && + && 4x_3 && + && 8x_4 && = && 1 \\ 2x_1 && + && 5x_2 && - && 6x_3 && - && 3x_4 && = && 7 \\ \end {aligned} \)
can be rewritten as the vector equation
\( x_1 \begin{bmatrix*}[r] 5\\7\\2\\ \end {bmatrix*} + x_2 \begin{bmatrix*}[r] 2\\-3\\5\\ \end {bmatrix*} + x_3 \begin{bmatrix*}[r] 3\\4\\-6\\ \end {bmatrix*} + x_4 \begin{bmatrix*}[r] 9\\8\\-3\\ \end {bmatrix*} = \begin{bmatrix*}[r] 6\\1\\7\\ \end {bmatrix*} \)
The linear system is consistent iff the vector equation has at least one solution.
The linear system is consistent iff \(\begin{bmatrix}6\\1\\7\\\end{bmatrix}\) is a linear combination of the vectors \(\begin{bmatrix*}[r]5\\7\\2\\\end{bmatrix*}, \begin{bmatrix*}[r]2\\-3\\5\\\end{bmatrix*}, \begin{bmatrix*}[r]3\\4\\-6\\\end{bmatrix*}, \begin{bmatrix*}[r]9\\8\\-3\\\end{bmatrix*}\).
In other words, the linear system is consistent iff \(\begin{bmatrix}6\\1\\7\\\end{bmatrix} \in \text{span}\left\{\begin{bmatrix*}[r]5\\7\\2\\\end{bmatrix*}, \begin{bmatrix*}[r]2\\-3\\5\\\end{bmatrix*}, \begin{bmatrix*}[r]3\\4\\-6\\\end{bmatrix*}, \begin{bmatrix*}[r]9\\8\\-3\\\end{bmatrix*}\right\}\).
The linear system is consistent iff the last column of its augmented matrix is a linear combination of the columns of its coefficient matrix.
\( \left[ \begin{matrix*}[r] 5 & 2 & 3 & 9 \\ 7 & -3 & 4 & 8 \\ 2 & 5 & -6 & -3 \\ \end {matrix*} \left| \begin{matrix*}[r] 6 \\ 1 \\ 7 \\ \end {matrix*} \right. \right] \)
Example
Is \(\begin{bmatrix*}[r]-1\\8\\-5\\\end{bmatrix*}\) a linear combination of \(\begin{bmatrix*}[r]1\\0\\3\\\end{bmatrix*}, \begin{bmatrix*}[r]4\\2\\14\\\end{bmatrix*}, \begin{bmatrix*}[r]3\\6\\10\\\end{bmatrix*}\)? In other words, is the linear system with the following augmented matrix consistent?
Begin Row Reduction
\( \left [ \begin{matrix*}[r] \boxed{1} & 4 & 3 \\ 0 & 2 & 6 \\ 3 & 14 & 10 \\ \end {matrix*} \left| \begin{matrix*}[r] -1 \\ 8 \\ -5 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + (-3)r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 4 & 3 \\ 0 & \boxed{2} & 6 \\ 0 & 2 & 1 \\ \end {matrix*} \left| \begin{matrix*}[r] -1 \\ 8 \\ -2 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + (-1)r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 4 & 3 \\ 0 & \boxed{2} & 6 \\ 0 & 0 & \boxed{-5} \\ \end {matrix*} \left| \begin{matrix*}[r] -1 \\ 8 \\ -10 \\ \end {matrix*} \right. \right] }_{\textbf{row echelon}} \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 4 & 3 \\ 0 & \boxed{2} & 6 \\ 0 & 0 & \boxed{-5} \\ \end {matrix*} \left| \begin{matrix*}[r] -1 \\ 8 \\ -10 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow (-\frac{1}{5})r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 4 & 3 \\ 0 & \boxed{2} & 6 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -1 \\ 8 \\ 2 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow r_2 + (-6)r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 4 & 3 \\ 0 & \boxed{2} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -1 \\ -4 \\ 2 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 4 & 3 \\ 0 & \boxed{2} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -1 \\ -4 \\ 2 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow r_1 + (-3)r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 4 & 0 \\ 0 & \boxed{2} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -7 \\ -4 \\ 2 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow \frac{1}{2} r_2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 4 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -7 \\ -2 \\ 2 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 4 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -7 \\ -2 \\ 2 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow r_1 + (-4)r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] 1 \\ -2 \\ 2 \\ \end {matrix*} \right. \right] }_{\textbf{reduced}} \)
End Row Reduction
\( \begin{aligned} (1)\begin{bmatrix*}[r]1\\0\\3\\\end{bmatrix*} + (-2)\begin{bmatrix*}[r]4\\2\\14\\\end{bmatrix*} + (2)\begin{bmatrix*}[r]3\\6\\10\\\end{bmatrix*} &= \begin{bmatrix*}[r]-1\\8\\-5\\\end{bmatrix*} \\ \begin{bmatrix*}[r]1\\0\\3\\\end{bmatrix*} + \begin{bmatrix*}[r]-8\\-4\\-28\\\end{bmatrix*} + \begin{bmatrix*}[r]6\\12\\20\\\end{bmatrix*} &= \begin{bmatrix*}[r]-1\\8\\-5\\\end{bmatrix*} \\ \begin{bmatrix*}[r]1-8+6\\0-4+12\\3-28+20\\\end{bmatrix*} &= \begin{bmatrix*}[r]-1\\8\\-5\\\end{bmatrix*} \\ \end {aligned} \)
Yes, \(\begin{bmatrix*}[r]-1\\8\\-5\\\end{bmatrix*}\) is a linear combination of \(\begin{bmatrix*}[r]1\\0\\3\\\end{bmatrix*}, \begin{bmatrix*}[r]4\\2\\14\\\end{bmatrix*}, \begin{bmatrix*}[r]3\\6\\10\\\end{bmatrix*}\).
Example
Is \(\begin{bmatrix*}[r]4\\1\\-4\\\end{bmatrix*} \in \text{span}\left\{\begin{bmatrix*}[r]1\\0\\-2\\\end{bmatrix*}, \begin{bmatrix*}[r]0\\3\\6\\\end{bmatrix*}, \begin{bmatrix*}[r]-4\\-2\\3\\\end{bmatrix*}\right\}\) ?
In other words, does the following vector equation have at least one solution?
\(x_1\begin{bmatrix*}[r]1\\0\\-2\\\end{bmatrix*} + x_2\begin{bmatrix*}[r]0\\3\\6\\\end{bmatrix*} + x_3\begin{bmatrix*}[r]-4\\-2\\3\\\end{bmatrix*} = \begin{bmatrix*}[r]4\\1\\-4\\\end{bmatrix*}\)
Begin Row Reduction
\( \left [ \begin{matrix*}[r] \boxed{1} & 0 & -4 \\ 0 & 3 & -2 \\ -2 & 6 & 3 \\ \end {matrix*} \left| \begin{matrix*}[r] 4 \\ 1 \\ -4 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + 2r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 0 & -4 \\ 0 & \boxed{3} & -2 \\ 0 & 6 & -5 \\ \end {matrix*} \left| \begin{matrix*}[r] 4 \\ 1 \\ 4 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + (-2)r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 & -4 \\ 0 & \boxed{3} & -2 \\ 0 & 0 & \boxed{-1} \\ \end {matrix*} \left| \begin{matrix*}[r] 4 \\ 1 \\ 2 \\ \end {matrix*} \right. \right] }_{\textbf{row echelon}} \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 0 & -4 \\ 0 & \boxed{3} & -2 \\ 0 & 0 & \boxed{-1} \\ \end {matrix*} \left| \begin{matrix*}[r] 4 \\ 1 \\ 2 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow (-1)r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 0 & -4 \\ 0 & \boxed{3} & -2 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] 4 \\ 1 \\ -2 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow r_2 + 2r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 0 & -4 \\ 0 & \boxed{3} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] 4 \\ -3 \\ -2 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 0 & -4 \\ 0 & \boxed{3} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] 4 \\ -3 \\ -2 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow r_1 + 4r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 0 & 0 \\ 0 & \boxed{3} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -4 \\ -3 \\ -2 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow \frac{1}{3} r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left| \begin{matrix*}[r] -4 \\ -1 \\ -2 \\ \end {matrix*} \right. \right] }_{\textbf{reduced}} \)
End Row Reduction
\( \begin{aligned} (-4)\begin{bmatrix*}[r]1\\0\\-2\\\end{bmatrix*} + (-1)\begin{bmatrix*}[r]0\\3\\6\\\end{bmatrix*} + (-2)\begin{bmatrix*}[r]-4\\-2\\3\\\end{bmatrix*} &= \begin{bmatrix*}[r]4\\1\\-4\\\end{bmatrix*} \\ \begin{bmatrix*}[r]-4\\0\\8\\\end{bmatrix*} + \begin{bmatrix*}[r]0\\-3\\-6\\\end{bmatrix*} + \begin{bmatrix*}[r]8\\4\\-6\\\end{bmatrix*} &= \begin{bmatrix*}[r]4\\1\\-4\\\end{bmatrix*} \\ \begin{bmatrix*}[r]-4+0+8\\0-3+4\\8-6-6\\\end{bmatrix*} &= \begin{bmatrix*}[r]4\\1\\-4\\\end{bmatrix*} \\ \end {aligned} \)
The unique solution to the vector equation is \((-4, -1, -2)\) and so \(\begin{bmatrix*}[r]4\\1\\-4\\\end{bmatrix*} \in \text{span}\left\{\begin{bmatrix*}[r]1\\0\\-2\\\end{bmatrix*}, \begin{bmatrix*}[r]0\\3\\6\\\end{bmatrix*}, \begin{bmatrix*}[r]-4\\-2\\3\\\end{bmatrix*}\right\}\)
Example
Is the vector \(\begin{bmatrix*}[r]-3\\8\\1\\\end{bmatrix*}\) in the plane spanned by \(\begin{bmatrix*}[r]1\\-2\\3\\\end{bmatrix*}\) and \(\begin{bmatrix*}[r]5\\-13\\-3\\\end{bmatrix*}\) ?
\( \left [ \begin{matrix*}[r] \boxed{1} & 5 \\ -2 & -13 \\ 3 & -3 \\ \end {matrix*} \left | \begin{matrix*}[r] -3 \\ 8 \\ 1 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow r_2 + 2r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 5 \\ 0 & -3 \\ 3 & -3 \\ \end {matrix*} \left | \begin{matrix*}[r] -3 \\ 2 \\ 1 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + (-3)r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 5 \\ 0 & \boxed{-3} \\ 0 & -18 \\ \end {matrix*} \left | \begin{matrix*}[r] -3 \\ 2 \\ 10 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 5 \\ 0 & \boxed{-3} \\ 0 & -18 \\ \end {matrix*} \left | \begin{matrix*}[r] -3 \\ 2 \\ 10 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + (-6)r_2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 5 \\ 0 & \boxed{-3} \\ 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] -3 \\ 2 \\ \textcolor{red}{-2} \\ \end {matrix*} \right. \right] \)
The linear system is inconsistent and so the vector \(\begin{bmatrix*}[r]-3\\8\\1\\\end{bmatrix*}\) is not in the plane spanned by \(\begin{bmatrix*}[r]1\\-2\\3\\\end{bmatrix*}\) and \(\begin{bmatrix*}[r]5\\-13\\-3\\\end{bmatrix*}\).
Example
For what values of \(h\) is the vector \(\begin{bmatrix*}[r]h\\-3\\-5\\\end{bmatrix*}\) in the plane spanned by \(\begin{bmatrix*}[r]1\\0\\-2\\\end{bmatrix*}\) and \(\begin{bmatrix*}[r]-2\\1\\7\\\end{bmatrix*}\)?
In other words, for what values of \(h\) is the linear system consistent?
Begin Row Reduction
\( \left [ \begin{matrix*}[r] \boxed{1} & -2 \\ 0 & 1 \\ -2 & 7 \\ \end {matrix*} \left | \begin{matrix*}[r] h \\ -3 \\ -5 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + 2r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & -2 \\ 0 & \boxed{1} \\ 0 & 3 \\ \end {matrix*} \left | \begin{matrix*}[r] h \\ -3 \\ 2h-5 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow r_3 + (-3)r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & -2 \\ 0 & \boxed{1} \\ 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] h \\ -3 \\ 2h+4 \\ \end {matrix*} \right. \right] }_{\textbf{row echelon}} \)
\( \begin{aligned} \text{no solution} & \begin{cases} 2h + 4 \ne 0 \iff h \ne -2 \\ \end {cases} \\ \text{one solution} & \begin{cases} 2h + 4 = 0 \iff h = -2 \\ \end {cases} \\ \end{aligned} \)
\( \left [ \begin{matrix*}[r] \boxed{1} & -2 \\ 0 & \boxed{1} \\ 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] h \\ -3 \\ 2h+4 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow r_1 + 2r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 \\ 0 & \boxed{1} \\ 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] h-6 \\ -3 \\ 2h+4 \\ \end {matrix*} \right. \right] }_{\textbf{reduced}} \underset{h=-2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 0 \\ 0 & \boxed{1} \\ 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] -8 \\ -3 \\ 0 \\ \end {matrix*} \right. \right] \)
End Row Reduction
\( \begin{aligned} (-8)\begin{bmatrix*}[r]1\\0\\-2\\\end{bmatrix*} + (-3)\begin{bmatrix*}[r]-2\\1\\7\\\end{bmatrix*} &= \begin{bmatrix*}[r](-2)\\-3\\-5\\\end{bmatrix*} \\ \begin{bmatrix*}[r]-8\\0\\16\\\end{bmatrix*} + \begin{bmatrix*}[r]6\\-3\\-21\\\end{bmatrix*} &= \begin{bmatrix*}[r]-2\\-3\\-5\\\end{bmatrix*} \\ \begin{bmatrix*}[r]-8+6\\0-3\\16-21\\\end{bmatrix*} &= \begin{bmatrix*}[r]-2\\-3\\-5\\\end{bmatrix*} \\ \end {aligned} \)
\(\begin{bmatrix*}[r]h=-2\\-3\\-5\\\end{bmatrix*}\) is in the plane spanned by \(\begin{bmatrix*}[r]1\\0\\-2\\\end{bmatrix*}\) and \(\begin{bmatrix*}[r]-2\\1\\7\\\end{bmatrix*}\).
Writing linear combinations as matrix products#
A linear combination of \(n\) vectors of \(\mathbb{R}^m\) can be written as the product of an \(m \times n\) matrix and a vector of \(\mathbb{R}^n\)
\( x_1 \begin{bmatrix} a_1 \\ a_2 \\ \vdots \\ a_m \end{bmatrix} + x_2 \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_m \end{bmatrix} + \dots + x_n \begin{bmatrix} n_1 \\ n_2 \\ \vdots \\ n_m \end{bmatrix} = \underbrace{ \begin{bmatrix} a_1 & b_1 & \dots & n_1 \\ a_2 & b_2 & \dots & n_2 \\ \vdots & \vdots & \ddots & \vdots \\ a_m & b_m & \dots & n_m \\ \end {bmatrix} }_{m \times n} \underbrace{ \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \\ \end{bmatrix} }_{n \times 1} = \underbrace{ \begin{bmatrix} \vert & \vert & & \vert \\ \vert & \vert & & \vert \\ \mathbf{v_1} & \mathbf{v_2} & \dots & \mathbf{v_n} \\ \vert & \vert & & \vert \\ \vert & \vert & & \vert \\ \end {bmatrix} }_{n \,\,\text{cols}} \underbrace{ \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \\ \end{bmatrix} }_{n \,\,\text{rows}} = x_1\mathbf{v_1} + x_2\mathbf{v_2} + \dots + x_n\mathbf{v_n} \)
\( \begin{bmatrix*}[r] 4 & 3 & 1 \\ -1 & 2 & 5 \\ \end {bmatrix*} \begin{bmatrix*}[r] 1 \\ -2 \\ 0 \\ \end{bmatrix*} = (1)\begin{bmatrix*}[r]4\\-1\\\end{bmatrix*} + (-2)\begin{bmatrix*}[r]3\\2\\\end{bmatrix*} + (0)\begin{bmatrix*}[r]1\\5\\\end{bmatrix*} = \begin{bmatrix*}[r]4+(-2)3\\-1+(-2)2\\\end{bmatrix*} = \begin{bmatrix*}[r]-2\\-5\\\end{bmatrix*} \)
Putting it all together: written forms and problem statements#
1 Linear System
\( \begin{aligned} x_1 && - && 3x_2 && + && x_3 && = && 5 \\ 6x_1 && + && 4x_2 && - && x_3 && = && 8 \\ \end {aligned} \)
2 Augmented Matrix
\( \left [ \begin{matrix*}[r] 1 & -3 & 1 \\ 6 & 4 & -1 \\ \end {matrix*} \left | \begin{matrix*}[r] 5 \\ 8 \\ \end {matrix*} \right. \right] \)
Is the linear system (with the given augmented matrix) consistent?
3 Vector Equation (Linear Combination)
\( x_1 \begin{bmatrix*}[r] 1 \\ 6 \\ \end{bmatrix*} + x_2 \begin{bmatrix*}[r] -3 \\ 4 \\ \end{bmatrix*} + x_3 \begin{bmatrix*}[r] 1 \\ -1 \\ \end{bmatrix*} = \begin{bmatrix*}[r] 5 \\ 8 \\ \end{bmatrix*} \)
Is a given vector a linear combination of a given set of vectors?
Does the vector equation have at least one solution?
Solve the vector equation.
Is a given vector in the span of a given set of vectors? (Is a given vector in the (hyper)plane spanned by a given set of vectors?)
4 Matrix Equation
\( \begin{bmatrix*}[r] 1 & -3 & 1 \\ 6 & 4 & -1 \\ \end {bmatrix*} \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} = \begin{bmatrix*}[r] 5 \\ 8 \\ \end{bmatrix*} \)
Does the matrix equation have at least one solution?
Solve the matrix equation.
Example
1
\( \begin{aligned} 4x_1 && - && x_2 && = && 8 \\ 5x_1 && + && 3x_2 && = && 2 \\ 3x_1 && - && x_2 && = && 1 \\ \end {aligned} \)
2
\( \left [ \begin{matrix*}[r] 4 & -1 \\ 5 & 3 \\ 3 & -1 \\ \end {matrix*} \left | \begin{matrix*}[r] 8 \\ 2 \\ 1 \\ \end {matrix*} \right. \right] \)
3
\( x_1 \begin{bmatrix*}[r] 4 \\ 5 \\ 3 \\ \end{bmatrix*} + x_2 \begin{bmatrix*}[r] -1 \\ 3 \\ -1 \\ \end{bmatrix*} = \begin{bmatrix*}[r] 8 \\ 2 \\ 1 \\ \end{bmatrix*} \)
4
\( \begin{bmatrix*}[r] 4 & -1 \\ 5 & 3 \\ 3 & -1 \\ \end {bmatrix*} \begin{bmatrix*}[r] x_1 \\ x_2 \\ \end{bmatrix*} = \begin{bmatrix*}[r] 8 \\ 2 \\ 1 \\ \end{bmatrix*} \)
Example
1
\( \begin{aligned} 4x_1 && - && x_2 && = && 8 \\ 5x_1 && + && 3x_2 && = && 2 \\ 3x_1 && - && x_2 && = && 1 \\ \end {aligned} \)
2
\( \left [ \begin{matrix*}[r] 4 & -1 \\ 5 & 3 \\ 3 & -1 \\ \end {matrix*} \left | \begin{matrix*}[r] 8 \\ 2 \\ 1 \\ \end {matrix*} \right. \right] \)
3
\( x_1 \begin{bmatrix*}[r] 4 \\ 5 \\ 3 \\ \end{bmatrix*} + x_2 \begin{bmatrix*}[r] -1 \\ 3 \\ -1 \\ \end{bmatrix*} = \begin{bmatrix*}[r] 8 \\ 2 \\ 1 \\ \end{bmatrix*} \)
4
\( \begin{bmatrix*}[r] 4 & -1 \\ 5 & 3 \\ 3 & -1 \\ \end {bmatrix*} \begin{bmatrix*}[r] x_1 \\ x_2 \\ \end{bmatrix*} = \begin{bmatrix*}[r] 8 \\ 2 \\ 1 \\ \end{bmatrix*} \)
Examples#
Example#
PROBLEM STATEMENT
Solve the matrix equation
\( \begin{bmatrix*}[r] 1 & 2 & -1 \\ -3 & -4 & 2 \\ 5 & 2 & 3 \\ \end {bmatrix*} \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} = \begin{bmatrix*}[r] 1 \\ 2 \\ -3 \\ \end{bmatrix*} \)
In other words, for the vector
\( \mathbf{b} = \begin{bmatrix*}[r] 1 \\ 2 \\ -3 \\ \end{bmatrix*} \)
does there exist at least one vector
\( \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix} \)
such that the matrix equation \(\mathbf{Ax = b}\) is true?
\( \underset{\mathbf{A}}{ \begin{bmatrix*}[r] 1 & 2 & -1 \\ -3 & -4 & 2 \\ 5 & 2 & 3 \\ \end {bmatrix*} } \underset{\mathbf{x}}{ \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} } = \underset{\mathbf{b}}{ \begin{bmatrix*}[r] 1 \\ 2 \\ -3 \\ \end{bmatrix*} } \)
ROW REDUCE
Transform the matrix equation representation into its augmented matrix representation and row reduce.
\( \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ -3 & -4 & 2 \\ 5 & 2 & 3 \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 2 \\ -3 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, r_2 + 3r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ 0 & 2 & -1 \\ 5 & 2 & 3 \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 5 \\ -3 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, r_3 - 5r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ 0 & \boxed{2} & -1 \\ 0 & -8 & 8 \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 5 \\ -8 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ 0 & \boxed{2} & -1 \\ 0 & -8 & 8 \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 5 \\ -8 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, r_3 + 4r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ 0 & \boxed{2} & -1 \\ 0 & 0 & \boxed{4} \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 5 \\ 12 \\ \end {matrix*} \right. \right] }_{\textbf{row echelon}} \underset{r_3 \leftarrow\,\,\, \frac{1}{4} r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ 0 & \boxed{2} & -1 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 5 \\ 3 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ 0 & \boxed{2} & -1 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 5 \\ 3 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, r_2 + r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 2 & -1 \\ 0 & \boxed{2} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 1 \\ 8 \\ 3 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow\,\,\, r_1 + r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 2 & 0 \\ 0 & \boxed{2} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 4 \\ 8 \\ 3 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & 2 & 0 \\ 0 & \boxed{2} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 4 \\ 8 \\ 3 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, \frac{1}{2} r_2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & 2 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 4 \\ 4 \\ 3 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow\,\,\, r_1 - 2r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] -4 \\ 4 \\ 3 \\ \end {matrix*} \right. \right] }_{\textbf{reduced}} \)
CONSISTENCY
The linear system is consistent and the unique solution to the matrix equation is
\( \mathbf{x} = \begin{bmatrix*}[r] -4 \\ 4 \\ 3 \\ \end {bmatrix*} \)
What we can say then is that
\( \begin{bmatrix*}[r] -4 \\ 4 \\ 3 \\ \end{bmatrix*} \in \text{span} \left \{ \begin{bmatrix*}[r] 1 \\ -3 \\ 5 \\ \end{bmatrix*}, \begin{bmatrix*}[r] 2 \\ -4 \\ 2 \\ \end{bmatrix*}, \begin{bmatrix*}[r] -1 \\ 2 \\ 3 \\ \end{bmatrix*} \right\} \)
Example#
PROBLEM STATEMENT
Which vectors of \(\mathbb{R}^3\) can be written as linear combinations of the following vectors? (i.e., which vectors are in their span?)
\( \begin{bmatrix*}[r] 1 \\ -2 \\ 4 \\ \end{bmatrix*}, \begin{bmatrix*}[r] -2 \\ 2 \\ -1 \\ \end{bmatrix*}, \begin{bmatrix*}[r] -1 \\ 0 \\ 3 \\ \end{bmatrix*} \)
In other words, for which vectors
\( \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix} \)
does there exist at least one vector
\( \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix} \)
such that the following matrix equation \(\mathbf{Ax = b}\) is true?
\( \underset{\mathbf{A}}{ \begin{bmatrix*}[r] 1 & -2 & -1 \\ -2 & 2 & 0 \\ 4 & -1 & 3 \\ \end {bmatrix*} } \underset{\mathbf{x}}{ \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} } = \underset{\mathbf{b}}{ \begin{bmatrix*}[r] b_1 \\ b_2 \\ b_3 \\ \end{bmatrix*} } \)
ROW REDUCE
Transform the matrix equation representation into its augmented matrix representation and row reduce.
\( \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ -2 & 2 & 0 \\ 4 & -1 & 3 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ b_2 \\ b_3 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, r_2 + 2r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ 0 & -2 & -2 \\ 4 & -1 & 3 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ 2b_1 + b_2 \\ b_3 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, r_3 + (-4)r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ 0 & \boxed{-2} & -2 \\ 0 & 7 & 7 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ 2b_1 + b_2 \\ -4b_1 + b_3 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ 0 & \boxed{-2} & -2 \\ 0 & 7 & 7 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ 2b_1 + b_2 \\ -4b_1 + b_3 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, 2r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ 0 & \boxed{-2} & -2 \\ 0 & 14 & 14 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ 2b_1 + b_2 \\ -8b_1 + 2b_3 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, r_3 + 7r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ 0 & \boxed{-2} & -2 \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ 2b_1 + b_2 \\ \textcolor{yellow}{6b_1 + 7b_2 + 2b_3} \\ \end {matrix*} \right. \right] }_{\textbf{row echelon}} \)
\( \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ 0 & \boxed{-2} & -2 \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ 2b_1 + b_2 \\ \textcolor{yellow}{6b_1 + 7b_2 + 2b_3} \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, (-\frac{1}{2}) r_2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{1} & -2 & -1 \\ 0 & \boxed{1} & 1 \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ -b_1 - \frac{1}{2} b_2 \\ \textcolor{yellow}{6b_1 + 7b_2 + 2b_3} \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow\,\,\, r_1 + 2r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 & 1 \\ 0 & \boxed{1} & 1 \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] -b_1 - b_2 \\ -b_1 - \frac{1}{2} b_2 \\ \textcolor{yellow}{6b_1 + 7b_2 + 2b_3} \\ \end {matrix*} \right. \right] }_{\textbf{reduced}} \)
CONSISTENCY
The linear system is consistent iff \(0 = 6b_1 + 7b_2 + 2b_3\) .
When the linear system is consistent the basic variables can be expressed in terms of the free variables and the solution set is
\( \begin{aligned} x_1 + x_3 &= -b_1 - b_2 && \iff && x_1 = -x_3 - b_1 - b_2 \\ x_2 + x_3 &= -b_1 - \frac{1}{2} b_2 && \iff && x_2 = -x_3 - b_1 - \frac{1}{2} b_2 \\ \end {aligned} \)
Thus, there are vectors \(\mathbf{b} \in \mathbb{R}^3\) that do not satisfy the linear equation \(0 = 6b_1 + 7b_2 + 2b_3\). (In other words, there are vectors \(\mathbf{b} \in \mathbb{R}^3\) such that \(0 \ne 6b_1 + 7b_2 + 2b_3\))
For example
\( \mathbf{b} = \begin{bmatrix} 1 \\ 1 \\ 1 \\ \end{bmatrix} \implies 6(1) + 7(1) + 2(1) \ne 1 \)
What we can say then is
\( \text{span} \left \{ \begin{bmatrix*}[r] 1 \\ -2 \\ 4 \\ \end{bmatrix*}, \begin{bmatrix*}[r] -2 \\ 2 \\ -1 \\ \end{bmatrix*}, \begin{bmatrix*}[r] -1 \\ 0 \\ 3 \\ \end{bmatrix*} \right\} \) consists of the set of vectors \(\mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix}\) satisfying the linear equation \(0 = 6b_1 + 7b_2 + 2b_3\).
Example#
PROBLEM STATEMENT
Do the columns of matrix \(\mathbf{A}\) span \(\mathbb{R}^3\)? (In other words, can every vector \(\mathbf{b} \in \mathbb{R}^3\) be written as a linear combination of the columns of the matrix \(\mathbf{A}\)?)
\( \mathbf{A} = \begin{bmatrix*}[r] 0 & 0 & 4 \\ 0 & -3 & -2 \\ -3 & 9 & -6 \\ \end {bmatrix*} \)
In other words, for all vectors
\( \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix} \)
does there exist at least one vector
\( \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix} \)
such that the matrix equation \(\mathbf{Ax = b}\) is true?
\( \underset{\mathbf{A}}{ \begin{bmatrix*}[r] 0 & 0 & 4 \\ 0 & -3 & -2 \\ -3 & 9 & -6 \\ \end {bmatrix*} } \underset{\mathbf{x}}{ \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} } = \underset{\mathbf{b}}{ \begin{bmatrix*}[r] b_1 \\ b_2 \\ b_3 \\ \end{bmatrix*} } \)
ROW REDUCE
Transform the matrix equation representation into its augmented matrix representation and row reduce.
\( \left [ \begin{matrix*}[r] \boxed{0} & 0 & 4 \\ 0 & -3 & -2 \\ -3 & 9 & -6 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ b_2 \\ b_3 \\ \end {matrix*} \right. \right] \underset{r_1 \leftrightarrow\,\,\, r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-3} & 9 & -6 \\ 0 & \boxed{-3} & -2 \\ 0 & 0 & \boxed{4} \\ \end {matrix*} \left | \begin{matrix*}[r] b_3 \\ b_2 \\ b_1 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, \frac{1}{4} r_3}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{-3} & 9 & -6 \\ 0 & \boxed{-3} & -2 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] b_3 \\ b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] }_{\textbf{row echelon}} \)
\( \left [ \begin{matrix*}[r] \boxed{-3} & 9 & -6 \\ 0 & \boxed{-3} & -2 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] b_3 \\ b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, r_2 + 2r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-3} & 9 & -6 \\ 0 & \boxed{-3} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] b_3 \\ \frac{1}{2} b_1 + b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow\,\,\, r_1 + 6r_3}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-3} & 9 & 0 \\ 0 & \boxed{-3} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] \frac{3}{2} b_1 + b_3 \\ \frac{1}{2} b_1 + b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{-3} & 9 & 0 \\ 0 & \boxed{-3} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] \frac{3}{2} b_1 + b_3 \\ \frac{1}{2} b_1 + b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, (-\frac{1}{3})r_2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-3} & 9 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] \frac{3}{2} b_1 + b_3 \\ -\frac{1}{6} b_1 - \frac{1}{3} b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow\,\,\, r_1 + (-9)r_2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-3} & 0 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 3b_1 + 3b_2 + b_3 \\ -\frac{1}{6} b_1 - \frac{1}{3} b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{-3} & 0 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] 3b_1 + 3b_2 + b_3 \\ -\frac{1}{6} b_1 - \frac{1}{3} b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow\,\,\, (-\frac{1}{3})r_1}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 & 0 \\ 0 & \boxed{1} & 0 \\ 0 & 0 & \boxed{1} \\ \end {matrix*} \left | \begin{matrix*}[r] -b_1 - b_2 - \frac{1}{3} b_3 \\ -\frac{1}{6} b_1 - \frac{1}{3} b_2 \\ \frac{1}{4} b_1 \\ \end {matrix*} \right. \right] }_{\textbf{reduced}} \)
CONSISTENCY
The linear system is consistent and admits the solution
\(\{(-b_1 - b_2 - \frac{1}{3} b_3 \,\,,\,\, -\frac{1}{6} b_1 - \frac{1}{3} b_2 \,\,,\,\, \frac{1}{4} b_1)\}\)
Therefore, every vector \(\mathbf{b} \in \mathbb{R}^3\) can be written as a linear combination of the columns of the matrix \(\mathbf{A}\) and so the columns of the matrix \(\mathbf{A}\) do span \(\mathbb{R}^3\).
\( \begin{aligned} \begin{bmatrix*}[r] b_1 \\ b_2 \\ b_3 \end{bmatrix*} &= \begin{bmatrix*}[r] 0 & 0 & 4 \\ 0 & -3 & -2 \\ -3 & 9 & -6 \\ \end {bmatrix*} \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} = x_1 \begin{bmatrix*}[r] 0 \\ 0 \\ -3 \end{bmatrix*} + x_2 \begin{bmatrix*}[r] 0 \\ -3 \\ 9 \end{bmatrix*} + x_3 \begin{bmatrix*}[r] 4 \\ -2 \\ -6 \end{bmatrix*} \\ &= \left(-b_1 - b_2 - \frac{1}{3} b_3\right) \begin{bmatrix*}[r] 0 \\ 0 \\ -3 \end{bmatrix*} + \left(-\frac{1}{6} b_1 - \frac{1}{3} b_2\right) \begin{bmatrix*}[r] 0 \\ -3 \\ 9 \end{bmatrix*} + \left(\frac{1}{4} b_1\right) \begin{bmatrix*}[r] 4 \\ -2 \\ -6 \end{bmatrix*} \\ \end {aligned} \)
In other words
\( \text{span} \left \{ \begin{bmatrix*}[r] 0 \\ 0 \\ 4 \\ \end{bmatrix*}, \begin{bmatrix*}[r] 0 \\ -3 \\ -2 \\ \end{bmatrix*}, \begin{bmatrix*}[r] -3 \\ 9 \\ -6 \\ \end{bmatrix*} \right\} \) consists of the set of vectors \(\mathbf{b} \in \mathbb{R}^3\).
Example#
PROBLEM STATEMENT
Do the columns of matrix \(\mathbf{A}\) span \(\mathbb{R}^3\)? (In other words, can every vector \(\mathbf{b} \in \mathbb{R}^3\) be written as a linear combination of the columns of the matrix of \(\mathbf{A}\)?)
\( \mathbf{A} = \begin{bmatrix*}[r] -8 & 0 & 4 \\ 7 & -3 & -2 \\ 3 & 9 & -6 \\ \end {bmatrix*} \)
In other words, for all vectors
\( \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix} \)
does there exist at least one vector
\( \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix} \)
such that the matrix equation \(\mathbf{Ax = b}\) is true?
\( \underset{\mathbf{A}}{ \begin{bmatrix*}[r] -8 & 0 & 4 \\ 7 & -3 & -2 \\ 3 & 9 & -6 \\ \end {bmatrix*} } \underset{\mathbf{x}}{ \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} } = \underset{\mathbf{b}}{ \begin{bmatrix*}[r] b_1 \\ b_2 \\ b_3 \\ \end{bmatrix*} } \)
ROW REDUCE
Transform the matrix equation representation into its augmented matrix representation and row reduce.
\( \left [ \begin{matrix*}[r] \boxed{-8} & 0 & 4 \\ 7 & -3 & -2 \\ 3 & 9 & -6 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ b_2 \\ b_3 \\ \end {matrix*} \right. \right] \underset{r_2 \leftarrow\,\,\, r_2 + \frac{7}{8} r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-8} & 0 & 4 \\ 0 & -3 & \frac{3}{2} \\ 3 & 9 & -6 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ \frac{7}{8} b_1 + b_2 \\ b_3 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, r_3 + \frac{3}{8} r_1}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-8} & 0 & 4 \\ 0 & -3 & \frac{3}{2} \\ 0 & 9 & -\frac{9}{2} \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ \frac{7}{8} b_1 + b_2 \\ \frac{3}{8} b_1 + b_3 \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{-8} & 0 & 4 \\ 0 & -3 & \frac{3}{2} \\ 0 & 9 & -\frac{9}{2} \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ \frac{7}{8} b_1 + b_2 \\ \frac{3}{8} b_1 + b_3 \\ \end {matrix*} \right. \right] \underset{r_3 \leftarrow\,\,\, r_3 + 3r_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{-8} & 0 & 4 \\ 0 & \boxed{-3} & \frac{3}{2} \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ \frac{7}{8} b_1 + b_2 \\ \textcolor{yellow}{3b_1 + 3b_2 + b_3} \\ \end {matrix*} \right. \right] }_{\textbf{row echelon}} \underset{r_2 \leftarrow\,\,\, (-\frac{1}{3})r_2}{\rightarrow} \left [ \begin{matrix*}[r] \boxed{-8} & 0 & 4 \\ 0 & \boxed{1} & -\frac{1}{2} \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ -\frac{7}{24} b_1 - \frac{1}{3} b_2 \\ \textcolor{yellow}{3b_1 + 3b_2 + b_3} \\ \end {matrix*} \right. \right] \)
\( \left [ \begin{matrix*}[r] \boxed{-8} & 0 & 4 \\ 0 & \boxed{1} & -\frac{1}{2} \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] b_1 \\ -\frac{7}{24} b_1 - \frac{1}{3} b_2 \\ \textcolor{yellow}{3b_1 + 3b_2 + b_3} \\ \end {matrix*} \right. \right] \underset{r_1 \leftarrow\,\,\, (-\frac{1}{8})1_2}{\rightarrow} \underbrace{ \left [ \begin{matrix*}[r] \boxed{1} & 0 & -\frac{1}{2} \\ 0 & \boxed{1} & -\frac{1}{2} \\ 0 & 0 & 0 \\ \end {matrix*} \left | \begin{matrix*}[r] -\frac{1}{8} b_1 \\ -\frac{7}{24} b_1 - \frac{1}{3} b_2 \\ \textcolor{yellow}{3b_1 + 3b_2 + b_3} \\ \end {matrix*} \right. \right] }_{\textbf{reduced}} \)
CONSISTENCY
The linear system is consistent iff \(0 = 3b_1 + 3b_2 + b_3\) .
When the linear system is consistent the basic variables can be expressed in terms of the free variables and the solution set is
\( \begin{aligned} x_1 - \frac{1}{2} x_3 &= -\frac{1}{8} b_1 && \iff && x_1 = \frac{1}{2} x_3 - \frac{1}{8} b_1 \\ x_2 - \frac{1}{2} x_3 &= -\frac{7}{24} b_1 - \frac{1}{3} b_2 && \iff && x_2 = \frac{1}{2} x_3 - \frac{7}{24} b_1 - \frac{1}{3} b_2 \\ \end {aligned} \)
To address our original question, it is not the case that every vector \(\mathbf{b} \in \mathbb{R}^3\) can be written as a linear combination of the columns of the matrix \(\mathbf{A}\) and so the columns of the matrix \(\mathbf{A}\) do not span \(\mathbb{R}^3\).
This is because there are vectors \(\mathbf{b} \in \mathbb{R}^3\) that do not satisfy the linear equation \(0 = 3b_1 + 3b_2 + b_3\). (In other words, there are vectors \(\mathbf{b} \in \mathbb{R}^3\) such that \(0 \ne 3b_1 + 3b_2 + b_3\))
For example
\( \mathbf{b} = \begin{bmatrix} 1 \\ 1 \\ 1 \\ \end{bmatrix} \implies 3(1) + 3(1) + (1) \ne 1 \)
What we can say then is
\( \text{span} \left \{ \begin{bmatrix*}[r] -8 \\ 7 \\ 3 \\ \end{bmatrix*}, \begin{bmatrix*}[r] 0 \\ -3 \\ 9 \\ \end{bmatrix*}, \begin{bmatrix*}[r] 4 \\ -2 \\ -6 \\ \end{bmatrix*} \right\} \) consists of the set of vectors \(\mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix}\) satisfying the linear equation \(0 = 3b_1 + 3b_2 + b_3\).
Theorem#
Given an \(m \times n\) matrix \(\mathbf{A}\) and a vector \(\mathbf{b} \in \mathbb{R}^m\), the matrix equation \(\mathbf{Ax = b}\) has a solution iff the vector \(\mathbf{b}\) is a linear combination of the columns of the matrix \(\mathbf{A}\).
1. The vector \(\mathbf{b}\) is in the span of the columns of the matrix \(\mathbf{A}\).
2. The vector \(\mathbf{b} \in \mathbb{R}^m\) is a linear combination of the columns of the matrix \(\mathbf{A}\).
3. For the vector \(\mathbf{b} \in \mathbb{R}^m\) the matrix equation \(\mathbf{Ax = b}\) has a solution.
4. The matrix \(\mathbf{A}\) is row-equivalent to a row echelon matrix with a pivot in each row.
Example#
PROBLEM STATEMENT
For the given matrix \(\mathbf{A}\) does the matrix equation \(\mathbf{Ax = b}\) have a solution for every vector \(\mathbf{b} \in \mathbb{R}^4\)? (In other words, do the columns of matrix \(\mathbf{A}\) span \(\mathbb{R}^4\)? Can every vector \(\mathbf{b} \in \mathbb{R}^4\) be written as a linear combination of the columns of the matrix of \(\mathbf{A}\)?)
\( \mathbf{A} = \begin{bmatrix*}[r] 1 & 3 & 0 & 3 \\ -1 & -1 & -1 & 1 \\ 0 & -4 & 2 & -8 \\ 2 & 0 & 3 & 1 \\ \end {bmatrix*} \)
In other words, for all vectors
\( \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ b_4 \\ \end{bmatrix} \)
does there exist at least one vector
\( \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \\ \end{bmatrix} \)
such that the matrix equation \(\mathbf{Ax = b}\) is true?
\( \underset{\mathbf{A}}{ \begin{bmatrix*}[r] 1 & 3 & 0 & 3 \\ -1 & -1 & -1 & 1 \\ 0 & -4 & 2 & -8 \\ 2 & 0 & 3 & 1 \\ \end {bmatrix*} } \underset{\mathbf{x}}{ \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ x_4 \\ \end{bmatrix*} } = \underset{\mathbf{b}}{ \begin{bmatrix*}[r] b_1 \\ b_2 \\ b_3 \\ b_4 \\ \end{bmatrix*} } \)
ROW REDUCE
According to the previous theorem, it suffices to row reduce the matrix \(\mathbf{A}\) and check whether each row contains a pivot or not.
\( \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ -1 & -1 & -1 & 1 \\ 0 & -4 & 2 & -8 \\ 2 & 0 & 3 & 1 \\ \end {bmatrix*} \underset{r_2 \leftarrow\,\,\, r_2 + r_1}{\rightarrow} \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ 0 & 2 & -1 & 4 \\ 0 & -4 & 2 & -8 \\ 2 & 0 & 3 & 1 \\ \end {bmatrix*} \underset{r_4 \leftarrow\,\,\, r_4 + (-2)r_1}{\rightarrow} \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ 0 & \boxed{2} & -1 & 4 \\ 0 & -4 & 2 & -8 \\ 0 & -6 & 3 & -5 \\ \end {bmatrix*} \)
\( \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ 0 & \boxed{2} & -1 & 4 \\ 0 & -4 & 2 & -8 \\ 0 & -6 & 3 & -5 \\ \end {bmatrix*} \underset{r_3 \leftarrow\,\,\, r_3 + 2r_2}{\rightarrow} \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ 0 & \boxed{2} & -1 & 4 \\ \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} \\ 0 & -6 & 3 & -5 \\ \end {bmatrix*} \underset{r_3 \leftrightarrow\,\,\, r_4}{\rightarrow} \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ 0 & \boxed{2} & -1 & 4 \\ 0 & -6 & 3 & -5 \\ \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} \\ \end {bmatrix*} \)
\( \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ 0 & \boxed{2} & -1 & 4 \\ 0 & -6 & 3 & -5 \\ \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} \\ \end {bmatrix*} \underset{r_3 \leftarrow\,\,\, r_3 + 3r_2}{\rightarrow} \underbrace{ \begin{bmatrix*}[r] \boxed{1} & 3 & 0 & 3 \\ 0 & \boxed{2} & -1 & 4 \\ 0 & 0 & 0 & \boxed{7} \\ \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} & \textcolor{red}{0} \\ \end {bmatrix*} }_{\textbf{row echelon}} \)
CONSISTENCY
The linear system is consistent for a subset of \(\mathbb{R}^4\) which can be described parametrically by row reducing the augmented matrix.
To address our original question, the matrix \(\mathbf{A}\) is row-equivalent to a row echelon matrix containing at least one zero row and so according to the previous theorem the matrix equation \(\mathbf{Ax = b}\) has no solution for at least one vector \(\mathbf{b}\). (In other words, the columns of matrix \(\mathbf{A}\) do not span \(\mathbb{R}^4\).)
Example#
PROBLEM STATEMENT
Do the columns of matrix \(\mathbf{A}\) span \(\mathbb{R}^3\)? (In other words, can every vector \(\mathbf{b} \in \mathbb{R}^3\) be written as a linear combination of the columns of the matrix of \(\mathbf{A}\)?)
\( \mathbf{A} = \begin{bmatrix*}[r] 0 & 0 & 4 & -5 \\ 0 & -3 & -2 & 0 \\ -3 & 9 & 0 & 0 \\ \end {bmatrix*} \)
In other words, for all vectors
\( \mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix} \)
does there exist at least one vector
\( \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix} \)
such that the matrix equation \(\mathbf{Ax = b}\) is true?
\( \underset{\mathbf{A}}{ \begin{bmatrix*}[r] 0 & 0 & 4 & -5 \\ 0 & -3 & -2 & 0 \\ -3 & 9 & 0 & 0 \\ \end {bmatrix*} } \underset{\mathbf{x}}{ \begin{bmatrix*}[r] x_1 \\ x_2 \\ x_3 \\ \end{bmatrix*} } = \underset{\mathbf{b}}{ \begin{bmatrix*}[r] b_1 \\ b_2 \\ b_3 \\ \end{bmatrix*} } \)
ROW REDUCE
According to the previous theorem, it suffices to row reduce the matrix \(\mathbf{A}\) and check whether each row contains a pivot or not.
\( \begin{bmatrix*}[r] \boxed{0} & 0 & 4 & -5 \\ 0 & -3 & -2 & 0 \\ -3 & 9 & 0 & 0 \\ \end {bmatrix*} \underset{r_1 \leftrightarrow\,\,\, r_3}{\rightarrow} \underbrace{ \begin{bmatrix*}[r] \boxed{-3} & 9 & 0 & 0 \\ 0 & \boxed{-3} & -2 & 0 \\ 0 & 0 & \boxed{4} & -5 \\ \end {bmatrix*} }_{\textbf{row echelon}} \)
CONSISTENCY
The linear system is consistent for every vector \(\mathbf{b} \in \mathbb{R}^3\).
To address our original question, the matrix \(\mathbf{A}\) is row-equivalent to a row echelon matrix with a pivot in each row and so according to the previous theorem the matrix equation \(\mathbf{Ax = b}\) has a solution for each vector \(\mathbf{b}\). (In other words, the columns of matrix \(\mathbf{A}\) span \(\mathbb{R}^3\).)