Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Test Whether a Vector Is in a Span

A vector b\mathbf{b} is in the span of v1,…,vk\mathbf{v}_1, \ldots, \mathbf{v}_k when some weights combine them into b\mathbf{b}, that is, when the system with augmented matrix [v1 ⋯ vk∣b][\mathbf{v}_1\ \cdots\ \mathbf{v}_k \mid \mathbf{b}] is consistent. The same row reduction, without b\mathbf{b}, tells you whether the set spans the whole space.

Recognize the task

Two related questions: "is (2,5,1)(2, 5, 1) in Span⁡{(1,2,0),(0,1,1)}\operatorname{Span}\{(1, 2, 0), (0, 1, 1)\}?" and "do these vectors span R3\mathbb{R}^3?". Test: is there one target vector (membership) or every vector of the space (spanning)?

Two ways to do it

One vector: consistencymembership
b∈Span⁡{v1,…,vk}  ⟺  [A∣b] is consistent\mathbf{b} \in \operatorname{Span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} \iff [A \mid \mathbf{b}] \ \text{is consistent}
The span membership criterion: no row [0 ⋯ 0∣d][0\ \cdots\ 0 \mid d] with d≠0d \neq 0.
Whole space: pivots in every rowspanning set
Span⁡{v1,…,vk}=Rn  ⟺  rank⁡A=n\operatorname{Span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} = \mathbb{R}^n \iff \operatorname{rank} A = n
Every row of the echelon form of AA has a pivot. For nn vectors in Rn\mathbb{R}^n this is the same as det⁡A≠0\det A \neq 0.

Steps

StepOn b=(2,5,1)\mathbf{b} = (2, 5, 1), v1=(1,2,0)\mathbf{v}_1 = (1, 2, 0), v2=(0,1,1)\mathbf{v}_2 = (0, 1, 1)
1Decide which question is asked. One target vector: membership. Every vector of Rn\mathbb{R}^n: spanning.membership of b\mathbf{b}
2Put the vectors in the columns. For membership, add b\mathbf{b} as the last column of an augmented matrix.(102215011)\left(\begin{array}{cc|c} 1 & 0 & 2 \\ 2 & 1 & 5 \\ 0 & 1 & 1 \end{array}\right)
3Row reduce. Use Gaussian elimination.R2−2R1R_2 - 2R_1, then R3−R2R_3 - R_2:  (102011000)\ \left(\begin{array}{cc|c} 1 & 0 & 2 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{array}\right)
4Look for a contradiction row (or count row pivots). Membership: a row [0 0∣d][0\ 0 \mid d] with d≠0d \neq 0 means no. Spanning: every row of AA needs a pivot.last row is [0 0∣0][0\ 0 \mid 0]: consistent
5State the answer with the weights. Back-substitute for the weights and check them.b=2v1+1v2\mathbf{b} = 2\mathbf{v}_1 + 1\mathbf{v}_2:  (2,4,0)+(0,1,1)=(2,5,1)\ (2, 4, 0) + (0, 1, 1) = (2, 5, 1) ✓

Worked examples

Example 1 · not in the span

membership
Is (1,1,1)(1, 1, 1) in Span⁡{(1,0,1),(0,1,2)}\operatorname{Span}\{(1, 0, 1), (0, 1, 2)\}?
rows 1 and 2 give c1=1c_1 = 1, c2=1c_2 = 1
read the easy equations
row 3: c1+2c2=3≠1c_1 + 2c_2 = 3 \neq 1, so no
contradiction row after reduction

Example 2 · a set that does not span the plane

spanning, 2D
det⁡(1326)=6−6=0\det\begin{pmatrix} 1 & 3 \\ 2 & 6 \end{pmatrix} = 6 - 6 = 0 for (1,2)(1, 2), (3,6)(3, 6)
square: determinant decides
the span is only the line through (1,2)(1, 2)
second is three times first

Example 3 · a set that spans space

spanning, 3D
(1,0,1)(1, 0, 1), (1,1,0)(1, 1, 0), (0,1,1)(0, 1, 1) as columns
three vectors in R3\mathbb{R}^3
det⁡=1(1−0)−1(0−1)+0=2\det = 1(1 - 0) - 1(0 - 1) + 0 = 2
expand along row 1
2≠02 \neq 0: they span R3\mathbb{R}^3
pivot in every row
Test your own target vector in the span membership visualizer.

See it happen

The span of two independent vectors in R3\mathbb{R}^3 is a plane through the origin. Asking whether b\mathbf{b} is in the span asks whether its tip lies on that plane. The contradiction row [0 0∣d][0\ 0 \mid d] is the algebra saying "b\mathbf{b} sits off the plane by an amount you cannot reach".

Common mistakes

Looking for pivots in the columns

✗ (1,0)(1, 0), (0,1)(0, 1), (1,1)(1, 1) do not span R2\mathbb{R}^2: column 3 has no pivot
✓ spanning needs a pivot in every row; both rows have one, so they span

Too few vectors

✗ two vectors that are not parallel span R3\mathbb{R}^3
✓ they span only a plane; at least nn vectors are needed to span Rn\mathbb{R}^n

Reducing the coefficients but forgetting b

✗ row operations applied to AA only, then "consistent"
✓ apply every row operation to the whole augmented row, including the b\mathbf{b} column