A linear subspace is a subset of a vector space that contains the zero vector and is closed under vector addition and scalar multiplication. With these inherited operations, it is itself a vector space over the same field as the containing space. Subspaces are fundamental objects in linear algebra: they describe directions, solution sets of homogeneous equations, and smaller spaces embedded within larger ones. Their elements need not be geometric arrows; they may also be matrices, polynomials, or functions. (math.brown.edu)
Definition and subspace test
Let be a vector space over a field . A subset is a subspace if:
- ;
- whenever ;
- whenever and .
Equivalently, a nonempty subset is a subspace precisely when
This criterion says that is closed under linear combinations. Nonemptiness matters: the empty set satisfies the closure conditions vacuously but is not a vector space. Additive inverses follow by choosing the scalar , while the remaining vector-space axioms are inherited from . (math.brown.edu)
The scalar field is part of the definition. For example, the real numbers form a subspace of the complex numbers when the latter are regarded as a real vector space, but not when they are regarded as a complex vector space: multiplication by does not preserve the real numbers. (homepages.ucl.ac.uk)
Geometric and algebraic examples
Every vector space has the zero subspace and the whole space . A proper subspace is one unequal to . In , the subspaces are the origin, lines through the origin, and the entire plane. In , planes through the origin are additional possibilities. In particular,
is a plane subspace, since addition and scalar multiplication preserve its defining equation. (ocw.mit.edu)
A line or plane not containing the origin is not a linear subspace. A translated set is instead an affine subspace; it is linear exactly when . Thus defines an affine plane rather than a linear one. (math.brown.edu)
Subspaces also arise without geometric coordinates. The polynomials of degree at most , together with the zero polynomial, form a subspace of . Likewise, symmetric real matrices form a subspace of the space of square matrices of a fixed size. These examples illustrate that the defining issue is closure under operations, not the appearance of the elements. (math.brown.edu)
Span, basis, and dimension
For a collection of vectors , its linear span consists of all finite linear combinations of elements of . It is the smallest subspace containing . Consequently, specifying spanning vectors is one way to describe a subspace. (homepages.ucl.ac.uk)
A basis of is a spanning collection satisfying linear independence. Its size defines the dimension of . If is finite-dimensional, then
Equality forces . Every basis of can be extended to a basis of , distinguishing directions already present in the subspace from additional directions in the ambient space. (homepages.ucl.ac.uk)
For the plane , one possible basis is
Every point in the plane is a unique linear combination of these two vectors, so the plane has dimension two. (ocw.mit.edu)
Intersections, sums, and complements
The intersection of any nonempty family of subspaces of is again a subspace. The union of two subspaces generally is not: adding a vector from one to a vector from the other may leave the union. For two subspaces , their union is a subspace exactly when one is contained in the other. (cfm.brown.edu)
Their sum is
the smallest subspace containing both. For finite-dimensional subspaces,
The subtraction accounts for directions shared by the two spaces. (cfm.brown.edu)
If , each element of the sum has a unique decomposition ; the sum is then called a direct sum, written . A complement of in is a subspace for which . Every subspace of a finite-dimensional vector space has a complement, though it is generally not unique. (cfm.brown.edu)
Linear maps and equations
For a linear map , its kernel is a subspace of , and its image is a subspace of . For a matrix , these become its nullspace and column space. A homogeneous system of linear equations therefore always has a subspace as its solution set. (ocw.mit.edu)
The rank–nullity theorem relates their dimensions:
when is finite-dimensional. For an matrix, the nullspace consequently has dimension , where rank is the dimension of the column space. If has a particular solution , its complete solution set is , generally an affine rather than linear subspace. (ocw.mit.edu)
Orthogonality and approximation
An inner product provides a distinguished complement in finite dimensions. The orthogonal complement
is a subspace, and . Each vector decomposes uniquely into a component in and a perpendicular component. (cfm.brown.edu)
The first component is its orthogonal projection onto , the unique nearest point of in the induced norm. In ordinary least squares, fitted vectors are projections of the observed response vector onto the design matrix’s column space; residuals lie in its orthogonal complement. This connects subspace geometry directly with approximation and regression. (ocw.mit.edu)