# Linear Algebra - Span of a Vector Space

The set of all linear combinations of some vectors v1,…,vn is called the span of these vectors and contains always the origin.

Example: Let V = Span {[0, 0, 1], [2, 0, 1], [4, 1, 2]}. A vector belongs to V when you can write it as a linear combination of the generators of V.

Related to Graph - Spanning ?

## Definition

The set of all linear combinations of some vectors v1,…,vn is called the span of these vectors and contains always the origin. ## How to

### know if a vector is in the span

How to know if a vector is in the Span {v1, . . . , vn} ?

Let $A = \begin{bmatrix} \begin{array}{r|r|r} && \\ v_1 & \dots & v_n \\ && \end{array} \end{bmatrix}$

Using the linear-combinations interpretation of matrix-vector multiplication, a vector x in Span {v1, . . . , vn} can be written Ax.

Thus testing if b is in Span {v1, . . . , vn} is equivalent to testing if the matrix equation Ax = b has a solution.

## Example

### Span {}

The Span {} have only one vector: the zero vector

### Span {[1, 1], [0, 1]} over gf2

The Span {[1, 1], [0, 1]} over the field GF(2) is composed of the following linear combinations:

0 [1, 1] + 0 [0, 1] = [0, 0]
0 [1, 1] + 1 [0, 1] = [0, 1]
1 [1, 1] + 0 [0, 1] = [1, 1]
1 [1, 1] + 1 [0, 1] = [1, 0]


Thus there are four vectors in the span.

### Span {[2, 3]} over $\mathbb{R}$

The Span {[2, 3]} over $\mathbb{R}$ contains an infinite number of vectors. They forms the line through the origin and (2, 3). ### Span of two vectors

The span of two vectors is a plane containing the origin.

### Span in another Span

[3, 0, 0], [0, 2, 0], and [0, 0, 1] are in Span {[1, 0, 0], [1, 1, 0], [1, 1, 1]}:

[3, 0, 0] = 3 [1, 0, 0]
[0, 2, 0] = 2 [1, 0, 0] + 2 [1, 1, 0]
[0, 0, 1] = - 1 [1, 0, 0] - 1 [1, 1, 0] + 1 [1, 1, 1]


## Dimension

The span of k vectors is not always k-dimensional

• Span {[0, 0]} is 0-dimensional.
• Span {[1, 3], [2, 6]} is 1-dimensional as [1, 3] = 1/2 x [2, 6]
• Span {[1, 0, 0], [0, 1, 0], [1, 1, 0]} is 2-dimensional as [1, 0, 0] + [0, 1, 0] = [1, 1, 0]

To predict the dimensionality of the span of some vectors, compute the rank of the set of vectors.

## Exchange Lemma

Suppose S is a set of vectors and A is a subset of S. Suppose z is a vector in Span S such that $A \cup \{z\}$ is linearly independent. Then there is a vector $w \in S − A$ such that: $$Span S = Span (S \cup \{z\} − \{w\})$$