← LibrarySpan of a Set of Vectors | KEVOS® MathematicsProject Delivery · Project ManagementLesson 147/189← PrevNext →
ArticlePublished 8 Aug 202620 min readBy Kevin Jogin
Skip to content

Engineering/Mathematics/Vectors

Span of a Set of Vectors

The span of a finite set of vectors is the set of everything reachable by linear combination — almost always infinite, yet described completely by the finite list. Deciding whether a given vector lies in a span is exactly deciding whether one linear system is consistent.

  • Core level
  • Stream: subspaces
  • Reading time 14 min
  • Ref KVS-ENG-MATH-0022
Taxonomy
Engineering / Mathematics
Prerequisite
Linear combinations of column vectors
Notation
span(S), also written S
Cardinality
Infinite unless S{0}
Membership test
Consistency of an augmented system
Always contains
0 and every element of S

Overview

A finite list of vectors is small data. The set of everything obtainable from it by scaling and adding is, in almost every case, infinite. The span is the name for that generated set, and the whole point of the construction is the asymmetry: a handful of numbers specifies an unbounded family exactly, with no approximation and no enumeration.

Formally, for S={u1,,up} the span is the collection of all vectors α1u1++αpup as the scalars range independently over the field. The set S is finite and concrete; span(S) is infinite and abstract. Confusing the two is the single most common source of error when the idea is first met, and the confusion persists because the same object plays both roles in different sentences.

The engineering content is reachability. The columns of a matrix are the directions the system can produce; the span of those columns is everything the system can achieve. Whether a commanded state is attainable, whether a specification can be blended, whether an end-effector twist can be realised — each is a membership question in a span, and each is answered by row-reducing an augmented matrix and inspecting the final column for a leading one.

Two follow-on questions shape everything that comes after. First, can the generating list be shortened without changing the span? Second, is a member's representation unique? Both are answered by the rank of the matrix of generators: a list with r<p is redundant and produces every member in infinitely many ways, while r=p makes the list minimal and the representation unique. Those observations lead directly to linear independence and to the notion of a basis.

Definition

Span of a Set of Column Vectors

SSCV

Let S={u1,u2,,up} be a finite set of vectors in m. The span of S is the set of all linear combinations of its elements:

  • span(S)={α1u1+α2u2++αpupαi,1ip}.
The vectors of S are the generators or a spanning set for this collection. The alternative notation S is also standard.

The span is infinite except in the degenerate case where S is empty or contains only the zero vector, in which case span(S)={0}.

Membership in a Span

MS

A vector vm belongs to span(S) if and only if scalars α1,,αp exist with α1u1++αpup=v. Assembling the generators as the columns of a matrix A, this is exactly the statement that the system Aα=v is consistent.

Concepts

A finite set describing an infinite one

The economy of the construction is the reason it appears everywhere. Three vectors of size seven — twenty-one numbers — describe an infinite three-dimensional family in 7 exactly. Every operation on that family (membership, intersection, containment) becomes a finite computation on the generators.

Keep the notation honest about which object is meant. S is a finite set that can be listed, stored and transmitted; span(S) is what it generates. A statement like "the span has three vectors" is a category error; "the spanning set has three vectors" is the intended claim.

Membership is a consistency question

Because a linear combination of the columns of A equals Aα, the question vspan(S) is the question of whether Aα=v has a solution. Row-reduce [Av]: a leading one in the final column means no scalars exist and v is outside the span; no leading one there means it is inside, and the reduction has already produced the coefficients.

The test therefore costs one row reduction and answers a set-membership question about an infinite set with a finite, decisive computation. Deciding membership is not harder than solving a linear system, and it is not easier either.

The span always contains the generators and the zero vector

Setting αi=1 and all other coefficients to zero shows each uispan(S), so Sspan(S). Setting every coefficient to zero shows 0span(S) always — even when no generator is the zero vector. This is why a span is a subspace and why a solution set of an inhomogeneous system, which misses the origin, can never be one.

Closure follows just as directly: the sum of two combinations is a combination, and a scalar multiple of a combination is a combination. A span is thus the smallest subspace containing its generators.

Redundant generators and non-unique representation

