Chapter 6 Exercises — Subspaces, Span, and Linear Independence

How to use these. Work the ⭐ problems first to lock in the concepts (no computation needed). The ⭐⭐ problems are by-hand calculations — span membership, independence by row reduction, small determinants. The ⭐⭐⭐ problems split into proofs (the A track) and coding with numpy (the C track); do the ones that match your path, but the strongest students do both. The ⭐⭐⭐⭐ problems are applied: find the subspace/span/independence structure hiding in a real system. Tags: [hand] = pencil only, [code] = needs numpy, [proof] = rigorous argument, [essay] = written explanation.


Tier ⭐ — Conceptual (what is / why)

6.1 [hand] State the three conditions a subset $W$ of a vector space must satisfy to be a subspace. Which one is the fastest to check, and why does it disqualify so many candidates immediately?

6.2 [hand] Explain in one or two sentences why every subspace must contain the zero vector. Then give an example of a line in $\mathbb{R}^2$ that is not a subspace, and say which condition it fails.

6.3 [hand] In your own words, define the span of a set of vectors. What geometric object is the span of (a) one nonzero vector in $\mathbb{R}^2$, (b) two non-parallel vectors in $\mathbb{R}^3$, (c) three vectors that point out of each other's plane in $\mathbb{R}^3$?

6.4 [hand] Give the abstract definition of linear independence (the statement about the only combination reaching $\mathbf{0}$). Then translate it into the geometric statement about redundancy.

6.5 [hand] Explain the difference between "the set spans $\mathbb{R}^3$" and "the set is linearly independent." Give one set of vectors that spans $\mathbb{R}^3$ but is not independent, and one that is independent but does not span $\mathbb{R}^3$.

6.6 [hand] Why is any set of vectors that contains the zero vector automatically linearly dependent? Exhibit the nontrivial combination that proves it.

6.7 [hand] Define a basis in terms of span and independence. Why does a basis of $\mathbb{R}^n$ need exactly $n$ vectors — neither more nor fewer?

6.8 [hand] A friend says, "If I have five vectors in $\mathbb{R}^5$, they must be a basis." Is this true? Explain what is required, and give a counterexample to the claim as stated.


Tier ⭐⭐ — Computation by hand

6.9 [hand] Decide whether each subset of $\mathbb{R}^2$ is a subspace; if not, name the failing condition: (a) $\{(x, y) : y = 2x\}$; (b) $\{(x, y) : y = 2x + 1\}$; (c) $\{(x, y) : xy = 0\}$ (the two axes); (d) $\{(x, y) : x = y\}$; (e) $\{(0, 0)\}$.

6.10 [hand] Is $\mathbf{b} = (4, 5, 6)$ in $\operatorname{span}\{(1, 2, 3),\ (2, 1, 0)\}$? Set up the linear system, solve it by hand, and if it is in the span, give the recipe (the coefficients).

6.11 [hand] Is $\mathbf{b} = (3, 3, 3)$ in $\operatorname{span}\{(1, 1, 0),\ (0, 1, 1)\}$? Set up and solve the system; if it is not in the span, identify the equation that becomes impossible.

6.12 [hand] Determine by row reduction whether each set is independent. For dependent sets, give an explicit nontrivial combination equal to $\mathbf{0}$. (a) $(1, 2),\ (3, 6)$; (b) $(1, 0, 1),\ (0, 1, 1),\ (1, 1, 0)$; (c) $(1, 2, 3),\ (2, 1, 0),\ (4, 5, 6)$.

6.13 [hand] For each square set of vectors, compute the determinant of the matrix whose columns are the vectors, and state whether the set is independent: (a) $(2, 0),\ (0, 3)$; (b) $(1, 2),\ (2, 4)$; (c) $(1, 0, 1),\ (0, 1, 1),\ (1, 1, 0)$.

6.14 [hand] Three vectors live in $\mathbb{R}^2$: $(1, 2),\ (3, 4),\ (5, 6)$. Without any arithmetic beyond counting, explain why they must be dependent. Then find a nontrivial combination equal to $\mathbf{0}$ (hint: row reduce the $2 \times 3$ matrix).

6.15 [hand] The vectors $\mathbf{v}_1 = (1, 1, 1),\ \mathbf{v}_2 = (0, 1, 1),\ \mathbf{v}_3 = (0, 0, 1)$ form a basis of $\mathbb{R}^3$. Find the unique coordinates of $\mathbf{w} = (2, 5, 9)$ in this basis (solve $c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + c_3\mathbf{v}_3 = \mathbf{w}$ by hand).

6.16 [hand] Show by hand that $(1, 0, 0)$ and $(0, 1, 0)$ are independent but do not span $\mathbb{R}^3$, by exhibiting a specific vector in $\mathbb{R}^3$ that is not in their span and explaining why no combination can reach it.

6.17 [hand] A subspace $W$ of $\mathbb{R}^3$ is the span of $(1, 0, 1)$ and $(2, 0, 2)$. What does $W$ actually look like geometrically, and what is its dimension? (Careful — count the independent directions, not the vectors.)


