In mathematics, the **linear span** (also called the **linear hull**^{[1]} or just **span**) of a set S of vectors (from a vector space), denoted span(*S*),^{[2]} is defined as the set of all linear combinations of the vectors in S.^{[3]} It can be characterized either as the intersection of all linear subspaces that contain S, or as the smallest subspace containing S. The linear span of a set of vectors is therefore a vector space itself. Spans can be generalized to matroids and modules.

To express that a vector space V is a linear span of a subset S, one commonly uses the following phrases—either: S spans V, S is a **spanning set** of V, V is spanned/generated by S, or S is a generator or generator set of V.

Given a vector space V over a field K, the span of a set S of vectors (not necessarily infinite) is defined to be the intersection W of all subspaces of V that contain S. W is referred to as the subspace *spanned by* S, or by the vectors in S. Conversely, S is called a *spanning set* of W, and we say that S *spans* W.

Alternatively, the span of S may be defined as the set of all finite linear combinations of elements (vectors) of S, which follows from the above definition.^{[4]}^{[5]}^{[6]}^{[7]}

In the case of infinite S, infinite linear combinations (i.e. where a combination may involve an infinite sum, assuming that such sums are defined somehow as in, say, a Banach space) are excluded by the definition; a generalization that allows these is not equivalent.

The real vector space has {(−1, 0, 0), (0, 1, 0), (0, 0, 1)} as a spanning set. This particular spanning set is also a basis. If (−1, 0, 0) were replaced by (1, 0, 0), it would also form the canonical basis of .

Another spanning set for the same space is given by {(1, 2, 3), (0, 1, 2), (−1, 1⁄2, 3), (1, 1, 1)}, but this set is not a basis, because it is linearly dependent.

The set {(1, 0, 0), (0, 1, 0), (1, 1, 0)} is not a spanning set of , since its span is the space of all vectors in whose last component is zero. That space is also spanned by the set {(1, 0, 0), (0, 1, 0)}, as (1, 1, 0) is a linear combination of (1, 0, 0) and (0, 1, 0). It does, however, span .(when interpreted as a subset of ).

The empty set is a spanning set of {(0, 0, 0)}, since the empty set is a subset of all possible vector spaces in , and {(0, 0, 0)} is the intersection of all of these vector spaces.

The set of functions x^{n}, where n is a non-negative integer, spans the space of polynomials.

The set of all linear combinations of a subset S of V, a vector space over K, is the smallest linear subspace of V containing S.

*Proof.*We first prove that span*S*is a subspace of V. Since S is a subset of V, we only need to prove the existence of a zero vector**0**in span*S*, that span*S*is closed under addition, and that span*S*is closed under scalar multiplication. Letting , it is trivial that the zero vector of V exists in span*S*, since . Adding together two linear combinations of S also produces a linear combination of S: , where all , and multiplying a linear combination of S by a scalar will produce another linear combination of S: . Thus S is a subspace of V.

- Suppose that W is a linear subspace of V containing S. It follows that , since every
**v**_{i}is a linear combination of S (trivially). Since W is closed under addition and scalar multiplication, then every linear combination must be contained in W. Thus, span*S*is contained in every subspace of V containing S, and the intersection of all such subspaces, or the smallest such subspace, is equal to the set of all linear combinations of S.

Every spanning set S of a vector space V must contain at least as many elements as any linearly independent set of vectors from V.

*Proof.*Let be a spanning set and be a linearly independent set of vectors from V. We want to show that .

- Since S spans V, then must also span V, and must be a linear combination of S. Thus is linearly dependent, and we can remove one vector from S that is a linear combination of the other elements. This vector cannot be any of the
**w**_{i}, since W is linearly indepedent. The resulting set is , which is a spanning set of V. We repeat this step n times, where the resulting set after the pth step is the union of and m - p vectors of S.

- It is ensured until the nth step that there will always be some
**v**_i to remove out of S for every adjoint of**v**, and thus there are at least as many**v**_{i}'s as there are**w**_{i}'s—i.e. . To verify this, we assume by way of contradiction that . Then, at the mth step, we have the set and we can adjoin another vector . But, since is a spanning set of V, is a linear combination of . This is a contradiction, since W is linearly independent.

Let V be a finite-dimensional vector space. Any set of vectors that spans V can be reduced to a basis for V, by discarding vectors if necessary (i.e. if there are linearly dependent vectors in the set). If the axiom of choice holds, this is true without the assumption that V has finite dimension. This also indicates that a basis is a minimal spanning set when V is finite-dimensional.

Generalizing the definition of the span of points in space, a subset X of the ground set of a matroid is called a spanning set if the rank of X equals the rank of the entire ground set^{[citation needed]}.

The vector space definition can also be generalized to modules.^{[8]}^{[9]} Given an R-module A and a collection of elements *a*_{1}, ..., *a _{n}* of A, the submodule of A spanned by

consisting of all

In functional analysis, a closed linear span of a set of vectors is the minimal closed set which contains the linear span of that set.

Suppose that X is a normed vector space and let E be any non-empty subset of X. The **closed linear span** of E, denoted by or , is the intersection of all the closed linear subspaces of X which contain E.

One mathematical formulation of this is

The closed linear span of the set of functions *x ^{n}* on the interval [0, 1], where

The linear span of a set is dense in the closed linear span. Moreover, as stated in the lemma below, the closed linear span is indeed the closure of the linear span.

Closed linear spans are important when dealing with closed linear subspaces (which are themselves highly important, see Riesz's lemma).

Let X be a normed space and let E be any non-empty subset of X. Then

- is a closed linear subspace of
*X*which contains*E*, - , viz. is the closure of ,

(So the usual way to find the closed linear span is to find the linear span first, and then the closure of that linear span.)