If some generator is itself a combination of the others, it can be deleted without changing the span. Detecting this is a rank computation: forming the matrix A of generators and reducing, the list is redundant precisely when r<p. Each redundancy also means representations are not unique, since any null space vector of A can be added to a coefficient list without changing the vector produced.

The two facts are the same fact. A non-trivial null space simultaneously certifies that a generator can be discarded and that every member of the span has infinitely many coefficient lists. Removing all redundancy leaves a minimal spanning set, which is a basis.

Different sets, same span

Spans are not determined by their generating sets. Two entirely different lists can generate the same set, and this is routine rather than exceptional: replacing a generator by a non-zero multiple, or by its sum with another generator, leaves the span unchanged. These are precisely column-analogues of elementary row operations.

Consequently, testing whether span(S)=span(T) cannot be done by comparing lists. Show mutual containment instead — every element of S lies in span(T) and conversely — which reduces to a small number of consistency tests, or compare canonical forms of the two generator matrices.

When the span is everything

If the matrix of generators is square and nonsingular, every target vector is reachable and span(S)=m. More generally the span is all of m exactly when the generator matrix has rank m, which requires at least m generators. Fewer than m vectors can never span m, regardless of how they are chosen.

In design terms this is an actuation-count argument: to reach every state of an m-dimensional space you need at least m independent inputs, and having m of them is enough only if they are independent. A count alone proves insufficiency but never sufficiency.

Deciding membership in a span

Form the generator matrixPlace the vectors of S as the columns of an m×p matrix A, in a fixed recorded order.
Augment with the targetAppend the candidate vector v as column p+1 to form [Av].
Row-reduceApply Gauss-Jordan elimination to reach the reduced row-echelon form.
Inspect the final columnA leading one in column p+1 means vspan(S); the question is settled negatively.
Read the coefficientsOtherwise, set free variables to zero and read off one valid coefficient list from the pivot rows.
Assess uniquenessIf r=p the coefficients are unique; if r<p the generators are redundant and infinitely many coefficient lists work.

Equations

Definition of the span

EQ-SSCV-01
span(S)={α1u1+α2u2++αpupαi,1ip}

The set of all linear combinations of the generators. The generators are finite in number; the set they generate is not.

Summation form

EQ-SSCV-02
span(S)={i=1pαiuiαi}

The same definition written compactly. Each scalar ranges independently over the whole field.

Membership as consistency

EQ-SSCV-03
vspan(S)Aα=vis consistent,A=[u1u2up]

The computational reformulation. One row reduction decides membership and, when the answer is affirmative, supplies the coefficients.

Span as a column space

EQ-SSCV-04
span({A1,A2,,An})=C(A)

When the generators are the columns of a matrix, their span is the column space: the set of all right-hand sides for which the system is solvable.

Closure properties

EQ-SSCV-05
x,yspan(S),cx+yspan(S),cxspan(S)

A span is closed under addition and scalar multiplication and contains 0, so it is a subspace — the smallest one containing S.

Redundancy criterion

EQ-SSCV-06
upspan({u1,,up1})span(S)=span(S{up})

A generator expressible in terms of the others contributes nothing and can be removed without changing the span.

Spanning all of the ambient space

EQ-SSCV-07
span(S)=mrank(A)=m

Full row rank is exactly the condition for reachability of every target. It requires pm generators, though that alone is not sufficient.

Variable Definitions

Symbols used on this page
SymbolNameMeaningDomain / type
SGenerating setThe finite list of vectors whose combinations are collectedfinite subset of C^m
uiGeneratorAn element of the spanning setvector in C^m
αiCoefficientScalar attached to generator i in a combinationcomplex scalar
pGenerator countNumber of vectors in the spanning setpositive integer
mAmbient dimensionSize of each vector; the space in which the span sitspositive integer
AGenerator matrixMatrix whose columns are the elements of Sm x p matrix
vCandidate vectorThe vector whose membership in the span is testedvector in C^m
span(S)SpanSet of all linear combinations of the generatorssubspace of C^m
rRank of the generator matrixNumber of pivot columns; the dimension of the span0 to min(m,p)

Worked Numerical Example

Problem statement

