Linear Algebra and Its Applications, Exercise 2.3.7

Exercise 2.3.7. For each of the following, state whether the vector $b$ is in the subspace spanned by $w_1, \dotsc, w_l$. (Construct a matrix $A$ with $w_1, \dotsc, w_l$ as the columns, and try to solve $Ax = b$.)

a) $w_1 = (1, 1, 0)$, $w_2 = (2, 2, 1)$, $w_3 = (0, 0, 2)$, $b = (3, 4, 5)$

b) $w_1 = (1, 2, 0)$, $w_2 = (2, 5, 0)$, $w_3 = (0, 0, 2)$, $w_4 = (0, 0, 0)$, any $b$

Answer: a) We construct the matrix

$A = \begin{bmatrix} 1&2&0 \\ 1&2&0 \\ 0&1&2 \end{bmatrix}$

and do Gaussian elimination on the left and right hand sides of $Ax = b$:

$\begin{bmatrix} 1&2&0&\vline&3 \\ 1&2&0&\vline&4 \\ 0&1&2&\vline&5 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&2&0&\vline&3 \\ 0&0&0&\vline&1 \\ 0&1&2&\vline&5 \end{bmatrix}$

$\Rightarrow \begin{bmatrix} 1&2&0&\vline&3 \\ 0&1&2&\vline&5 \\ 0&0&0&\vline&1 \end{bmatrix}$

From the third equation we have the contradiction $0 = 1$ and we conclude that $Ax = b$ has no solution in this case. The vector $b = (3, 4, 5)$ is therefore not in the subspace spanned by $w_1$, $w_2$,  and $w_3$.

b) We construct the matrix

$A = \begin{bmatrix} 1&2&0&0 \\ 2&5&0&0 \\ 0&0&2&0 \end{bmatrix}$

and do Gaussian elimination on the left and right hand sides of $Ax = b$:

$\begin{bmatrix} 1&2&0&0&\vline&b_1 \\ 2&5&0&0&\vline&b_2 \\ 0&0&2&0&\vline&b_3 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&2&0&0&\vline&b_1 \\ 0&1&0&0&\vline&b_2 - 2b_1 \\ 0&0&2&0&\vline&b_3 \end{bmatrix}$

The pivots are in columns 1 through 3 and the basic variables are $x_1$, $x_2$, and $x_3$ with $x_4$ being a free variable. The first three columns of the original matrix are thus linearly independent; the fourth column is a linear combination of the others. Since the first three columns $w_1$, $w_2$, and $w_3$ are vectors in $\mathbf{R}^3$ and are linearly independent, they span all of $\mathbf{R}^3$ and thus any vector $b = (b_1, b_2, b_3)$ can be represented as a linear combination of $w_1$, $w_2$, and $w_3$ using suitable weights.

Going further, from the third equation we have $2x_3 = b_3$ or $x_3 = b_3/2$. From the second equation we have $x_2 = b_2 - 2b_1$. From the first equation we have

$x_1 + 2x_2 = b_1 \rightarrow x_1 + 2(b_2 - 2b_1) = b_1$

$\rightarrow x_1 + 2b_2 -4b_1 = b_1 \rightarrow x_1 = 5b_1 - 2b_2$

The equation $Ax = b$ is equivalent to

$\begin{bmatrix} 1&2&0&0 \\ 2&5&0&0 \\ 0&0&2&0 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}$

$\rightarrow x_1 \begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix} + x_2 \begin{bmatrix} 2 \\ 5 \\ 0 \end{bmatrix} + x_3 \begin{bmatrix} 0 \\ 0 \\ 2 \end{bmatrix} + x_4 \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}$

Dropping the zero vector $w_4$ we can therefore represent any vector $b$ in $\mathbf{R}^n$ as a linear combination of $w_1$, $w_2$, and $w_3$ as follows:

$\begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix} = (5b_1 - 2b_2) \begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix} + (b_2 - 2b_1) \begin{bmatrix} 2 \\ 5 \\ 0 \end{bmatrix} + (b_3/2) \begin{bmatrix} 0 \\ 0 \\ 2 \end{bmatrix}$

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

This entry was posted in linear algebra. Bookmark the permalink.