Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Subspaces






Vector Spaces Inside Vector Spaces

A subspace is a subset of a vector space that is itself a vector space under the same operations. Lines and planes through the origin in R³, null spaces and column spaces of matrices, and solution sets of homogeneous systems are all subspaces. A simple two-condition test determines whether a given subset qualifies.



Definition

A subspace of a vector space VV is a nonempty subset WVW \subseteq V that is itself a vector space when equipped with the same addition and scalar multiplication as VV.

Most of the ten axioms — commutativity, associativity, distributivity, the identity 1v=v1\mathbf{v} = \mathbf{v} — hold automatically in WW because they hold for all vectors in VV, and vectors in WW are vectors in VV. The properties that can fail are the closure conditions: the sum of two vectors in WW might land outside WW, or scaling a vector in WW might produce something not in WW. These are the only things that need checking.

Subspace Notation

Notation

Subspace Notation

The containment sign here is doing more work than it does in set theory — it is asked to carry a structural claim it cannot actually make on its own. Alongside it sit the two subspaces every space owns for free, and a circled plus that adds a uniqueness guarantee to an ordinary sum. All catalogued among the linear algebra symbols.
\subseteq, \cap, \emptyset and set-builder braces come from set operation notation; 0\mathbf{0} and the bold-vector convention from vector notation; Col\operatorname{Col}, Nul\operatorname{Nul} and Row\operatorname{Row} from fundamental-space notation; dim\dim from dimension notation.
WVW \subseteq V
W is contained in V — which is necessary for being a subspace, not sufficient
The same containment sign set theory uses, and it claims only membership: every element of WW lies in VV. Being a subspace is a strictly stronger condition that the symbol cannot express — closure under addition and scalar multiplication, which is what The Subspace Test below exists to check.
Also writtenWVW \le V in algebra texts, where the order symbol is borrowed precisely to say "substructure" rather than "subset" — the same convention that writes HGH \le G for subgroups. It is the honest notation for the claim, and this site does not use it.
Do not confuseReading \subseteq as though it already asserted subspacehood. The unit circle in R2\mathbb{R}^2 satisfies \subseteq and fails every closure test; the symbol is silent about structure, so the test has to be performed rather than read off.
{0}\{\mathbf{0}\} and VV
the zero subspace and the whole space
Every space owns exactly two subspaces for free, and both are called trivial — including VV itself. The braces matter: {0}\{\mathbf{0}\} is a *set containing* the zero vector, a space of dimension 00, while a bare 0\mathbf{0} is the vector itself.
Cases"Proper" excludes VV and nothing else, so a proper subspace may still be trivial in the other direction — {0}\{\mathbf{0}\} is proper. The two words cut the collection differently, which is why careful statements say "proper nonzero subspace" when they mean neither extreme.
Do not confuseThe empty set. \emptyset is not a subspace of anything: a subspace must contain 0\mathbf{0}, so the smallest one is {0}\{\mathbf{0}\} — and this is the one place where a set-theory instinct gives the wrong smallest object.
W1W2W_1 \oplus W_2
the direct sum of W-one and W-two
The circle is a promise. Ordinary W1+W2W_1 + W_2 collects every w1+w2\mathbf{w}_1 + \mathbf{w}_2; the circled version additionally asserts W1W2={0}W_1 \cap W_2 = \{\mathbf{0}\}, which makes each vector's decomposition unique — as Subspaces from Operations below states.
CasesWriting \oplus is therefore a claim, not a choice of typography: V=W1W2V = W_1 \oplus W_2 says the pieces are independent as well as spanning, and it is what licenses dim(W1)+dim(W2)=dim(V)\dim(W_1) + \dim(W_2) = \dim(V) with no correction term.
Same glyph elsewhereThe same circled plus means exclusive or in logic and addition modulo 2 in computing — unrelated jobs that happen to share the glyph, resolved entirely by what stands on either side of it.

The Subspace Test

A nonempty subset WVW \subseteq V is a subspace if and only if it satisfies two closure conditions:

