Engineering/Mathematics/Vector Spaces
Bases
A basis is a set that spans a vector space and is linearly independent — enough raw material to build every element, with none left over. That combination is what makes the coordinates of a vector unique, and unique coordinates are what turn an abstract space into something a computer can hold.
- Core level
- Stream: bases
- Reading time 14 min
- Ref KVS-ENG-MATH-0065
- Taxonomy
- Engineering / Mathematics
- Prerequisite
- Spanning sets, linear independence
- Definition
- Independent and spanning
- Consequence
- Every vector has exactly one coordinate list
- Uniqueness
- Bases are not unique; their size is
- Standard bases
- , , matrix units
Overview
A spanning set guarantees sufficiency: every element of the space can be assembled from it. Linear independence guarantees economy: nothing in the set is expressible from the rest. A basis is a set with both properties, and the pairing is not arbitrary. Sufficiency without economy gives representations that are not unique; economy without sufficiency leaves elements that cannot be represented at all. Only together do the two conditions produce a usable coordinate system.
The immediate consequence is the one that matters in practice. If is a basis, then every vector of the space is a linear combination of the elements of in exactly one way. Existence of the combination comes from spanning and uniqueness comes from independence, so the two halves of the definition supply the two halves of the conclusion. That unique list of scalars is the vector's coordinate representation, and it is what allows a polynomial, a matrix, a signal or a displacement field to be stored, transmitted and operated on as an array of numbers.
Bases are far from unique. Multiplying any one element of a basis by a non-zero scalar produces a different basis, as does replacing one element by its sum with another. Every non-trivial vector space therefore has infinitely many bases, and choosing among them is an engineering decision with real consequences for conditioning, sparsity and interpretability. Certain choices are conventional enough to be called standard — the unit vectors in , the monomials in , the single-entry matrices in — but that status is a matter of convenience rather than of definition.
Bases are also the point at which the earlier matrix machinery re-enters the abstract theory. Several results established for matrices produce, as their conclusion, a set that is simultaneously independent and spanning: the vectors obtained from the reduced form of a homogeneous system are a basis for a null space, the pivot columns of a matrix are a basis for its column space, and the non-zero rows of a reduced row-echelon form are a basis for the row space. Those theorems were named for bases before the word had been defined, and they remain the fastest computational route to one.
Definition
Basis
BLet be a vector space. A subset is a basis of if it satisfies both of the following:
- is linearly independent: the only relation among its elements is the trivial one, with every .
- spans : .
Neither condition implies the other. A set can span without being independent (too large) or be independent without spanning (too small). The definition demands both, which is why a basis is simultaneously a minimal spanning set and a maximal independent set.
Standard Unit Vectors
SUVThe vectors , where has a in position and zeros elsewhere. They are the columns of the identity matrix .
The set is a basis of , and the coordinates of a vector with respect to it are simply its entries — which is why coordinate notation feels like no choice has been made at all.
Coordinates Relative to a Basis
CRBIf is a basis of and , then there is exactly one list of scalars with . That list is the coordinate representation of relative to .
Uniqueness fails the moment independence does. Two distinct representations of the same vector differ by a non-trivial relation of linear dependence among the generators.
Concepts
Enough, and not too much
The two defining conditions answer opposite questions. Spanning asks whether the supply is sufficient: can every element of be built? Independence asks whether the supply is wasteful: is any element of the set already obtainable from the others? A basis is exactly the balance point, and each condition guards against a distinct failure.
A spanning set that is not independent still builds everything, but with slack: some element can be dropped and the remainder still spans, and every vector has more than one representation. An independent set that does not span wastes nothing, but leaves part of the space unreachable. Both failure modes occur routinely in practice — the first as an over-parameterised model, the second as an incomplete one — and diagnosing which has occurred is the reason both conditions are checked separately.
Unique representation, and why it is the whole point
Suppose is a basis and some has two representations, and . Subtracting gives , which is a relation of linear dependence on . Independence forces every coefficient to vanish, so for all and the two representations coincide.
Existence of at least one representation is the spanning condition; uniqueness is the independence condition. The pair is what makes the map from vectors to coordinate lists well defined and reversible, and everything computational follows from it: a polynomial becomes an array of coefficients, a linear transformation becomes a matrix, and abstract algebra becomes arithmetic on numbers.
Standard bases for the standard spaces
Theorem. The set of standard unit vectors is a basis of . Independence follows because these are the columns of the identity matrix, which is nonsingular, and the columns of a nonsingular matrix are independent. Spanning follows by direct construction: any with entries equals .
The same pattern supplies convenient bases elsewhere. In the monomials form a basis of elements, and so does the nested family . In the matrix units , each with a single entry equal to , form a basis. In each case the coordinates relative to the standard basis are exactly the coefficients or entries already used to write the object down, which is why the choice is invisible until a different basis is needed.
Bases are not unique, but their size is
Given any basis, scaling one element by a non-zero scalar yields another basis; so does replacing one element by its sum with a second. Applying any invertible change of coordinates to the whole set produces yet another. Every vector space with a non-zero element therefore has infinitely many bases, and no formal criterion distinguishes one as canonical. The term standard basis denotes a conventional choice, not a defined object.
What is forced is the number of elements. Every basis of a given space has the same size, and that common size is the dimension. This is the result that makes counting arguments possible, and it is also a practical shortcut: once the dimension is known, a candidate set of exactly the right size needs only one of the two conditions checked, since for such a set independence and spanning imply each other.
Where bases come from computationally
The abstract definition says what a basis is but not how to obtain one. In practice the constructions come from row reduction. Solving a homogeneous system and reading off the vectors attached to the free variables yields a basis for the null space. Selecting the pivot columns of the original matrix yields a basis for the column space. Taking the non-zero rows of a reduced row-echelon form yields a basis for the row space. Reducing an over-large spanning set by discarding vectors that are combinations of earlier ones yields a basis for its span.
Each of these was proved to give an independent spanning set before the word basis was available, and each remains the standard computational route. The practical significance is that a subspace presented in any of the usual forms — as a null space, a column space, a row space, or the span of an arbitrary list — can be converted to an explicit basis by a single row reduction.
Choosing a basis is an engineering decision
Because infinitely many bases exist, the choice is free and consequential. The monomial basis for is the obvious one and is badly conditioned above roughly degree fifteen, where coordinates become enormous and mutually cancelling; a Chebyshev or Legendre basis represents the identical space with coordinates that are stable to compute and interpret. An orthonormal basis makes each coordinate a single inner product rather than the solution of a system. A basis of eigenvectors turns a coupled dynamic model into independent scalar modes.
The trade-offs are concrete: conditioning, sparsity of the resulting matrices, cost of computing coordinates, locality of support, and interpretability of individual coordinates. None of these is visible in the definition, and all of them determine whether a computation in the chosen coordinates is trustworthy.
Verifying that a candidate set is a basis
Equations
Definition of a basis
EQ-BAS-01Two independent conditions, both required. Neither implies the other for a set of arbitrary size.
Standard basis of
EQ-BAS-02The construction proving that the standard unit vectors span. Independence follows because they are the columns of the nonsingular matrix .
Two bases for the polynomial space
EQ-BAS-03Both have elements, as every basis of must. The second is a triangular change of coordinates away from the first.
Matrix units as a basis of
EQ-BAS-04The matrices form a basis of ; the coordinates of a matrix relative to it are its entries.
Uniqueness of coordinates
EQ-BAS-05The final implication is exactly linear independence. Spanning supplies existence of a representation; independence supplies its uniqueness.
Basis for the worked example subspace
EQ-BAS-06A two-element basis for a subspace of the four-dimensional space , obtained by solving the two constraints for two of the four coefficients.
Generating new bases from old
EQ-BAS-07Scaling one element, or adding a multiple of one element to another, preserves both defining conditions. Infinitely many bases therefore exist.
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| Vector space | The space for which a basis is sought | any vector space over C | |
| Basis | A linearly independent spanning set for | subset of V | |
| Basis vector | An individual element of a basis | element of V | |
| Coordinate | The unique scalar weighting in the representation of a given vector | element of C | |
| Standard unit vector | Column of the identity matrix; element of the standard basis of | vector in C^m | |
| Matrix unit | The matrix with a single non-zero entry, equal to , in row and column | element of M_mn | |
| Polynomial space | Polynomials of degree at most ; every basis has elements | vector space of dimension n+1 | |
| Subspace | The constrained subspace for which a basis is constructed in the worked example | subspace of P_3 | |
| Basis size | Number of elements in a basis; identical for every basis of a given space | non-negative integer |
Worked Numerical Example
Problem statement
A beam element of normalised length is supported at both ends, at and . Its admissible transverse shapes are modelled as cubic polynomials that vanish at both supports. Construct a basis for the space of admissible shapes, verify both defining conditions, and read off the coordinates of a particular shape.
State the space
The ambient space is , the cubics, which has dimension four. The support conditions are two homogeneous linear conditions on the coefficients, so the admissible shapes form a subspace .
Convert the constraints to equations on the coefficients
Write . Evaluating at and at gives two homogeneous equations.
Solve for the dependent coefficients
Adding the two equations gives , so . Subtracting gives , so . Two coefficients are free, and , and two are determined.
Split a generic admissible shape
Substituting the dependent coefficients back into and collecting the terms multiplying each free coefficient exhibits an arbitrary element of as a linear combination of two fixed polynomials.
Confirm the spanning condition
The previous line is itself the proof: every is a combination of and , so . The reverse containment holds because each generator lies in — both and hold at , and and hold at . Hence .
Confirm linear independence
Set a general relation of linear dependence equal to the zero polynomial and expand. Equality in is equality of coefficients, so the coefficient of gives and the coefficient of gives immediately. Only the trivial relation exists, so is independent and therefore a basis of .
Read off coordinates
Because is a basis, every admissible shape has exactly one coordinate pair. For the shape , which satisfies and , matching the cubic and quadratic coefficients gives the coordinates directly.
Demonstrate that the basis is not unique
Take the sum and difference of the two basis elements. The transformation between the two sets is invertible, so is also independent and spans the same subspace — it is a second basis of , and the same shape now has coordinates , since and .
The admissible shape space has the two-element basis , so it is two-dimensional: a cubic constrained to vanish at both supports retains exactly two degrees of freedom, one antisymmetric and one symmetric about the midspan. Any element analysis can therefore be parameterised by two numbers rather than four, and the same shape carries different coordinates under a different basis while remaining the same physical deflection. The choice between and is a modelling convenience; the dimension of two is not.
Applications & Industry Use
Shape functions as a basis for the element space
Each finite element restricts the displacement field to a finite-dimensional space, and the shape functions are a chosen basis for it. Nodal values are the coordinates relative to that basis, which is why assembling a global stiffness matrix is legitimate: independence guarantees each nodal degree of freedom is genuinely distinct, and spanning guarantees every admissible element deformation is representable.
Transform bases and the choice between them
The discrete Fourier, cosine and wavelet transforms are changes of basis on a finite-dimensional signal space. All represent the same signals, and all have the same number of elements, but they differ in which signals have sparse coordinates. Compression works by choosing a basis in which the coordinates of typical signals are concentrated, then discarding the rest.
Twist and wrench bases in screw theory
The space of spatial velocities of a rigid body is six-dimensional, and a basis of six twists gives every motion a unique six-number coordinate list. Choosing a basis aligned with joint axes makes the Jacobian sparse and physically interpretable; an arbitrary basis represents the same motions with no structural advantage and worse conditioning.
Independent reactions as a basis for the reaction space
Element balances define a subspace of stoichiometric coefficient vectors, and a basis for it is a set of independent reactions. Every overall transformation the system can undergo is a unique combination of them, so the number of basis elements is exactly the number of extents of reaction a process model requires — no more and no fewer.
Modal bases and decoupled dynamics
When a state matrix is diagonalisable, its eigenvectors form a basis of the state space, and the coordinates relative to that basis evolve independently. A coupled multivariable model becomes a set of scalar first-order responses, which is the standard route to modal analysis, mode-selective damping and reduced-order models built by discarding fast coordinates.
Principal components as a data-derived basis
Principal component analysis constructs an orthonormal basis for the span of a data set, ordered so that early coordinates carry most of the variance. The basis is derived from the data rather than chosen in advance, and truncating it gives a lower-dimensional space whose approximation error is quantified by the discarded singular values.
Design Considerations
Treat the choice of basis as a conditioning decision
The monomial basis for becomes severely ill-conditioned above roughly degree fifteen, so coordinates computed in it are dominated by cancellation. Chebyshev and Legendre bases span exactly the same space with coordinates that remain well scaled. Since all bases of a space are equivalent mathematically and not numerically, choose on numerical grounds and convert at the interface.
Prefer an orthonormal basis when coordinates must be computed repeatedly
For a general basis, finding coordinates requires solving a linear system. For an orthonormal basis in a space with an inner product, each coordinate is a single inner product, and the transformation is perfectly conditioned. The cost is the one-off orthonormalisation, which is usually repaid after a handful of coordinate computations.
Exploit the size shortcut once dimension is known
Verifying both conditions is roughly twice the work of verifying one. If the dimension of the space is already established and the candidate set has exactly that many elements, checking independence alone is sufficient, because for a set of the right size the two conditions are equivalent. Confirm the size first; the shortcut is invalid for a set of any other size.
Choose locality when matrices must stay sparse
B-spline, wavelet and finite element bases have locally supported elements, so each basis element interacts with only a few others and the resulting matrices are banded or sparse. A global basis such as the monomials or a full Fourier set produces dense matrices for the same problem. For large systems the sparsity of the basis dominates the total solution cost.
Do not confuse a basis with a canonical object
There is no such thing as the basis of a space; the term standard basis records a convention. Any result stated in coordinates is therefore relative to a stated basis, and comparing coordinate lists produced under different bases is meaningless. Record the basis alongside any exported coordinate data, as geometry and colour interchange formats do explicitly.
Watch for near-dependence in computed bases
A set that is independent in exact arithmetic can be numerically close to dependent, in which case coordinates are large, ill-determined and highly sensitive to perturbation. Report the condition number of the matrix whose columns are the basis vectors, or the ratio of largest to smallest singular value, whenever coordinates are computed from measured data.
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 | Fixes the notation for indexed families, the identity matrix and its columns, and set membership, which is the notation in which a basis and its coordinate map are specified unambiguously. |
ISO 2041 | Mechanical vibration, shock and condition monitoring — Vocabulary | Defines mode shape and modal coordinate, terms whose precise meaning is that the mode shapes form a basis for the space of admissible motions and the modal coordinates are the unique coefficients relative to it. |
LAPACK / BLAS reference | Linear Algebra PACKage reference implementation | Provides the practical basis constructions: xGEQRF for an orthonormal basis of a column space, xGESVD for a numerically robust basis and null space, and xGEQP3 when a basis must be selected from among given vectors. |
ISO/IEC 40314 | Mathematical Markup Language (MathML) Version 3.0 | Encodes indexed basis families and coordinate expressions as structured markup, so that a subscripted basis element remains distinguishable from a coordinate in machine-readable form. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Governs the arithmetic in which coordinates are computed; the catastrophic cancellation that makes a high-degree monomial basis unusable is a direct consequence of finite significand length. |
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 |
|---|---|---|
| Standard unit vectors in | Default coordinate space, and any setting where the natural coordinates are already the quantities of interest. | Coordinates are the entries themselves and cost nothing to obtain, but the basis carries no problem structure and gives no decoupling. |
| Monomial basis for | Low degree polynomial models, symbolic work and interchange with systems expecting plain coefficients. | Simple and universally understood, but conditioning degrades rapidly with degree and coordinates lose accuracy to cancellation above about degree fifteen. |
| Orthogonal polynomial basis (Chebyshev, Legendre) | Higher degree approximation, data fitting and numerical quadrature. | Excellent conditioning and stable coefficient decay that also indicates truncation error, at the cost of a conversion step at every interface. |
| Orthonormal basis obtained by QR or SVD | Coordinates must be computed many times, or from measured data with uncertainty. | Coordinates reduce to inner products and the transformation is perfectly conditioned, but the basis vectors are generally dense and lose any physical interpretation the originals had. |
| Locally supported basis (B-spline, wavelet, finite element) | Large problems where the assembled matrices must remain sparse and local refinement is required. | Produces banded matrices and cheap local edits, at the cost of a more complex indexing scheme and basis elements that are not globally smooth. |
| Eigenvector or modal basis | Dynamic models where decoupling the response into independent modes is the objective. | Diagonalises the dynamics and permits principled model reduction, but exists only for diagonalisable operators and becomes ill-conditioned when eigenvalues are close. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
Cost of verifying a candidate basis
Both conditions reduce to row reductions of an matrix, where is the ambient dimension and the number of candidates, each costing operations. Independence is decided by the rank of that matrix and spanning by the consistency of the same matrix against a symbolic right-hand side, so the two tests share almost all their arithmetic. When the target dimension is known and matches it, one reduction settles both.
Extracting a basis from a reduced row-echelon form
Three standard extractions all come from a single reduction. The vectors attached to the free variables of a homogeneous system are a basis for the null space. The columns of the original matrix in the pivot positions are a basis for the column space — not the pivot columns of the reduced form, which span a different subspace. The non-zero rows of the reduced form are a basis for the row space, and unlike the column case these may be taken directly from the reduced matrix.
Orthonormalisation cost and stability
Converting a basis of vectors in to an orthonormal one costs about operations by Householder QR and roughly the same by modified Gram-Schmidt. Classical Gram-Schmidt has the same operation count but loses orthogonality catastrophically on ill-conditioned input, so it should not be used in production. Where the input is close to dependent, an SVD costs more but reports the deficiency quantitatively.
Library behaviour
scipy.linalg.orth returns an orthonormal basis for a column space from the SVD, and scipy.linalg.null_space returns one for the null space, both governed by a singular value tolerance the caller can set. SymPy's Matrix.columnspace and nullspace return exact bases in terms of the original columns and the free variables, which is what is wanted for symbolic or structural work but is unusable on floating-point data.Verifying a computed basis
Two checks are worth running. Confirm the rank of the matrix of basis vectors equals its column count, which certifies independence to within a stated tolerance. Then reconstruct several known elements of the space from their computed coordinates and check the residuals. A basis that is one element short passes the first check and fails the second, so neither is sufficient alone.
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Checking only one of the two conditions | high | Verifying spanning and assuming independence, or the reverse, for a set whose size has not been compared with the dimension. | Test both unless the dimension is known and the candidate has exactly that many elements, which is the only case in which one condition implies the other. |
| Using pivot columns of the reduced form as a column space basis | high | Taking the basis vectors from the reduced row-echelon form rather than from the corresponding columns of the original matrix. | Row operations change the column space. Use the reduced form only to identify which column indices are pivots, then extract those columns from the original matrix. |
| Assuming a standard basis is canonical | medium | Exporting or comparing coordinate lists without recording the basis they refer to. | Treat coordinates as meaningless without an accompanying basis. Record the basis in the data format, as spline and colour interchange standards do explicitly. |
| Using a high-degree monomial basis for numerical work | medium | Choosing the obvious basis for without considering conditioning. | Switch to an orthogonal polynomial basis above modest degree, and convert only at the boundary with systems that require plain coefficients. |
| Treating a near-dependent set as a basis | high | Declaring independence from an exact-arithmetic argument while working with measured or computed vectors. | Compute the smallest singular value or the condition number of the basis matrix, and report coordinates with an uncertainty derived from it. |
| Assuming a basis must be orthogonal | low | Conflating the definition of a basis with the additional structure supplied by an inner product. | The definition requires only independence and spanning. Orthogonality is an extra property that is convenient but neither necessary nor available in a space without an inner product. |
| Producing too few basis vectors from a constraint system | medium | Over-solving the defining constraints so that a genuinely free coordinate is treated as dependent. | Count the basis vectors against the number of free variables after reducing the constraint system, and confirm the count equals the expected dimension. |
| Excluding the empty basis | low | Requiring a basis to be non-empty, so that a trivial subspace has no basis at all. | The empty set is the basis of , which has dimension zero. Admitting it removes a special case from every subspace algorithm. |
FAQs
Why must a basis be both independent and spanning?
Because each condition supplies half of what makes coordinates work. Spanning guarantees that every vector has at least one representation; independence guarantees it has at most one. A spanning set that is dependent gives multiple representations of the same vector, and an independent set that does not span leaves some vectors with no representation at all.
Is the standard basis in some way the correct one?
No. It is a convention chosen because its coordinates coincide with the numbers already used to write elements down. Every non-trivial space has infinitely many bases, all equally valid, and other choices frequently have better conditioning, better sparsity or clearer physical meaning. Only the number of elements is the same across all of them.
How do I obtain a basis for a subspace given only by constraints?
Solve the constraint system for the dependent coordinates in terms of the free ones, substitute back into a generic element, and collect the terms multiplying each free coordinate. Each collected group is a basis vector. This construction produces spanning automatically, and the resulting set is independent because each vector is the only one with a non-zero entry in its own free coordinate.
Can a basis be infinite?
Yes, in an infinite-dimensional space such as the space of all polynomials, where is a basis. Every element is still a finite linear combination, since the definition of span admits only finite sums. Practical computation restricts to a finite-dimensional subspace and treats the truncated part as model error.
If I already know the dimension, do I still need both tests?
No. For a candidate set whose size equals the dimension of the space, independence and spanning imply each other, so verifying either one is enough. The shortcut fails for a set of any other size: a set smaller than the dimension can never span, and a set larger than it can never be independent.
Does a basis have to be orthogonal?
No. Orthogonality requires an inner product, which is extra structure not present in a general vector space, and the definition of a basis does not mention it. Orthonormal bases are worth constructing when one is available, because coordinates then reduce to inner products and the coordinate map is perfectly conditioned, but a perfectly good basis need not be orthogonal at all.
What does it mean if two different bases give different coordinates for the same object?
Nothing is wrong: coordinates are always relative to a basis, and the same vector genuinely has different coordinate lists in different bases. The lists are related by an invertible change-of-basis matrix. This is why any exported coordinate data must record which basis it refers to, and why comparing coordinates across unstated bases is meaningless.
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section B, Subsection B, Definition B and Theorem SUVB. Licensed under the GNU Free Documentation License v1.2.
- Axler, S. Linear Algebra Done Right, 3rd edition. Springer, 2015.
- Trefethen, L. N. and Bau, D. Numerical Linear Algebra. Society for Industrial and Applied Mathematics, 1997.
- 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.
- ISO 2041:2018, Mechanical vibration, shock and condition monitoring — Vocabulary. International Organization for Standardization.
AI Suggested Questions
- Construct a basis for the subspace of of symmetric matrices with zero trace, and state its dimension.
- Compare the condition number of the monomial basis and the Chebyshev basis for on the interval from to .
- Show how a change-of-basis matrix converts coordinates from one basis of a subspace to another, using the two bases in this page's worked example.
- Why are the pivot columns of the reduced row-echelon form the wrong choice for a column space basis, and what goes wrong concretely?
- Explain how principal component analysis constructs a basis from data and how the discarded singular values bound the truncation error.
- For a finite element with locally supported shape functions, show why the assembled stiffness matrix is banded and how the bandwidth depends on the basis.
Related Calculators
Test a candidate set for independence and spanning in , or , and report which condition fails and why.
Subspace Basis BuilderConstruct a basis for a subspace given by homogeneous constraints, a null space, a column space or the span of an arbitrary list.
Coordinate CalculatorCompute the unique coordinates of a vector relative to a chosen basis and report the condition number of the coordinate map.
Change of Basis CalculatorConvert coordinates between two bases of the same space and display the change-of-basis matrix.
