← LibraryThe Span of a Set in a Vector Space | KEVOS® MathematicsProject Delivery · Project ManagementLesson 177/189← PrevNext →
ArticlePublished 8 Aug 202621 min readBy Kevin Jogin
Skip to content

Engineering/Mathematics/Vector Spaces

The Span of a Set in a Vector Space

The span of a set S in a vector space V is the collection of every linear combination that can be built from S, and it is always a subspace of V. This makes the span the universal factory for subspaces: choose any handful of vectors and a subspace appears, complete with a finite description.

  • Core level
  • Stream: subspaces
  • Reading time 14 min
  • Ref KVS-ENG-MATH-0061
Taxonomy
Engineering / Mathematics
Prerequisite
Vector space axioms; the three-condition subspace test
Notation
span(S), also written S
Key theorem
span(S) is a subspace of V for every SV
Membership test
Solve a linear system; consistent means in the span
Smallest property
Contained in every subspace that contains S

Overview

Two ways of producing subspaces dominate practice. One is to impose homogeneous linear conditions and take the solution set, which yields a null space. The other is to nominate a handful of vectors and take everything reachable from them by scaling and adding, which yields a span. The first describes a subspace by what its members must satisfy; the second describes it by what its members are built from.

The definition needs nothing but the two operations of the vector space, so it transfers without alteration from column vectors to polynomials, matrices and function spaces. Given a finite set S={u1,u2,,ut} inside a vector space V, the span of S is the set of all vectors of the form α1u1++αtut with complex coefficients. In every one of these settings it is a subspace, by one proof.

That proof is short and instructive. Non-emptiness follows because taking every coefficient to be zero produces the zero vector, so 0span(S) always. Additive closure follows because adding two linear combinations of the same vectors and collecting terms produces a linear combination with coefficients αi+βi. Scalar closure follows because multiplying through by α produces coefficients ααi. The three conditions hold for structural reasons that have nothing to do with the particular vectors chosen.

The operational value is that membership questions become linear systems. Asking whether a given polynomial lies in the span of two others produces an equation between polynomials, and equality of polynomials means equality of coefficients; asking the same question about matrices produces one equation per entry. In both cases an augmented matrix is assembled and row-reduced, and the consistency test decides. Abstract questions, ordinary arithmetic.

Definition

Linear Combination

LC

Let V be a vector space. Given vectors u1,u2,,un from V and scalars α1,α2,,αn from , their linear combination is the vector α1u1+α2u2++αnun. Closure guarantees the result is again an element of V.

The definition mentions only vectors, scalars and the two operations, which is exactly why it holds unchanged in Pn, Mmn and function spaces.

Span of a Set

SS

Let V be a vector space and let S={u1,u2,,ut} be a finite subset of V. The span of S, written span(S) or S, is the set of all possible linear combinations of the vectors of S:
span(S)={α1u1+α2u2++αtutαi,1it}.

The span is generally an infinite set even when S is small, which is the point: a finite list of generators describes an infinite subspace exactly.

Span of a Set is a Subspace

SSS

Let V be a vector space and S={u1,u2,,ut}V. Then span(S) is a subspace of V.

Proved by verifying the three subspace conditions. The argument uses only the zero-scalar property, associativity and commutativity of addition, and the two distributive laws.

Concepts

Why the span is always a subspace

Take the three conditions in turn. Choosing every coefficient to be zero gives 0u1+0u2++0ut=0, since a zero scalar annihilates any vector, so 0span(S) and the set is non-empty. If x has coefficients αi and y has coefficients βi, then regrouping the sum — permitted by commutativity and associativity of addition — and applying distributivity over scalar addition gives x+y=(α1+β1)u1++(αt+βt)ut, which is again a linear combination. Multiplying x by α and applying distributivity over vector addition followed by associativity of scalar multiplication gives coefficients ααi. Since is closed under addition and multiplication, all three results are legitimate members.

