8

Given a matrix A = \begin{bmatrix} 1 &2 &3 \\ 4 &5 &6 \\ 7 &8 &9 \end{bmatrix}

Determine if vector $b$ is in $span(A)$ where $$ b = \begin{bmatrix} 1 \\ 2 \\ 4 \end{bmatrix} $$

KNgu
  • 187
  • Do you know what it means for $b$ to be in the span of $A$? – Git Gud Oct 01 '16 at 20:43
  • 5
    No, I do not. Hence why I ask how would I determine if b is in the span of matrix A. – KNgu Oct 01 '16 at 20:47
  • 1
    OK. By definition it holds that $\operatorname{span}(A)=\left{Ax\colon x\in \mathbb R^{3\times 1}\right}$. Can you take it from here? Edit: And, if I understood correctly, then maybe you should be asking what the definition of $\operatorname{span}(A)$ is. – Git Gud Oct 01 '16 at 20:49
  • So the span would be the column spaces? – KNgu Oct 01 '16 at 20:51
  • Look at the following link: http://math.stackexchange.com/questions/56201/how-to-tell-if-a-set-of-vectors-spans-a-space – rannoudanames Oct 01 '16 at 20:52
  • "$b$ is in $span(A)$" means the vector $b$ is a linear combination of the column (row) vectors of $A$. –  Oct 01 '16 at 20:53
  • @Jack Thank you that makes sense. So if vector b is a subspace of matrix A then there exists a linear combination of span(A) to get vector b. Correct? – KNgu Oct 01 '16 at 20:56
  • @KNgu To answer the question you asked me in a comment: http://math.stackexchange.com/questions/218377/relationship-between-column-space-and-image-linear-algebra – Git Gud Oct 01 '16 at 20:57
  • @GitGud Thank you for your help, I understand what spans are now! – KNgu Oct 01 '16 at 21:05
  • @KNgu: There are several concepts you should know one by one in order to do this problem:
    • $span(A)$ is a set of all the linear combinations of the column vectors of $A$. Or equivalently, it is a set of all the linear combinations of the row vectors of $A$.
    • $A$ is a matrix, not a linear space. $span(A)$ (with the linear structure on it) is a linear space.
    • $b$ is a vector. One would never say $b$ is a "subspace" of some linear space.
    –  Oct 01 '16 at 21:08

3 Answers3

11

First we address $\mathrm{Span}(A)$,

$$\mathrm{Span}(A) = \left\{ \left[ \begin{array}{c} x_1\\ x_2\\ x_3\\ \end{array}\right] : \left[ \begin{array}{c} x_1\\ x_2\\ x_3\\ \end{array}\right] = a \left[\begin{array}{c} 1\\ 4\\ 7\\ \end{array}\right] + b \left[\begin{array}{c} 2\\ 5\\ 8\\ \end{array}\right] + c \left[\begin{array}{c} 3\\ 6\\ 9\\ \end{array}\right]. a,b,c \in \mathbb{R} \right\}.$$

From this definition we can see that asking if vector $\vec{b} \in \mathrm{Span}(A)$ is equivalent to asking if there exists a vector $\vec{x}$ such that $A\vec{x} = \vec{b}$,

because $$\vec{x} = \left[\begin{array}{c} x_1\\ x_2\\ x_3\\ \end{array}\right],$$

then $$A\vec{x} = \left[\begin{array}{ccc} 1 & 2 & 3\\ 4& 5 & 6\\ 7 & 8 & 9\\ \end{array}\right] \left[ \begin{array}{c} x_1\\ x_2\\ x_3 \end{array}\right] = x_1 \left[ \begin{array}{c} 1\\ 4\\ 7 \end{array}\right] + x_2 \left[ \begin{array}{c} 2\\ 5\\ 8 \end{array}\right] + x_3 \left[ \begin{array}{c} 3\\ 6\\ 9 \end{array}\right].$$

So if there exists $x_1, x_2, x_3$ such that the final line equals $\vec{b}$, then we know $\vec{b}$ is in $\mathrm{Span}(A)$. This means it suffices to ask if there exists a $\vec{x}$ such that $A\vec{x} = \vec{b}$.

This final equation is equivalent to the matrix equation:

$$\left[\begin{array}{ccc} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{array} \right] \vec{x} = \left[\begin{array}{c} 1\\ 2\\ 4\\ \end{array}\right],$$ which we can convert to the system:

$$\left[\begin{array}{ccc|c} 1 & 2 & 3 & 1\\ 4 & 5 & 6 & 2\\ 7 & 8 & 9 & 4\\ \end{array}\right].$$

As you might have learned, we solve this system by row reduction (I used technology for this step, your instructor may require row reduction by hand):

$$\mathrm{RREF}\left(\left[\begin{array}{ccc|c} 1 & 2 & 3 & 1\\ 4 & 5 & 6 & 2\\ 7 & 8 & 9 & 4\\ \end{array}\right]\right) = \left[\begin{array}{ccc|c} 1 & 0 & 0 & \frac{-4}{3}\\ 0 & 1 & 0 & \frac{8}{3} \\ 0 & 0 & 1 & -1\\ \end{array}\right]. $$

This implies the vector $\vec{x}$ we seek is given by: $$\vec{x} = \left[\begin{array}{c} \frac{-4}{3}\\ \frac{8}{3} \\ -1\\ \end{array} \right].$$

The existence of this $\vec{x}$ alone guarantees $\vec{b} \in \mathrm{Span}(A)$, but lets check our answer by computing $A\vec{x}$.

$$A\vec{x} = \left[\begin{array}{ccc} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{array} \right] \left[\begin{array}{c} \frac{-4}{3}\\ \frac{8}{3} \\ -1\\ \end{array} \right] = \left[\begin{array}{c} 1\\ 2 \\ 4\\ \end{array} \right], $$

as desired.

Some things to think about: are there any vectors in $\mathbb{R}^3$ that are not in Span($A$)? If so can you find them, if not can you justify it? Hope this answer helps!

Prince M
  • 4,113
  • Is the rule that as long as the matrix is consistent then it's in the span? – Aaron Franke Feb 09 '19 at 03:08
  • 2
    A vector $\vec{b}$ is in the span of the columns of a matrix $A = [\vec{v}_1 \dots \vec{v}_n]$ iff the augmented matrix $[ \vec{v}_1 \dots \vec{v}_n \vec{b} ]$ is consistent. – Prince M Feb 09 '19 at 20:02
2

Before doing any mathematical problems, one should know what each term in the problem means. (And so that you would be able to ask a better question.)

"$b$ is in $span(A)$" means the vector $b$ is a linear combination of the column (row) vectors of $A$.

1

You put the vector to the right (4th column) of the matrix and you do column reductions with respect to the first 3 columns. If the 4th column end up being zero it is in the span (and you may find which by doing the inverse of the column reductions).

Note that the property of the 4th column being in the span of the first 3 is preserved under the column reduction process (because it is invertible).

H. H. Rugh
  • 35,992