A three-channel actuator drives a four-sensor test article. Each channel produces a fixed response pattern across the four sensors. Determine which of two target response profiles the actuator set can reproduce exactly, and whether the drive levels are unique.

  1. Record the channel responses

    Unit drive on each channel produces u1=(1,2,3,1), u2=(2,1,0,1) and u3=(0,3,6,3) across the four sensors. The achievable profiles are exactly span({u1,u2,u3}).

    A=[120213306113]
  2. Test the first target

    Target v=(3,3,3,0). Augment and row-reduce. The final column carries no leading one, so the system is consistent and the profile is achievable.

    [1203213330631130][1021011100000000]
  3. Read the drive levels

    Column 3 is not a pivot column, so α3 is free. Taking α3=0 gives α1=1, α2=1. Checking: u1+u2=(3,3,3,0), which is the target exactly.

    1[1231]+1[2101]+0[0363]=[3330]
  4. Show the drive levels are not unique

    Taking α3=1 instead gives α1=1, α2=2. Checking: u1+2u2+u3=(1+4+0,2+2+3,3+0+6,12+3)=(3,3,3,0). The same profile, a different drive setting.

    (1)u1+2u2+1u3=[3330]
  5. Identify the redundancy

    The rank is r=2 while p=3, so one channel is redundant. Indeed u3=2u1u2: 2(1,2,3,1)(2,1,0,1)=(0,3,6,3). Channel 3 adds no reach whatsoever.

    u3=2u1u2,span({u1,u2,u3})=span({u1,u2})
  6. Test the second target

    Target w=(1,1,1,1). Augmenting and reducing puts a leading one in the final column, so the system is inconsistent.

    [1201213130611131][1020011000010000]
  7. Interpret the negative result

    No drive setting whatsoever reproduces w, so wspan(S). This is a hard structural limit of the actuator layout, not a matter of drive authority: scaling the channels cannot help, because the span is a two-dimensional plane inside a four-dimensional response space.

Result

The actuator set can reproduce (3,3,3,0), in infinitely many ways, but cannot reproduce (1,1,1,1) at all. The reachable set is two-dimensional despite three channels, because channel 3 is a fixed combination of the other two. Removing it would reduce hardware without reducing capability; adding a genuinely new direction is the only way to extend the reachable set.

Applications &amp; Industry Use

Aerospace &amp; control

Reachable set of a control allocation

The set of moments and forces an actuator suite can command is the span of the individual effector columns. Sizing the suite is a question of whether the required envelope lies inside that span, and control allocation solves the membership problem in real time subject to rate and position limits.

Chemical &amp; process engineering

Achievable blend compositions

Feedstocks with fixed composition vectors span the set of compositions reachable by unconstrained mixing. A specification outside that span is unachievable with the available stock, however the blend is optimised, which is worth establishing before running a scheduler.

Signal processing

Dictionary coverage

A synthesis dictionary spans a subspace of signal space. Signals inside it are representable exactly; signals outside can only be approximated, with the residual measuring the shortfall. Dictionary design is the deliberate enlargement of that span for a target signal class.

Structural engineering

Space of admissible self-stress states

For a tensegrity or cable structure, the self-stress states span a subspace of member force space. Form-finding selects a member of that span with the required sign pattern, and its dimension tells the designer how much prestress freedom the topology offers.

Computer graphics

Blend-shape expression space

A facial rig's achievable expressions are the span of its sculpted target shapes. Redundant targets waste artist time and storage without extending the expression space, and are detected as rank deficiency of the target matrix.

Metrology

Observable subspace of a sensor array

The states a sensor array can distinguish form the span of its sensitivity vectors. States differing by a vector orthogonal to that span are indistinguishable, which sets a hard limit on what any estimation algorithm can recover from the measurements.

Design Considerations

Never confuse the generating set with the span

Documentation, APIs and reports should be explicit about which object is meant. Storing S is cheap and exact; enumerating span(S) is impossible. A function returning "the span" must in practice return a spanning set, and the convention should be stated.

More generators is not more reach

Adding a vector already in the span changes nothing except the cost of every subsequent computation. Before adding a channel, an actuator or a dictionary atom, check that it is genuinely outside the current span; a rank test on the augmented generator matrix answers this in one reduction.

Prefer a minimal spanning set for storage and computation