The span is the smallest subspace containing S

Any subspace U that contains every vector of S must, by closure, contain every scalar multiple αiui and hence every sum of such multiples — that is, all of span(S). Combined with the theorem that the span is itself a subspace containing S, this identifies span(S) as the intersection of all subspaces containing S, and therefore the smallest one. This characterisation is what justifies calling S a generating set and speaking of the subspace generated by S.

Membership is a consistency question

To decide whether yspan(S), write y=α1u1++αtut with the αi unknown, expand both sides in whatever coordinate description the space provides, and equate. The result is a linear system with t unknowns and one equation per coordinate. If the system is consistent, y is in the span and any solution supplies an explicit expression for it; if a pivot appears in the final column of the reduced augmented matrix, the system is inconsistent and y is outside. The abstract setting contributes nothing but the translation step.

Shape of the system depends on the space, not the method

The coordinate description determines the number of equations. In P4, equating coefficients of x4 down to x0 gives five equations. In M32, equating entries gives six. In m, equating components gives m. The number of unknowns is always the number of vectors in S. So a span membership question in a space of dimension d generated by t vectors is always a d×t system, and its shape is predictable before any arithmetic is done.

Redundancy in the generating set

Nothing in the definition requires the vectors of S to be distinct or independent. If one vector of S is itself a linear combination of the others, removing it leaves the span unchanged, because any use of it can be rewritten in terms of the survivors. This is why membership systems frequently have free variables: the coefficients expressing a member are not unique unless S is linearly independent. Detecting and removing redundancy is exactly the passage from a spanning set to a basis.

Chains of spans and nested subspaces

Because a span is a subspace and a subspace is a vector space, spans can be taken inside spans. If W is a subspace of V and SW, then span(S) is a subspace of W and hence of V, producing a chain span(S)WV. Building such chains is cheap and is the normal way an engineering model localises attention: a global state space, an admissible subspace cut out by constraints, and a working subspace generated by a handful of computed modes.

Deciding whether a vector lies in a span

Write the unknown combinationSet y=α1u1+α2u2++αtut with the scalars αi as unknowns.
Expand in the space's operationsCollect terms using the addition and scalar multiplication of V — coefficients for polynomials, entries for matrices.
Equate coordinatesEquality in V means equality of every coordinate, producing one linear equation per coordinate in the unknowns αi.
Row-reduce the augmented matrixAssemble the system and reduce. Read the pivot columns.
Apply the consistency testA pivot in the final column means inconsistent, so yspan(S). Otherwise y is in the span.
Recover the coefficientsRead a solution from the reduced form. If free variables are present, the representation is not unique and S is dependent.

Equations

Span of a finite set

EQ-SPVS-01
span(S)={α1u1+α2u2+α3u3++αtutαi,1it}

The defining description. Every choice of the t scalars yields one member, so the span is generally infinite while S stays finite.

The zero vector lies in every span

EQ-SPVS-02
0u1+0u2+0u3++0ut=0span(S)

Non-emptiness, the first subspace condition, holds for structural reasons and never has to be checked case by case.

Additive closure of a span

EQ-SPVS-03
(α1u1++αtut)+(β1u1++βtut)=(α1+β1)u1++(αt+βt)ut

Regrouping uses commutativity and associativity of addition; the final step is distributivity over scalar addition. Each αi+βi is again a complex scalar.

Scalar closure of a span

EQ-SPVS-04
α(α1u1++αtut)=(αα1)u1++(ααt)ut

Distributivity over vector addition followed by associativity of scalar multiplication. The result is a linear combination of the same vectors.

Membership as a linear system

EQ-SPVS-05
y=α1u1+α2u2++αtutBα=cis consistent

Here B holds the coordinates of the ui as columns and c holds the coordinates of y. Membership in a span is nothing more than consistency.

A linear combination in the matrix space M23

EQ-SPVS-06
2[132207]+4[312551][424111]=[1008231917]

