Engineering/Mathematics/Vector Spaces
The Span of a Set in a Vector Space
The span of a set in a vector space is the collection of every linear combination that can be built from , and it is always a subspace of . 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
- , also written
- Key theorem
- is a subspace of for every
- Membership test
- Solve a linear system; consistent means in the span
- Smallest property
- Contained in every subspace that contains
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 inside a vector space , the span of is the set of all vectors of the form 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 always. Additive closure follows because adding two linear combinations of the same vectors and collecting terms produces a linear combination with coefficients . Scalar closure follows because multiplying through by produces coefficients . 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
LCLet be a vector space. Given vectors from and scalars from , their linear combination is the vector . Closure guarantees the result is again an element of .
The definition mentions only vectors, scalars and the two operations, which is exactly why it holds unchanged in , and function spaces.
Span of a Set
SSLet be a vector space and let be a finite subset of . The span of , written or , is the set of all possible linear combinations of the vectors of :
.
The span is generally an infinite set even when is small, which is the point: a finite list of generators describes an infinite subspace exactly.
Span of a Set is a Subspace
SSSLet be a vector space and . Then is a subspace of .
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 , since a zero scalar annihilates any vector, so and the set is non-empty. If has coefficients and has coefficients , then regrouping the sum — permitted by commutativity and associativity of addition — and applying distributivity over scalar addition gives , which is again a linear combination. Multiplying by and applying distributivity over vector addition followed by associativity of scalar multiplication gives coefficients . Since is closed under addition and multiplication, all three results are legitimate members.
The span is the smallest subspace containing
Any subspace that contains every vector of must, by closure, contain every scalar multiple and hence every sum of such multiples — that is, all of . Combined with the theorem that the span is itself a subspace containing , this identifies as the intersection of all subspaces containing , and therefore the smallest one. This characterisation is what justifies calling a generating set and speaking of the subspace generated by .
Membership is a consistency question
To decide whether , write with the unknown, expand both sides in whatever coordinate description the space provides, and equate. The result is a linear system with unknowns and one equation per coordinate. If the system is consistent, 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 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 , equating coefficients of down to gives five equations. In , equating entries gives six. In , equating components gives . The number of unknowns is always the number of vectors in . So a span membership question in a space of dimension generated by vectors is always a system, and its shape is predictable before any arithmetic is done.
Redundancy in the generating set
Nothing in the definition requires the vectors of to be distinct or independent. If one vector of 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 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 is a subspace of and , then is a subspace of and hence of , producing a chain . 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
Equations
Span of a finite set
EQ-SPVS-01The defining description. Every choice of the scalars yields one member, so the span is generally infinite while stays finite.
The zero vector lies in every span
EQ-SPVS-02Non-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-03Regrouping uses commutativity and associativity of addition; the final step is distributivity over scalar addition. Each is again a complex scalar.
Scalar closure of a span
EQ-SPVS-04Distributivity 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-05Here holds the coordinates of the as columns and holds the coordinates of . Membership in a span is nothing more than consistency.
A linear combination in the matrix space
EQ-SPVS-06Matrices are vectors in the technical sense, and their linear combinations are computed entry by entry using the addition and scaling of .
The span is the smallest containing subspace
EQ-SPVS-07Closure forces any subspace containing the generators to contain all their combinations, so the span is contained in every such subspace.
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| Ambient vector space | The space in which the vectors of live and combinations are formed | any vector space | |
| Generating set | The finite set whose combinations are taken | finite subset of V | |
| Number of generators | Size of ; equals the number of unknowns in a membership system | positive integer | |
| Coefficient | Scalar weight applied to in a linear combination | complex number | |
| Second coefficient set | Weights of a second member of the span, used in the closure argument | complex number | |
| Span | All linear combinations of the vectors of ; a subspace of | subspace of V | |
| Candidate vector | The vector whose membership in the span is being decided | element of V | |
| Coordinate matrix | Matrix whose columns are the coordinate vectors of the generators | d x t matrix | |
| Matrix space | All matrices with complex entries; dimension four | vector space |
Worked Numerical Example
Problem statement
A two-port network model stores three candidate coupling matrices in . 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.
Name the generating set
Work in with entrywise addition and scalar multiplication. The stored matrices are
Set up the membership equation for the first target
The first target is . Write and expand the right-hand side entry by entry:
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 , , , :
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 .
Read the coefficients and the degrees of freedom
The reduced form gives and , with free. Taking gives the simplest realisation , which is confirmed by direct addition. The single free variable reflects a redundancy in the stored set: .
Repeat for the second target
The second target is . The coefficient matrix is unchanged; only the constants column differs:
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 . Therefore .
Interpret the structure
The span of the three stored matrices is a two-dimensional subspace of the four-dimensional space , since the reduced coefficient matrix has rank two. The subspace contains and excludes , and every member of it has a one-parameter family of representations in terms of the three generators.
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
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.
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.
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.
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.
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.
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 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 with generators is a system. When is large and is small, the system is tall and thin, and a least-squares or QR approach is more appropriate than full reduction. When exceeds 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, . 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.
| Reference | Title | Relevance to this topic |
|---|---|---|
ISO 80000-2 | Quantities and units — Part 2: Mathematics | Standardises the notation for sets, the angle brackets and the upright rendering of the operator name used throughout this page. |
BLAS Level 2 | Basic Linear Algebra Subprograms, matrix-vector operations | Forming 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 reference | Linear Algebra PACKage reference implementation | Provides xGELS for least-squares solution of the tall membership system and xGEQP3 for detecting redundant generators via a rank-revealing factorisation. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Defines 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 40314 | Mathematical Markup Language (MathML) Version 3.0 | Encodes 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 | Select when | Trade-off |
|---|---|---|
| Exact rational coefficients | Deciding 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 binary64 | Engineering 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 binary32 | Very 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 matrix | Few 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 storage | Generators 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 basis | Repeated 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 and reducing a augmented matrix costs about operations for . 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 .
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 mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Equating before fully expanding | high | Reading 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 ordering | high | Listing 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 row | medium | Confusing 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 unique | medium | Reporting 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 span | medium | Believing 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 data | high | Testing 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 set | low | Treating and 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 subspace | low | Overlooking that a sufficiently rich generating set spans all of , in which case membership is automatic. | Compare the rank of the generator matrix with the dimension of 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 and ?
is a finite list of vectors; is the infinite collection of everything reachable from them by scaling and adding. 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 is already a combination of the vectors of , then any combination using 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 . 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 , the monomials span , and the single-entry matrices span . 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
- 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.
- Halmos, P. R. Finite-Dimensional Vector Spaces, 2nd edition. Springer, 1974.
- Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
- Anderson, E. et al. LAPACK Users' Guide, 3rd edition. Society for Industrial and Applied Mathematics, 1999.
AI Suggested Questions
- Given four matrices in , compute the dimension of their span and identify which of them are redundant.
- Show me a polynomial that is not in the span of 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
Decide whether a vector, polynomial or matrix lies in the span of a given set, and return the coefficients when it does.
Span Dimension CalculatorCompute the dimension of the span of a set of vectors and flag which generators are redundant.
Linear Combination CalculatorForm a weighted combination of stored vectors, polynomials or matrices with user-supplied scalars.