Redundant generators inflate the size of every linear system built on them and make coefficients non-unique, which complicates interpretation. Reducing to a minimal set costs one factorisation and pays back on every use, though it discards the original physical labelling of the discarded generators.

Membership testing needs a tolerance in floating point

An exact consistency test on measured data will almost always report non-membership, because rounding and noise push the target microscopically off the subspace. Compute the least-squares residual instead and compare it against the noise floor; report the residual, not a boolean.

Comparing spans requires mutual containment

Two spanning sets that share no vectors can generate the same span. Test equality by checking that every generator of each lies in the span of the other, or by comparing canonical forms; comparing the sets element by element answers a different and usually irrelevant question.

Count generators before trusting coverage

A set of fewer than m vectors cannot span m, so a counting argument gives a free necessary condition. It is never sufficient: m vectors span only when they are independent, which requires a rank computation.

Standards &amp; 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: MathematicsGoverns set-builder notation, the angle-bracket and span forms, and the upright typesetting of operator names used throughout this page.
LAPACK / BLAS referenceLinear Algebra PACKage reference implementationMembership and rank questions about a span are answered in practice by xGELSD (least-squares residual) and xGEQP3 (rank-revealing QR), which return numerical rank and an orthonormal basis for the span.
IEEE 754-2019IEEE Standard for Floating-Point ArithmeticDefines the arithmetic in which the membership residual is computed, and hence why exact membership tests on measured data are meaningless without a stated tolerance.
ISO/IEC 40314Mathematical Markup Language (MathML) Version 3.0Encodes set-builder expressions and column vectors semantically, preserving the distinction between the generating set and the generated set.
ISO 10303-42STEP — Geometric and topological representationRepresents lines and planes in product data as a point together with spanning direction vectors, exactly the finite-generator description used here.

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 arithmeticSmall symbolic problems where membership must be decided definitively and generators are exact.Gives an unambiguous yes or no with exact coefficients, but coefficient growth during reduction makes it impractical beyond modest sizes.
IEEE 754 binary64 with least-squares residualMeasured or simulated generators, where membership is approximate by nature.Robust and quantitative, replacing a boolean by a residual, but requires a defensible noise-floor threshold to interpret.
Orthonormal basis from QR or SVDRepeated membership tests against the same span, or when projection onto the span is needed.One factorisation makes each subsequent test a cheap projection, and the basis is numerically well behaved, but the physical identity of the original generators is lost.
Sparse generator storageHigh-dimensional spans generated by localised vectors, as in finite element or text data.Keeps memory proportional to non-zeros, but orthogonalisation causes fill-in and destroys the sparsity that motivated the format.
Finite field arithmeticCoding theory, where the span of a generator matrix is the code itself and is genuinely finite.Exact and fast, with a span of size qr that can be enumerated; but the structure need not mirror the real or rational case.
Non-negative or convex coefficient restrictionBlending, mixing and probability applications where negative coefficients are meaningless.The reachable set becomes a cone or a polytope rather than a subspace, so membership requires linear programming instead of row reduction.

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

One test is one reduction of an m×(p+1) matrix, about O(mpmin(m,p)) operations. Testing k candidate vectors against the same span should not repeat that work: factorise the generator matrix once, then each test is a projection costing O(mr). The break-even point is reached almost immediately.

Doing it by hand

Augment with the candidate and reduce. Look at the final column first: a leading one there ends the question immediately, before any coefficients are extracted. Only when membership is confirmed is it worth reading the coefficients, and then setting free variables to zero gives the simplest representative.

Library behaviour

SymPy exposes Matrix.columnspace(), returning a subset of the original columns that spans the same set. NumPy and SciPy work with orthonormal bases instead: scipy.linalg.orth returns an orthonormal basis from the SVD, and numpy.linalg.lstsq gives the residual on which any practical membership test should be based. The two families answer the same question with different guarantees.

Detecting redundant generators

Compare the rank r of the generator matrix with the count p. If r<p, the null space basis gives explicit relations identifying which generators can be discarded. A rank-revealing QR with column pivoting additionally orders the columns by significance, which is the practical way to choose which generators to keep.

Verifying a claimed membership

Do not re-solve. Recompute the combination from the reported coefficients and compare with the target, reporting a relative residual. This checks the coefficients and the arithmetic together, and is one matrix-vector product rather than a full reduction.