Subspace Test
WV is a subspace    {Wu,vWu+vWvW, cFcvWW \subseteq V \text{ is a subspace} \iff \begin{cases} W \neq \emptyset \\ \mathbf{u}, \mathbf{v} \in W \Rightarrow \mathbf{u} + \mathbf{v} \in W \\ \mathbf{v} \in W,\ c \in \mathbb{F} \Rightarrow c\mathbf{v} \in W \end{cases}
Learn more about this formula: Subspace Test →


Closure under addition: for all u,vW\mathbf{u}, \mathbf{v} \in W, the sum u+v\mathbf{u} + \mathbf{v} is in WW.

Closure under scalar multiplication: for all cRc \in \mathbb{R} and all vW\mathbf{v} \in W, the product cvc\mathbf{v} is in WW.

These two conditions can be compressed into a single closure-under-linear-combinations condition:

Subspace Test Combined
WV is a subspace    W and cu+dvW for all u,vW, c,dFW \subseteq V \text{ is a subspace} \iff W \neq \emptyset \text{ and } c\mathbf{u} + d\mathbf{v} \in W \text{ for all } \mathbf{u}, \mathbf{v} \in W,\ c, d \in \mathbb{F}
Learn more about this formula: Subspace Test Combined →


This single condition captures both closure properties simultaneously.

The requirement that WW be nonempty is essential. Once at least one vector v\mathbf{v} is known to lie in WW, closure under scalar multiplication with c=0c = 0 guarantees 0=0vW\mathbf{0} = 0\mathbf{v} \in W. So the zero vector belongs to every subspace. Conversely, if 0W\mathbf{0} \notin W, then WW cannot be a subspace — this is often the fastest way to disqualify a candidate.

Trivial Subspaces

Every vector space VV has two subspaces that require no verification. The set {0}\{\mathbf{0}\} containing only the zero vector is a subspace: adding 0\mathbf{0} to itself gives 0\mathbf{0}, and scaling 0\mathbf{0} by any scalar gives 0\mathbf{0}, so both closure conditions hold. This is the smallest possible subspace, with dimension zero.

The entire space VV is also a subspace of itself — trivially, since every vector in VV is in VV and every operation on VV stays in VV. This is the largest possible subspace.

Every other subspace lies strictly between these two extremes: it contains 0\mathbf{0} but does not contain everything. Finding and classifying these intermediate subspaces is one of the central tasks of linear algebra.

Subspaces of R² and R³

The subspaces of R2\mathbb{R}^2 are completely classified: {0}\{\mathbf{0}\}, lines through the origin, and R2\mathbb{R}^2 itself. There is nothing else. Every line through the origin has the form {tv:tR}\{t\mathbf{v} : t \in \mathbb{R}\} for some nonzero vector v\mathbf{v}, and it is straightforward to verify that this set is closed under addition and scalar multiplication.

The subspaces of R3\mathbb{R}^3 are: {0}\{\mathbf{0}\}, lines through the origin (dimension 11), planes through the origin (dimension 22), and R3\mathbb{R}^3 itself (dimension 33).

A line that does not pass through the origin — say the set {(1,0)+t(2,3):tR}\{(1, 0) + t(2, 3) : t \in \mathbb{R}\} — is not a subspace. It does not contain 0\mathbf{0}, and adding two vectors on this line produces a vector that is generally not on the line. Similarly, a plane that does not contain the origin fails the subspace test.

The geometric intuition is that subspaces are the "flat" subsets that pass through the origin. In Rn\mathbb{R}^n, every subspace is a span of some set of vectors, and its dimension equals the number of independent vectors needed to span it.
φabspan = ℝ²φabspan = line
The two non-trivial subspaces of R²

A plane through the origin above, a line through the origin below — in two dimensions these are the only shapes a subspace can take besides the origin itself and the whole space. Both pass through the origin, because a subspace must contain the zero vector, and both are closed: adding or scaling anything inside keeps you inside. Move the arrows and watch one become the other on the span and independence explorer.

Anything that misses the origin — a line offset from it, a shifted plane — fails the test before any closure question is asked.

The Null Space

For an m×nm \times n matrix AA, the null space is

Null(A)={xRn:Ax=0}\text{Null}(A) = \{\mathbf{x} \in \mathbb{R}^n : A\mathbf{x} = \mathbf{0}\}


the set of all vectors that AA maps to the zero vector. This is a subspace of Rn\mathbb{R}^n.

Verification is direct. The zero vector satisfies A0=0A\mathbf{0} = \mathbf{0}, so 0Null(A)\mathbf{0} \in \text{Null}(A). If Au=0A\mathbf{u} = \mathbf{0} and Av=0A\mathbf{v} = \mathbf{0}, then A(u+v)=Au+Av=0+0=0A(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v} = \mathbf{0} + \mathbf{0} = \mathbf{0}, so u+vNull(A)\mathbf{u} + \mathbf{v} \in \text{Null}(A). If Av=0A\mathbf{v} = \mathbf{0}, then A(cv)=cAv=c0=0A(c\mathbf{v}) = cA\mathbf{v} = c\mathbf{0} = \mathbf{0}, so cvNull(A)c\mathbf{v} \in \text{Null}(A). Both closure conditions hold.

The dimension of the null space is the nullity. By the rank-nullity theorem, rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n. When AA has full column rank (rank=n\text{rank} = n), the null space is {0}\{\mathbf{0}\} and the map xAx\mathbf{x} \mapsto A\mathbf{x} is injective. When the rank is less than nn, the null space is nontrivial and the map collapses some directions to zero.
R3×3120001000A3×3121243364basis of N(A)3×12−10=03×1000
The null space read off the reduced form

Each free column has produced one special solution, and together they form a basis for everything the matrix sends to zero. The null space is a subspace for a reason visible right here: any combination of these solutions is still killed by the matrix, so the set is closed under exactly the two operations a subspace has to survive. Step through all four spaces on the four fundamental subspaces visualizer.

The column space in the next section is built the same way, from the pivot columns rather than the free ones.

The Column Space

For an m×nm \times n matrix AA with columns a1,,an\mathbf{a}_1, \dots, \mathbf{a}_n, the column space is

Col(A)={Ax:xRn}=Span{a1,a2,,an}\text{Col}(A) = \{A\mathbf{x} : \mathbf{x} \in \mathbb{R}^n\} = \text{Span}\{\mathbf{a}_1, \mathbf{a}_2, \dots, \mathbf{a}_n\}


It is the set of all possible outputs of the linear transformation xAx\mathbf{x} \mapsto A\mathbf{x}, and it lives in Rm\mathbb{R}^m.

The column space is a subspace because the span of any set of vectors is always a subspace. Its dimension equals the rank of AA.

The column space answers the solvability question: the system Ax=bA\mathbf{x} = \mathbf{b} has a solution if and only if b\mathbf{b} lies in Col(A)\text{Col}(A). If b\mathbf{b} is a linear combination of the columns of AA, the coefficients in that combination are a solution vector x\mathbf{x}. If b\mathbf{b} is not in the column space, no solution exists.

To find a basis for the column space, row reduce AA and identify the pivot columns. The corresponding columns of the original matrix AA — not the echelon form — form a basis for Col(A)\text{Col}(A).

The Row Space

The row space of an m×nm \times n matrix AA is the span of the rows of AA, viewed as vectors in Rn\mathbb{R}^n. Equivalently, it is the column space of ATA^T:

Row(A)=Col(AT)\text{Row}(A) = \text{Col}(A^T)


The row space lives in Rn\mathbb{R}^n and has dimension equal to the rank of AA — the same dimension as the column space, despite the two spaces living in different ambient spaces.

A key property is that elementary row operations do not change the row space. Each row operation replaces rows with linear combinations of existing rows, so every row of the echelon form lies in the span of the original rows, and vice versa. The nonzero rows of the echelon form therefore provide a basis for the row space.

The row space and the null space together account for all of Rn\mathbb{R}^n. They are orthogonal complements: every vector in the null space is perpendicular to every row of AA (since Ax=0A\mathbf{x} = \mathbf{0} means the dot product of x\mathbf{x} with each row is zero), and their dimensions add up to nn.
Aspect Null space Null(A) Column space Col(A) Row space Row(A)
Definition { x : Ax = 0 } { Ax : x ∈ ℝⁿ } = Span of columns Span of rows = Col(Aᵀ)
Lives in ℝⁿ ℝᵐ ℝⁿ
Dimension nullity = n − r rank r rank r (same as Col)
Reader question it answers what inputs does A annihilate? (information lost) is Ax = b solvable? (set of reachable outputs) what is the total reach of the rows? (also equals Col(A) dim)
Basis from row reduction parametric form of Ax = 0; one vector per free variable original columns of A at pivot positions (not RREF columns) nonzero rows of the echelon form
Orthogonal complement (in its ambient space) row space Row(A), in ℝⁿ left null space Null(Aᵀ), in ℝᵐ null space Null(A), in ℝⁿ

Subspaces from Operations

New subspaces can be built from existing ones through set-theoretic operations, though not all operations preserve the subspace property.

The intersection of two subspaces W1W_1 and W2W_2 is always a subspace. If u\mathbf{u} and v\mathbf{v} both lie in W1W2W_1 \cap W_2, then u+v\mathbf{u} + \mathbf{v} lies in W1W_1 (since W1W_1 is a subspace) and in W2W_2 (since W2W_2 is a subspace), so it lies in W1W2W_1 \cap W_2. The same argument works for scalar multiples. The intersection can be anything from {0}\{\mathbf{0}\} (if the two subspaces share only the zero vector) to one of the original subspaces (if one contains the other).

The union of two subspaces is almost never a subspace. If uW1W2\mathbf{u} \in W_1 \setminus W_2 and vW2W1\mathbf{v} \in W_2 \setminus W_1, the sum u+v\mathbf{u} + \mathbf{v} typically lies in neither W1W_1 nor W2W_2, violating closure. The only exception is when one subspace contains the other.

The sum W1+W2={w1+w2:w1W1,w2W2}W_1 + W_2 = \{\mathbf{w}_1 + \mathbf{w}_2 : \mathbf{w}_1 \in W_1, \mathbf{w}_2 \in W_2\} is always a subspace — it is the smallest subspace containing both W1W_1 and W2W_2. Its dimension satisfies

dim(W1+W2)=dim(W1)+dim(W2)dim(W1W2)\dim(W_1 + W_2) = \dim(W_1) + \dim(W_2) - \dim(W_1 \cap W_2)


When W1W2={0}W_1 \cap W_2 = \{\mathbf{0}\}, the sum is called a direct sum, written W1W2W_1 \oplus W_2, and every vector in the sum has a unique decomposition as w1+w2\mathbf{w}_1 + \mathbf{w}_2.
Operation on W₁, W₂ ⊆ V Always a subspace? Reason / formula
Intersection W₁ ∩ W₂ closure inherits from both — anything in both stays in both under + and scaling
Union W₁ ∪ W₂ in general not: u ∈ W₁ ∖ W₂ and v ∈ W₂ ∖ W₁ give u + v in neither (exception: one is contained in the other)
Sum W₁ + W₂ = { w₁ + w₂ } smallest subspace containing both; dim(W₁ + W₂) = dim(W₁) + dim(W₂) − dim(W₁ ∩ W₂)
Direct sum W₁ ⊕ W₂ (when W₁ ∩ W₂ = {0}) special case of sum; every v ∈ W₁ ⊕ W₂ has a unique decomposition v = w₁ + w₂

Solution Sets and Subspaces

The solution set of a linear system Ax=bA\mathbf{x} = \mathbf{b} is a subspace only when b=0\mathbf{b} = \mathbf{0}. In that case, the solution set is the null space of AA, which passes the subspace test as shown above.

When b0\mathbf{b} \neq \mathbf{0}, the solution set is not a subspace. It does not contain 0\mathbf{0} (since A0=0bA\mathbf{0} = \mathbf{0} \neq \mathbf{b}), and it is not closed under addition or scalar multiplication in general. However, the solution set has a clean geometric description in terms of subspaces.

If xp\mathbf{x}_p is any one particular solution to Ax=bA\mathbf{x} = \mathbf{b}, then every solution has the form

x=xp+xh\mathbf{x} = \mathbf{x}_p + \mathbf{x}_h


where xhNull(A)\mathbf{x}_h \in \text{Null}(A) is a solution to the homogeneous system Ax=0A\mathbf{x} = \mathbf{0}. The full solution set is a translated copy of the null space — shifted away from the origin by the vector xp\mathbf{x}_p. In geometry, this is an affine subspace (also called a coset or a flat): a subspace that has been displaced from the origin.

This decomposition separates the particular and homogeneous contributions. The particular solution xp\mathbf{x}_p accounts for the right-hand side b\mathbf{b}, while the null-space component xh\mathbf{x}_h parametrizes the freedom in the solution. When the null space is trivial (Null(A)={0}\text{Null}(A) = \{\mathbf{0}\}), the solution is unique: x=xp\mathbf{x} = \mathbf{x}_p with no freedom.

Summary: Subspace Recognition

Every section of this page has answered a version of the same question — when is a given subset of a vector space a subspace? The two-condition test fixes the criterion, but in practice the answer follows almost mechanically from a small catalog of cases: the trivial subspaces; subspaces of ℝⁿ as flats through the origin; the matrix-derived null, column, and row spaces; affine sets that fail because they miss the origin; and asymmetric sets like the first quadrant that fail under negative scaling. The table below collects the recognition card across the candidates the page has discussed, with the verdict and a one-line reason.
A list of examples answers whether each one is a subspace. Sorting them by which clause of the test decides answers something more useful: what to check first, and what a near-miss looks like. The three groups below are the candidates that pass by definition, those that pass because linearity forces them to, and those that fail — with the failing clause named in each case.
Vector spaces · recognition

Subspace or not, and which clause decides

The test has three clauses — contains 0\mathbf{0}, closed under addition, closed under scaling — and a candidate fails by failing one of them. Sorting by which clause is what turns a list of examples into a diagnostic.

8candidates
Passes — by definition or trivially3
1
the largest subspace
VVV \subseteq V
Closure holds because VV is a vector space to begin with. Worth stating so that "subspace" is understood as at most VV rather than strictly smaller — proper subspaces are the special case, not the definition.
2
dim=0\dim = 0; the smallest
{0}\{\mathbf{0}\}
All three clauses hold vacuously: 0+0=0\mathbf{0} + \mathbf{0} = \mathbf{0} and c0=0c\mathbf{0} = \mathbf{0}. Its dimension is zero, not one — the empty set is its basis, since 0\mathbf{0} is dependent on its own and cannot belong to one.
3
automatically a subspace
Span{v1,,vk}\operatorname{Span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\}
A combination of combinations is a combination, so closure is immediate. This is the cheapest way to prove something is a subspace — exhibit it as a span and the test is already passed. Lines and planes through the origin are the k=1k = 1 and k=2k = 2 cases.
Passes — because linearity forces it2
4
subspace of Rn\mathbb{R}^n
Null(A)={x:Ax=0}\operatorname{Null}(A) = \{\mathbf{x} : A\mathbf{x} = \mathbf{0}\}
If Au=0A\mathbf{u} = \mathbf{0} and Av=0A\mathbf{v} = \mathbf{0} then A(cu+dv)=0A(c\mathbf{u} + d\mathbf{v}) = \mathbf{0} — one line, both closure clauses. The homogeneous right-hand side is what makes it work, which is exactly why Ax=bA\mathbf{x} = \mathbf{b} below fails.
5
spans of the columns and rows
Col(A)\operatorname{Col}(A), Row(A)\operatorname{Row}(A)
Both are spans, so they inherit the result above without further argument. Together with the null space and left null space these are the four fundamental subspaces.
Fails — and which clause3
6
fails clause 1 — no 0\mathbf{0}
{x0+tv}\{\mathbf{x}_0 + t\mathbf{v}\}, x0Span{v}\mathbf{x}_0 \notin \operatorname{Span}\{\mathbf{v}\}
Affine rather than linear. The origin test is the cheapest of the three and should be run first — it disqualifies this immediately, with no closure argument needed.
7
fails clause 1 — A0=0bA\mathbf{0} = \mathbf{0} \neq \mathbf{b}
xp+Null(A)\mathbf{x}_p + \operatorname{Null}(A), b0\mathbf{b} \neq \mathbf{0}
The null space translated off the origin. Not a subspace, but a coset of one — which is why the general solution has the shape it does and why its dimension still comes from the null space.
8
{(x,y):x0,y0}\{(x, y) : x \geq 0,\, y \geq 0\}
Contains the origin and is closed under addition — two clauses out of three. Multiplying by 1-1 leaves the set, and that alone disqualifies it. The instructive case: passing most of the test is not passing it.
Note the near-misses are near in different ways. An affine set is closed under nothing that matters because it misses the origin; the first quadrant contains the origin and survives addition but not negative scaling. Both are the same distance from being a subspace and fail for unrelated reasons — which is why all three clauses have to be checked rather than the one that looks likeliest.
Subspace or not, and which clause decides·/linear-algebra/vector-spaces/subspacesLearn Math Class
In practice the origin test comes first because it is nearly free. Two of the three failures below are settled by it alone — an affine line and the solution set of Ax=bA\mathbf{x} = \mathbf{b} both miss 0\mathbf{0}, and neither needs a closure argument. Running the clauses in the order cheap-to-expensive means most non-subspaces are disqualified before any real work.
The first quadrant is the case worth dwelling on, because it passes two clauses out of three. It contains the origin, and the sum of two vectors with non-negative components has non-negative components — everything looks right until scaling by 1-1 leaves the set entirely. Passing most of the test is not passing it, and the clauses fail independently: nothing about closure under addition implies closure under scaling.

Subspaces FAQ

Is every subset of a vector space a subspace?

+
No, and the containment symbol is silent on the matter. The unit circle in R2\mathbb{R}^2 is a perfectly good subset and fails closure immediately, since adding two points on it lands off it. Writing WVW \subseteq V asserts membership only; subspacehood is a structural claim that has to be tested.Read more →

Is the empty set a subspace?

+
No. Every subspace must contain the zero vector, so the smallest possible subspace is {0}\{\mathbf{0}\} rather than \emptyset. This is the one place where set-theoretic instinct points at the wrong smallest object, since in ordinary set theory the empty set sits below everything.Read more →

What does writing V=W1W2V = W_1 \oplus W_2 claim?

+
More than that the pieces combine to give VV. The circled plus asserts independence as well as spanning: every vector decomposes in exactly one way, and the two subspaces meet only at 0\mathbf{0}. That extra content is what licenses adding dimensions directly, with no correction term for overlap.Read more →