Matrices are vectors in the technical sense, and their linear combinations are computed entry by entry using the addition and scaling of M23.

The span is the smallest containing subspace

EQ-SPVS-07
SUandUa subspacespan(S)U

Closure forces any subspace containing the generators to contain all their combinations, so the span is contained in every such subspace.

Variable Definitions

Symbols used on this page
SymbolNameMeaningDomain / type
VAmbient vector spaceThe space in which the vectors of S live and combinations are formedany vector space
SGenerating setThe finite set {u1,,ut} whose combinations are takenfinite subset of V
tNumber of generatorsSize of S; equals the number of unknowns in a membership systempositive integer
αiCoefficientScalar weight applied to ui in a linear combinationcomplex number
βiSecond coefficient setWeights of a second member of the span, used in the closure argumentcomplex number
span(S)SpanAll linear combinations of the vectors of S; a subspace of Vsubspace of V
yCandidate vectorThe vector whose membership in the span is being decidedelement of V
BCoordinate matrixMatrix whose columns are the coordinate vectors of the generatorsd x t matrix
M22Matrix spaceAll 2×2 matrices with complex entries; dimension fourvector space

Worked Numerical Example

Problem statement

A two-port network model stores three candidate coupling matrices in M22. Determine which of two target matrices can be realised as a weighted combination of the stored three, and report the degrees of freedom in each realisation.

  1. Name the generating set

    Work in V=M22 with entrywise addition and scalar multiplication. The stored matrices are

    A1=[1230],A2=[0111],A3=[2351]
  2. Set up the membership equation for the first target

    The first target is C=[1452]. Write C=α1A1+α2A2+α3A3 and expand the right-hand side entry by entry:

    α1A1+α2A2+α3A3=[α1+2α32α1+α2+3α33α1+α2+5α3α2α3]
  3. Equate entries to obtain a linear system

    Two matrices are equal exactly when corresponding entries agree, so the four entries give four equations in three unknowns. Assemble the augmented matrix, ordering the equations (1,1), (1,2), (2,1), (2,2):

    [1021213431550112]
  4. Row-reduce and apply the consistency test

    Gauss-Jordan reduction gives the following form. Column 4 is not a pivot column, so the system is consistent and Cspan({A1,A2,A3}).

    [1021011200000000]
  5. Read the coefficients and the degrees of freedom

    The reduced form gives α1=12α3 and α2=2+α3, with α3 free. Taking α3=0 gives the simplest realisation C=A1+2A2, which is confirmed by direct addition. The single free variable reflects a redundancy in the stored set: A3=2A1A2.

    A1+2A2=[1230]+[0222]=[1452]=C
  6. Repeat for the second target

    The second target is B=[3572]. The coefficient matrix is unchanged; only the constants column differs:

    [1023213531570112]
  7. Reduce and read the verdict

    Reduction produces a leading one in the fourth column, so the system is inconsistent and no choice of scalars realises B. Therefore Bspan({A1,A2,A3}).

    [1020011000010000]
  8. Interpret the structure

    The span of the three stored matrices is a two-dimensional subspace of the four-dimensional space M22, since the reduced coefficient matrix has rank two. The subspace contains C and excludes B, and every member of it has a one-parameter family of representations in terms of the three generators.

Result

The first coupling target is realisable and can be built two ways that differ only in how the redundant third matrix is used; the second is not realisable at all, regardless of gain settings. In design terms, the stored library spans a two-dimensional design space rather than the four dimensions available, so either the target specification must be relaxed or a genuinely new matrix must be added to the library. Adding a fourth copy of any existing combination would not help.

Applications & Industry Use

Structural engineering

Load cases as generators of a response space

The deflection responses to a library of unit load cases generate a subspace of the displacement space. Any load that is a combination of the unit cases produces a response in that span, so the question "can this deflected shape be produced by my load library?" is a span membership test.

Electrical engineering