Failure Modes &amp; Common Mistakes

Failure modes, root causes and prevention
Failure mode / mistakeImpactRoot causePrevention & detection
Treating the span as a finite listhighConfusing the generating set with the set it generates, then attempting to enumerate or index the span.Use distinct names in prose and in code. Any function claiming to return a span must document that it returns generators.
Concluding non-membership from a failed guesshighTrying a few coefficient values, failing to hit the target and declaring it unreachable.Only an inconsistent reduction proves non-membership. Run the augmented reduction and inspect the final column.
Exact membership test on floating-point datahighTesting a residual against zero when the generators come from measurement.Report the relative least-squares residual and compare it against the data noise level; never test for exact equality.
Assuming coefficients are uniquemediumReporting a solver's coefficient list as the representation when the generators are redundant.Compare r with p. If r<p, state the whole family or the criterion used to select one representative.
Adding generators to increase reachmediumAdding a vector already inside the span, expecting more capability.Test the candidate for membership first. Only a vector outside the current span enlarges it.
Comparing spans by comparing generating setsmediumConcluding two spans differ because their generator lists differ.Establish mutual containment, or compare canonical forms of the generator matrices.
Ignoring sign or magnitude constraintsmediumDeclaring a blend or dispatch achievable because it lies in the span, while the required coefficients are negative or exceed capacity.Check the coefficients against their physical domain; if constrained, the reachable set is a cone or polytope, not a subspace.
Assuming a generator count guarantees coveragelowConcluding that m vectors span m without checking independence.Counting gives only a necessary condition. Compute the rank of the generator matrix and require it to equal m.

FAQs

Is the span always infinite?

Almost always. It is finite only if every generator is the zero vector or the set is empty, in which case the span is {0}. Any single non-zero generator already produces an infinite family of scalar multiples. Over a finite field the span is finite but still typically much larger than the generating set.

How do I show a vector is not in a span?

Augment the generator matrix with the candidate and row-reduce. A leading one in the final column proves inconsistency, hence non-membership, and the argument is complete. Failing to find suitable coefficients by trial proves nothing.

Can two different sets have the same span?

Yes, routinely. Scaling a generator, or replacing one by its sum with another, leaves the span unchanged. This is why spans are compared by mutual containment rather than by comparing generator lists, and why a subspace has infinitely many spanning sets.

What is the relationship between a span and a column space?

They are the same object viewed differently. The column space C(A) is by definition the span of the columns of A. Phrasing a problem in terms of column space emphasises the matrix; phrasing it as a span emphasises the generators.

Does the span depend on the order of the generators?

No. Addition is commutative, so any reordering produces the same set. Order does affect which coefficients a solver reports when they are not unique, and which generators a pivoting strategy chooses to keep when the set is reduced.

How many vectors do I need to span all of m?

At least m, and exactly m suffice only if they are linearly independent. Fewer than m can never span the space, so a count gives a quick necessary condition, but sufficiency always requires a rank computation.

Is a span always a subspace?

Yes. It contains 0 (take all coefficients zero) and is closed under addition and scalar multiplication, since a sum or multiple of linear combinations is again a linear combination. In fact it is the smallest subspace containing the generating set.

References

  1. Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section SS, Subsection SSV. Licensed under the GNU Free Documentation License v1.2.
  2. ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
  3. Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
  4. Anderson, E. et al. LAPACK Users' Guide, 3rd edition. Society for Industrial and Applied Mathematics, 1999.
  5. Trefethen, L. N. and Bau, D. Numerical Linear Algebra. Society for Industrial and Applied Mathematics, 1997.

AI Suggested Questions

  • Given four vectors in R^5, determine the dimension of their span and produce a minimal spanning subset with justification.
  • Show two spanning sets with no vectors in common that generate the same subspace, and prove the equality by mutual containment.
  • How should a numerical membership test be formulated so that it degrades gracefully as measurement noise increases?
  • Explain how restricting coefficients to be non-negative turns a span into a convex cone, and how membership testing changes.
  • Compare the span of the columns of a matrix with the span of its rows for a specific rank-deficient example.
  • Why does adding a vector already in the span leave the reachable set unchanged but increase the cost of every subsequent solve?

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