5.2 Spanning Sets and Linear Independence
Which vectors can be built from a given set, and is every vector in the set really needed? Both questions become a linear system โ and the pivots answer them.
A printer makes every colour on the page from a few inks; a dietitian builds a meal plan from a few foods; a sound engineer recreates a voice from a few pure tones. In each case two questions come up. Can a given target be made from the ingredients we have? And are all the ingredients needed, or could one of them be mixed from the others and thrown away?
In the language of Section 5.1 the first question asks whether a vector lies in a span, and the second asks whether a set of vectors is linearly independent. Both questions turn into linear systems, so the row reduction of Chapter 1 answers them. Together they prepare the central idea of Section 5.3: a basis, a set that spans with nothing wasted.
Linear Combinations and Spanning Sets
Recall (Definition 5.3) that a linear combination of $\mathbf{v}_1,\dots,\mathbf{v}_k$ is a vector $c_1\mathbf{v}_1+\dots+c_k\mathbf{v}_k$, and that $\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_k\}$ is the set of all of them. In $\mathbb{R}^n$ the vector equation $c_1\mathbf{v}_1+\dots+c_k\mathbf{v}_k=\mathbf{b}$ is, row by row, a system of $n$ linear equations in the unknowns $c_1,\dots,c_k$.
Let $\mathbf{v}_1,\dots,\mathbf{v}_k$ and $\mathbf{b}$ be vectors in $\mathbb{R}^n$, and let $A=\begin{bmatrix}\mathbf{v}_1&\mathbf{v}_2&\cdots&\mathbf{v}_k\end{bmatrix}$ be the $n\times k$ matrix with these vectors as its columns. Then $$\mathbf{b}\in\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_k\}\iff\text{the system with augmented matrix }\left[\begin{array}{c|c}A&\mathbf{b}\end{array}\right]\text{ is consistent}.$$ Any solution $(c_1,\dots,c_k)$ gives the weights in $\mathbf{b}=c_1\mathbf{v}_1+\dots+c_k\mathbf{v}_k$.
A set $\{\mathbf{v}_1,\dots,\mathbf{v}_k\}$ is a spanning set for a vector space $V$ (we also say the vectors span $V$) if $\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_k\}=V$ โ every vector of $V$ is a linear combination of them. For $V=\mathbb{R}^n$ there is a clean test.
Let $A=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_k\end{bmatrix}$ be an $n\times k$ matrix. The vectors $\mathbf{v}_1,\dots,\mathbf{v}_k$ span $\mathbb{R}^n$ if and only if an echelon form of $A$ has a pivot in every row. In particular, fewer than $n$ vectors can never span $\mathbb{R}^n$.
Why. If every row has a pivot, no row of $\left[\begin{array}{c|c}A&\mathbf{b}\end{array}\right]$ can reduce to $[\,0\ \cdots\ 0\mid\text{nonzero}\,]$, so $A\mathbf{c}=\mathbf{b}$ is consistent for every $\mathbf{b}$. If some row has no pivot, choosing $\mathbf{b}$ to put a nonzero number in that row of the reduced augmented matrix and undoing the row operations gives a $\mathbf{b}$ that cannot be reached. Since there are at most $k$ pivots, $k\lt n$ vectors leave some row without one.
The same method works in any vector space once we compare coefficients.
Linear Independence
In Example 2(b) the vector $(1,2,1)$ was redundant: it was already a combination of the other two, so removing it did not shrink the span. Linear independence is the precise way to say that a set has no redundant vectors.
Let $A=\begin{bmatrix}\mathbf{v}_1&\cdots&\mathbf{v}_k\end{bmatrix}$ have the vectors $\mathbf{v}_1,\dots,\mathbf{v}_k\in\mathbb{R}^n$ as columns. The vectors are linearly independent if and only if $A\mathbf{c}=\mathbf{0}$ has only the trivial solution, that is, if and only if every column of $A$ is a pivot column (there are no free variables). Each free variable gives a dependence relation, and the reduced row echelon form displays it: row operations do not change the linear relations among the columns, so if a non-pivot column of the reduced matrix has entries $r_1,\dots,r_p$ in its pivot rows, then $\mathbf{v}_j=r_1\times(\text{first pivot column of }A)+\dots+r_p\times(\text{$p$-th pivot column of }A)$.
- Quick looks first. Is $\mathbf{0}$ in the set? Are two vectors multiples of each other? Are there more vectors than entries ($k\gt n$)? Any "yes" means dependent (Theorems 5.8 and 5.9 below).
- Otherwise put the vectors in the columns of a matrix (for polynomials or matrices, use their coefficients or entries) and row reduce.
- Every column a pivot column $\Rightarrow$ independent. A free column $\Rightarrow$ dependent: set that free variable to $1$ (others to $0$) and read off a dependence relation.
- Check the relation by substituting the original vectors.
Let $S=\{\mathbf{v}_1,\dots,\mathbf{v}_k\}$ be vectors in a vector space $V$.
- If $\mathbf{0}\in S$, then $S$ is linearly dependent (take weight $1$ on $\mathbf{0}$ and $0$ on the rest).
- Two vectors $\{\mathbf{u},\mathbf{v}\}$ are linearly dependent if and only if one is a scalar multiple of the other.
- For $k\ge2$, $S$ is linearly dependent if and only if at least one of the vectors is a linear combination of the others.
Proof of 3. If $c_1\mathbf{v}_1+\dots+c_k\mathbf{v}_k=\mathbf{0}$ with some $c_j\ne0$, divide by $c_j$ and solve for $\mathbf{v}_j$. Conversely, $\mathbf{v}_j=\sum_{i\ne j}a_i\mathbf{v}_i$ rearranges to a relation in which $\mathbf{v}_j$ has weight $-1\ne0$.
1. "Dependent" does not mean every vector is a combination of the others. In $\{(1,0),(2,0),(0,1)\}$ the first two are dependent, but $(0,1)$ is not a combination of $(1,0)$ and $(2,0)$. Theorem 5.8 says at least one vector is.
2. Checking pairs is not enough. $(1,0,1)$, $(0,1,1)$, $(1,1,2)$: no vector is a multiple of another, yet the third is the sum of the first two.
3. The converse of Theorem 5.9 is false. Having $k\le n$ vectors does not make them independent โ $(1,2,3)$ and $(2,4,6)$ are dependent in $\mathbb{R}^3$.
4. Pivot columns of $A$, not of the reduced matrix. Row operations change the column vectors; they keep the relations between columns. Use the reduced matrix to find the relation, then state it for the original vectors.
What independence looks like
For polynomials and matrices we test independence by comparing coefficients or entries, exactly as in Example 3.
Exercises
- 1 Write $\mathbf{b}=(5,3)$ as a linear combination of $(1,2)$ and $(3,-1)$.
- 2 Is $(2,5,3)$ in $\operatorname{span}\{(1,1,0),(0,1,1)\}$? If so, give the weights.
- 3 Is $(1,2,3)$ in $\operatorname{span}\{(1,1,0),(0,1,1)\}$?
- 4 For which value of $h$ is $(1,h,7)$ in $\operatorname{span}\{(1,2,1),(0,1,3)\}$?
- 5 Do $(1,2)$ and $(3,6)$ span $\mathbb{R}^2$? Describe their span.
- 6 Do $(1,2)$, $(2,1)$ and $(1,1)$ span $\mathbb{R}^2$?
- 7 Do $(1,0,1)$, $(2,1,0)$ and $(0,1,-2)$ span $\mathbb{R}^3$? If not, find an equation of their span.
- 8 Is $1+x^2$ in $\operatorname{span}\{1+x,\ x-x^2\}$ in $P_2$?
- 9 Is $\begin{bmatrix}1&2\\3&4\end{bmatrix}$ in the span of $\begin{bmatrix}1&0\\0&1\end{bmatrix}$, $\begin{bmatrix}0&1\\1&0\end{bmatrix}$, $\begin{bmatrix}1&1\\0&0\end{bmatrix}$?
- 10 Show that $\operatorname{span}\{(1,-1,0)\}=\operatorname{span}\{(1,-1,0),(2,-2,0)\}$ and describe this set.
- 1 $(1,2)$, $(-2,-4)$
- 2 $(1,2)$, $(2,1)$
- 3 $(1,0,0)$, $(1,1,0)$, $(1,1,1)$
- 4 $(1,2,-1)$, $(0,1,4)$, $(2,5,2)$
- 5 $(1,2,3)$, $(0,0,0)$, $(4,1,2)$
- 6 $(1,1)$, $(1,-1)$, $(3,5)$
- 7 $(1,0,2,1)$, $(0,1,1,-1)$, $(1,1,3,0)$
- 8 $(1,1,0,0)$, $(0,1,1,0)$, $(0,0,1,1)$, $(1,0,0,1)$
- 9 For which values of $k$ are $(1,k)$ and $(k,4)$ linearly dependent?
- 10 $1+x$, $1-x$, $x^2$ in $P_2$
- 11 $1+x$, $x+x^2$, $1-x^2$ in $P_2$
- 12 $\begin{bmatrix}1&0\\0&0\end{bmatrix}$, $\begin{bmatrix}1&1\\0&0\end{bmatrix}$, $\begin{bmatrix}1&1\\1&0\end{bmatrix}$, $\begin{bmatrix}1&1\\1&1\end{bmatrix}$ in $M_{2\times2}$
- 1 True or false (explain): if $\{\mathbf{u},\mathbf{v},\mathbf{w}\}$ is linearly dependent, then $\mathbf{w}$ is a linear combination of $\mathbf{u}$ and $\mathbf{v}$.
- 2 True or false: any four vectors in $\mathbb{R}^3$ are linearly dependent.
- 3 True or false: if $\{\mathbf{u},\mathbf{v}\}$ is independent and $\mathbf{w}\notin\operatorname{span}\{\mathbf{u},\mathbf{v}\}$, then $\{\mathbf{u},\mathbf{v},\mathbf{w}\}$ is independent.
- 4 True or false: every nonempty subset of a linearly independent set is linearly independent.
- 5 Prove that if $\{\mathbf{u},\mathbf{v}\}$ is linearly independent, then so is $\{\mathbf{u}+\mathbf{v},\ \mathbf{u}-\mathbf{v}\}$.
- 6 Nutrition. One serving of food A contains $10$ g protein, $20$ g carbohydrate and $5$ g fat; food B contains $5$ g, $10$ g and $10$ g; food C contains $0$ g, $10$ g and $2$ g. How many servings of each give exactly $25$ g protein, $80$ g carbohydrate and $26$ g fat? Why is the answer unique?
- 7 Chemistry. Write each substance in $\mathrm{C_3H_8+O_2\to CO_2+H_2O}$ as a vector of (carbon, hydrogen, oxygen) atoms. Explain why balancing the equation means finding a dependence relation among four vectors in $\mathbb{R}^3$, and balance it with the smallest whole numbers.
- 8 Challenge. Let $\mathbf{u},\mathbf{v}\in\mathbb{R}^3$ be linearly independent and $\mathbf{w}=\mathbf{u}\times\mathbf{v}$. Prove that $\{\mathbf{u},\mathbf{v},\mathbf{w}\}$ is linearly independent. (Hint: take the dot product of a relation with $\mathbf{w}$.)
Research question. A farm supplier stocks four fertilisers. Is one of them redundant โ can its nutrient content be mixed exactly from the other three?
Why it matters. Fertiliser is described by its NโPโK content (percent nitrogen, phosphate and potash by mass), so each product is a vector in $\mathbb{R}^3$. Four vectors in $\mathbb{R}^3$ are always dependent, so in principle one product can be blended from the others. Agronomists in India, Kenya, Brazil and Oman use exactly this reasoning to cut costs, reduce storage and plan blends when a product is out of stock.
What to do.
- Sample case: urea $(46,0,0)$, diammonium phosphate (DAP) $(18,46,0)$, muriate of potash (MOP) $(0,0,60)$ and a compound "15โ15โ15" $(15,15,15)$ โ each in kg of nutrient per 100 kg of product.
- Find the weights $a,b,c$ with $a(46,0,0)+b(18,46,0)+c(0,0,60)=(15,15,15)$ by back substitution, and write the dependence relation among the four vectors.
- Interpret: how many kg of urea, DAP and MOP supply the same nutrients as 1 kg of 15โ15โ15? How many kg of inert filler would make the mixture weigh 1 kg?
- Look up current local prices for the four products and decide which is cheaper per kg of nutrient: buying the compound, or blending.
Tools: Calculator or spreadsheet; optionally Python/sympy for exact fractions.
Hand in: A half-page note with the weights, the dependence relation, the price comparison and one practical reason (granule size, mixing evenly, storage) why a farmer might still buy the compound.
Going further. Add a fifth product, e.g. single superphosphate $(0,16,0)$. Now there are many blends; which one is cheapest? This is the start of linear programming.
๐งช Self-check quiz
Q1. Vectors $\mathbf{v}_1,\dots,\mathbf{v}_k$ are linearly independent when $c_1\mathbf{v}_1+\dots+c_k\mathbf{v}_k=\mathbf{0}$
Q2. The set $\{(1,2),(3,6)\}$ is
Q3. Any $5$ vectors in $\mathbb{R}^4$ are
Q4. The reduced row echelon form of $\begin{bmatrix}\mathbf{v}_1&\mathbf{v}_2&\mathbf{v}_3\end{bmatrix}$ is $\begin{bmatrix}1&0&2\\0&1&-1\\0&0&0\end{bmatrix}$. Which is true?
Q5. Is $(1,2,3)$ in $\operatorname{span}\{(1,0,0),(0,1,0)\}$?