Linear AlgebraVectors and Matrix Equations

Span

The span is every linear combination of a set of vectors.

Not started Jump to practice

Collect every linear combination of a set of vectors and you get its span: $$\operatorname{Span}\{\mathbf{v}_1, \dots, \mathbf{v}_p\} = \{\,c_1\mathbf{v}_1 + \cdots + c_p\mathbf{v}_p : c_1, \dots, c_p \text{ real}\,\}.$$ It always contains $\mathbf{0}$ and each $\mathbf{v}_i$. The span is everywhere you can reach using only those directions.

What spans look like

  • The span of one nonzero vector is the line through the origin in its direction.
  • The span of two vectors that are not multiples of each other is a plane through the origin. In $\mathbb{R}^2$ that plane is all of $\mathbb{R}^2$; in $\mathbb{R}^3$ it is a flat sheet.
  • If one vector is a multiple of the other, the second adds no new direction: the span is still a line.
Two vectors in $\mathbb{R}^3$ span a plane. The target $(1, 1, 0)$ lies off that plane.

Worked example: Is b in the span?

Is $\mathbf{b} = \begin{bmatrix} 2 \\ 4 \\ 1 \end{bmatrix}$ in $\operatorname{Span}\{\mathbf{a}_1, \mathbf{a}_2\}$ with $\mathbf{a}_1 = \begin{bmatrix} 1 \\ -1 \\ 2 \end{bmatrix}$, $\mathbf{a}_2 = \begin{bmatrix} 3 \\ 0 \\ 1 \end{bmatrix}$?
  1. We need $x_1\mathbf{a}_1 + x_2\mathbf{a}_2 = \mathbf{b}$: row reduce $\left[\begin{array}{cc|c} 1 & 3 & 2 \\ -1 & 0 & 4 \\ 2 & 1 & 1 \end{array}\right]$.
  2. $R_2 \to R_2 + R_1$ and $R_3 \to R_3 - 2R_1$: rows 2 and 3 become $(0, 3 \mid 6)$ and $(0, -5 \mid -3)$.
  3. $R_3 \to R_3 + \frac{5}{3}R_2$: row 3 becomes $(0, 0 \mid 7)$, which says $0 = 7$.
  4. Inconsistent, so $\mathbf{b}$ is not in the span. Geometrically, $\mathbf{a}_1$ and $\mathbf{a}_2$ span a plane in $\mathbb{R}^3$ and $\mathbf{b}$ is off it.

Answer: No.

Worked example: Choosing h to land in the span

For which $h$ is $\begin{bmatrix} 5 \\ 1 \\ h \end{bmatrix}$ in $\operatorname{Span}\left\{\begin{bmatrix} 1 \\ 0 \\ 2 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}\right\}$?
  1. The first two entries do not involve $h$: $x_1 + x_2 = 5$ and $x_2 = 1$, so $x_2 = 1$ and $x_1 = 4$.
  2. The third entry must then agree: $h = 2x_1 + x_2 = 8 + 1 = 9$.
  3. For any other $h$ the last row of the reduced augmented matrix reads $0 = h - 9 \neq 0$.

Answer: $h = 9$

Why it works

When do the columns of $A$ (an $m \times n$ matrix) span all of $\mathbb{R}^m$? Exactly when $A$ has a pivot in every row. If every row has a pivot, no row of the echelon form can become $[\,0 \cdots 0 \mid c\,]$, so every $\mathbf{b}$ is reachable. If some row has no pivot, the echelon form has a zero row; put a $1$ after the bar in that row and run the row operations backward to build a $\mathbf{b}$ that cannot be reached.

Common mistake

"Two vectors in $\mathbb{R}^3$ span $\mathbb{R}^3$." They cannot. The matrix with them as columns is $3 \times 2$, so it has at most 2 pivots, but spanning $\mathbb{R}^3$ needs a pivot in all 3 rows. Two independent vectors in $\mathbb{R}^3$ span a plane. In general you need at least $m$ vectors to span $\mathbb{R}^m$, and having $m$ of them is not enough on its own.

Key idea

The span is the set of all linear combinations. $\mathbf{b}$ is in the span of the columns of $A$ exactly when $[\,A \mid \mathbf{b}\,]$ is consistent, and the columns span all of $\mathbb{R}^m$ exactly when $A$ has a pivot in every row.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Margalit and Rabinoff, Interactive Linear Algebra (Georgia Tech), §2.2 Vector Equations and Spans
  • MIT OpenCourseWare 18.06 Linear Algebra (Gilbert Strang, Spring 2010), Lecture 6: Column Space and Nullspace
@teddyrookbook GitHub