Realisable two-port coupling matrices

A component library of two-port networks defines a span inside the space of transmission matrices. Whether a specified coupling can be synthesised from the library is settled by a four-equation consistency test, and free variables in the solution reveal redundant components.

Signal processing

Dictionary reach in sparse coding

A dictionary of atoms spans a subspace of the signal space. Signals inside the span are represented exactly; those outside can only be approximated. Redundant dictionaries deliberately admit free variables so that a sparsity criterion can select among the many valid representations.

Chemical engineering

Reachable composition changes

The reaction vectors available in a process generate a subspace of the composition space. A requested composition change is achievable exactly when it lies in that span, and the consistency test identifies infeasible targets before any optimisation is run.

Computer graphics

Blend shape coverage

Facial blend shapes are vectors in a high-dimensional vertex displacement space, and the rig can reproduce exactly the span of its shapes. Determining whether a scanned expression lies in that span, and with what weights, is a direct application of the membership computation.

Control systems

Achievable actuator effects

Each actuator contributes a fixed direction in the space of generalised forces, and the achievable set is the span of those directions. Control allocation solves the membership system; redundant actuation appears as free variables that a secondary objective then resolves.

Design Considerations

A span is described by generators, a null space by constraints

Both descriptions define subspaces, and converting between them costs a factorisation. Choose the generator description when new members must be produced cheaply, and the constraint description when membership must be tested cheaply. Carrying both without keeping them synchronised is a reliable source of inconsistency.

Redundant generators are not free

Adding a vector already in the span leaves the subspace unchanged but enlarges every membership system by a column and introduces a free variable. If uniqueness of representation matters — for identifiability, for interpretation, for reproducibility — reduce the generating set to an independent one first.

The order of generators is a convention, not information

Permuting S permutes the columns of the membership system and therefore the coefficient labels, but leaves the span identical. Fix an order once, record it alongside the generator list, and do not attach meaning to positions unless a downstream algorithm depends on them.

Size the system before choosing a method

A membership question in a space of dimension d with t generators is a d×t system. When d is large and t is small, the system is tall and thin, and a least-squares or QR approach is more appropriate than full reduction. When t exceeds d the system is wide, always consistent for some choices, and free variables are guaranteed.

In floating point, membership becomes distance

An exact consistency test is meaningless on rounded data. The practical substitute is to project the candidate onto the span and measure the residual, declaring membership when the residual is small relative to the norm of the candidate. State the threshold; do not rely on an exact pivot test.

The empty set spans the zero subspace

By the convention that an empty sum is the zero vector, span()={0}. This is not a curiosity: it makes the theory uniform when a generating set is reduced to nothing, and it is the right answer for a zero-dimensional subspace such as the null space of a nonsingular matrix.

Standards & Codes

Notation, interchange and numerical standards that govern how this material is written down, stored and computed in production systems.

Applicable standards, conventions and reference implementations
ReferenceTitleRelevance to this topic
ISO 80000-2Quantities and units — Part 2: MathematicsStandardises the notation for sets, the angle brackets and the upright rendering of the operator name span used throughout this page.
BLAS Level 2Basic Linear Algebra Subprograms, matrix-vector operationsForming a linear combination of stored generators is a GEMV operation; the span membership computation is dominated by such calls when the generator matrix is dense.
LAPACK / BLAS referenceLinear Algebra PACKage reference implementationProvides xGELS for least-squares solution of the tall membership system and xGEQP3 for detecting redundant generators via a rank-revealing factorisation.
IEEE 754-2019IEEE Standard for Floating-Point ArithmeticDefines the rounding behaviour that makes an exact consistency test unreliable, so numerical span membership must be expressed as a residual relative to a documented tolerance.
ISO/IEC 40314Mathematical Markup Language (MathML) Version 3.0Encodes the set-builder definition and matrix displays on this page as structured markup rather than images.

Material Selection