Tier ⭐⭐⭐ — Proofs (A track)

6.18 [proof] Prove that the intersection of two subspaces $U$ and $W$ of a vector space $V$ is itself a subspace. (Check all three conditions, using that each holds in both $U$ and $W$.)

6.19 [proof] Show that the union of two subspaces is generally not a subspace, by giving a concrete counterexample in $\mathbb{R}^2$ (two lines through the origin) and exhibiting two vectors in the union whose sum leaves it.

6.20 [proof] Prove that if $\mathbf{v}_1, \dots, \mathbf{v}_k$ are linearly independent, then any subset of them is also linearly independent. (Contrapositive is cleanest: a dependent subset forces the whole set dependent.)

6.21 [proof] Prove that adding a vector $\mathbf{w}$ to an independent set $\{\mathbf{v}_1, \dots, \mathbf{v}_k\}$ keeps it independent if and only if $\mathbf{w} \notin \operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\}$. (This is the "growing a basis one independent vector at a time" lemma used in Chapter 15.)

6.22 [proof] Let $\mathbf{v}_1, \dots, \mathbf{v}_n$ be a basis (independent and spanning). Prove that every vector $\mathbf{w}$ in the space has a unique representation as a linear combination of the basis vectors. (Suppose two representations and subtract.)


Tier ⭐⭐⭐ — Coding (C track)

Use numpy. Where the problem says "from scratch," do not call matrix_rank — implement the logic yourself and then use matrix_rank only to check.

6.23 [code] Write a function in_span(vectors, b) that returns True if b is in the span of the given list of vectors, using np.linalg.lstsq and checking np.allclose(A @ c, b). Test it on the two membership questions of 6.10 and 6.11 and confirm it returns True and False respectively.

6.24 [code] Implement independent(vectors) from scratch (no numpy in the body) following the Build-Your-Toolkit recipe in §6.11: vectors as columns, forward-eliminate, count pivot columns, return pivots == len(vectors). Then verify it against np.linalg.matrix_rank(np.array(vectors).T) == len(vectors) on at least six test sets, including $(1,1,1),(0,1,1),(0,0,1)$ (independent), $(1,2,3),(2,1,0),(4,5,6)$ (dependent), a parallel pair, and four vectors in $\mathbb{R}^3$ (must be False).

6.25 [code] Write a script that, given a dependent set, prints the dependency relation. Use scipy.linalg.null_space on the matrix whose columns are the vectors, take a null vector, rescale it so one entry is $\pm 1$, and print which combination of the vectors equals $\mathbf{0}$. Test on $(1,2,3),(2,1,0),(4,5,6)$ and confirm you recover $2\mathbf{v}_1 + \mathbf{v}_2 - \mathbf{v}_3 = \mathbf{0}$.

6.26 [code] Span visualizer. Adapt the Figure 6.1 / 6.2 code to draw the span of two vectors you choose in $\mathbb{R}^3$. Run it once with two non-parallel vectors (you should see a plane) and once with two parallel vectors like $(1,1,1)$ and $(2,2,2)$ (you should see only a line, even though you gave two vectors). Explain in a comment why the second case collapses.

6.27 [code] Generate a random $3 \times 5$ matrix with np.random.rand, compute its rank, and confirm the rank is at most $3$. Repeat 1000 times and report how often the rank is exactly $3$ (it should be essentially always). Explain why a random set of five vectors in $\mathbb{R}^3$ is almost surely a spanning but dependent set.


Tier ⭐⭐⭐⭐ — Application / short essay

6.28 [essay] Collinearity in regression (data science). A data scientist builds a model with features height_cm, height_inches, and weight_kg. In 150–250 words, explain why the first two features are linearly dependent, what goes wrong when you feed dependent feature columns into a linear regression (think about uniqueness of coordinates from §6.10), and how a rank check on the feature matrix would have caught the problem before fitting.

6.29 [essay] The RGB basis (graphics). In 150–250 words, explain why the three monitor primaries red, green, blue form a basis of the displayable color space — addressing both spanning (every color reachable) and independence (no primary redundant). Then explain what would break if a display used red, green, and yellow $(= \text{red} + \text{green})$ as its three "primaries."

6.30 [essay] Degrees of freedom (engineering). A planar robot arm has three rotational joints. In 150–250 words, explain how the independence of the columns of its Jacobian matrix relates to the arm's ability to move its tip in any direction, and what physically happens at a singular configuration where those columns become dependent. Which chapter computation (by name) detects this?

6.31 [essay] Qubit states (physics). A single qubit's state is a combination $\alpha|0\rangle + \beta|1\rangle$ of two basis states. In 100–200 words, explain in what sense $\{|0\rangle, |1\rangle\}$ is an independent, spanning set (a basis) for the single-qubit state space, and connect this to the superposition of states. What would it mean, physically, if the two basis states were dependent?