For a mathematical topic, "material" is the numeric representation: the scalar field, storage format and precision the computation is built from.

Representation and precision selection
RepresentationSelect whenTrade-off
Exact rational coefficientsDeciding membership definitively for small symbolic problems, or certifying that a generating set is redundant.Yields an unambiguous verdict with no tolerance, but coefficients can grow rapidly during reduction of larger systems.
IEEE 754 binary64Engineering libraries of load cases, modes or dictionary atoms measured or simulated numerically.Standard and fast, but membership must be recast as a small residual, and near-membership is indistinguishable from membership.
IEEE 754 binary32Very large generator libraries, GPU-resident dictionaries and real-time allocation.Halves memory traffic at the cost of about seven significant digits, which is often too coarse to separate a redundant generator from an independent one.
Dense generator matrixFew generators, each dense, as in modal or blend-shape libraries.Simple indexing and direct BLAS use, but memory grows as the product of dimension and generator count.
Sparse generator storageGenerators with localised support, such as finite element load patches or contrast vectors.Large savings in storage and in the cost of forming combinations, but reduction fills in and destroys sparsity, so an iterative solver is preferred.
Orthonormalised generator basisRepeated membership tests against a fixed span, especially in floating point.Reduces each test to a projection with excellent conditioning, but costs one orthogonalisation up front and discards the original generator identities.

Manufacturing Notes

Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.

Cost of a membership test

Assembling the coordinate system is O(dt) and reducing a d×t augmented matrix costs about 2dt223t3 operations for dt. When many candidates are tested against the same span, factor the generator matrix once and reuse the factorisation, reducing each subsequent test to a triangular solve at O(t2).

Carrying out the expansion by hand

Work in a fixed coordinate order and write the expansion as a single array before equating anything. For matrices, lay the unknown combination out as one symbolic matrix and read off one equation per entry; for polynomials, collect by descending power. Equating before the expansion is complete is the usual source of dropped terms.

Detecting redundant generators

Row-reduce the coefficient matrix alone, without a right-hand side. Its rank is the dimension of the span, and non-pivot columns index generators that are combinations of earlier ones. Deleting those columns leaves the span unchanged and makes every subsequent membership representation unique.

Library behaviour

NumPy offers numpy.linalg.lstsq, which returns a least-squares coefficient vector and a residual; a small residual is the numerical form of membership. SymPy's linsolve returns an exact parameterised solution set, making free variables explicit. Neither returns a boolean membership verdict, and the interpretation of the residual remains the caller's decision.

Verifying a claimed representation

Once coefficients are found, reconstruct the candidate from the generators and compare with the original in the space's own coordinates. This catches transcription errors in the coordinate mapping, which is the step most likely to be wrong and the one least likely to be caught by the consistency test.

Failure Modes & Common Mistakes

Failure modes, root causes and prevention
Failure mode / mistakeImpactRoot causePrevention & detection
Equating before fully expandinghighReading off coordinate equations while some scalar multiples remain undistributed, so terms are omitted from the system.Write the complete expanded combination as one object first, then equate coordinates in a fixed order.
Mismatched coordinate orderinghighListing the equations from the candidate in a different coordinate order from the generators, producing a permuted and wrong system.Fix a single ordering of coordinates and of generators, and record it beside the system.
Concluding non-membership from a zero rowmediumConfusing a zero row of the reduced augmented matrix, which is a redundant equation, with a pivot in the final column, which is a contradiction.Test membership only by whether the final column is a pivot column.
Assuming coefficients are uniquemediumReporting one solution of a membership system as the representation when the generating set is dependent and free variables exist.Count the pivot columns; if fewer than the number of generators, state that the representation is a family.
Adding redundant generators to enlarge a spanmediumBelieving that appending more vectors always increases coverage, when appending a member of the span changes nothing.Check whether the new vector is already in the span; if it is, the rank and dimension are unchanged.
Exact consistency test on floating-point datahighTesting for an exactly zero pivot on rounded generator coordinates, so rounding decides membership.Solve in least squares and compare the residual with a documented tolerance relative to the candidate's norm.
Confusing the span with the generating setlowTreating S and span(S) as interchangeable, so a statement about finitely many vectors is applied to an infinite subspace.Keep the notation distinct and state which object each claim is about.
Assuming a span must be a proper subspacelowOverlooking that a sufficiently rich generating set spans all of V, in which case membership is automatic.Compare the rank of the generator matrix with the dimension of V before running any membership test.

FAQs

Why is the span of a set always a subspace, whatever the vectors are?

Because the three subspace conditions follow from the arithmetic of the coefficients rather than from any property of the vectors. Zero coefficients give the zero vector; adding two combinations adds the coefficients; scaling a combination scales the coefficients. Since is closed under addition and multiplication, all three results are again linear combinations.

What is the difference between S and span(S)?

S is a finite list of vectors; span(S) is the infinite collection of everything reachable from them by scaling and adding. S is contained in its span — take one coefficient equal to one and the rest zero — but the span is normally very much larger.

Does the span change if I add a vector already in it?

No. If u is already a combination of the vectors of S, then any combination using u can be rewritten without it, so the span is identical. What does change is the membership system: it gains a column and a free variable, so representations stop being unique.

How do I decide whether a polynomial lies in the span of other polynomials?

Set it equal to an unknown linear combination, expand, and equate coefficients of each power of x. That produces one linear equation per power, with one unknown per generating polynomial. Row-reduce the augmented matrix and apply the consistency test; a pivot in the final column means the polynomial is outside the span.

Can the span of a finite set be the whole space?

Yes, provided the space is finite-dimensional and the set is rich enough. The standard unit vectors span m, the monomials 1,x,,xn span Pn, and the single-entry matrices span Mmn. In an infinite-dimensional space no finite set can span the whole space.

Why does the membership system sometimes have free variables?

Free variables appear exactly when the generating set is linearly dependent, so at least one generator can be expressed in terms of the others. Each dependency contributes one degree of freedom to every representation, which is why an independent generating set — a basis — is the version worth computing when uniqueness matters.

Is the span of a set the smallest subspace containing it?

Yes. Any subspace containing all the generators must contain all their scalar multiples and all sums of those, hence the entire span. Since the span is itself a subspace containing the generators, it is the smallest such subspace — equivalently, the intersection of all of them.

References

  1. Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section S, Subsection TSS, Definition SS and Theorem SSS. Licensed under the GNU Free Documentation License v1.2.
  2. Halmos, P. R. Finite-Dimensional Vector Spaces, 2nd edition. Springer, 1974.
  3. Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
  4. ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
  5. Anderson, E. et al. LAPACK Users' Guide, 3rd edition. Society for Industrial and Applied Mathematics, 1999.

AI Suggested Questions

  • Given four matrices in M22, compute the dimension of their span and identify which of them are redundant.
  • Show me a polynomial that is not in the span of {x23x+2,x24x+3} and prove it with a row reduction.
  • How do I convert a span description of a subspace into a set of homogeneous constraints defining the same subspace?
  • Explain why the span of the empty set is the zero subspace and where that convention actually matters.
  • In floating-point arithmetic, what residual threshold should I use to decide that a vector lies in the span of a given dictionary?
  • Compare the cost of testing many vectors against one span by repeated row reduction versus by a single QR factorisation.

Related Calculators

Continue learning

Algebraic and Geometric Multiplicities of Eigenvalues | KEVOS® MathematicsArticle · Project ManagementAmitsur’s Theorem on the Radical of a Polynomial Ring | KEVOS®Article · Project ManagementAmitsur’s Theorem on the Radical of an Algebra of Small Dimension | KEVOS®Article · Project ManagementArchetypes: Reference Catalogue of Worked Systems | KEVOS® MathematicsArticle · Project Management