Skip to content
LoveToCalc

Theorem — what does that mean?

Vector spaces and subspaces

A vector space is a set with an addition and a multiplication by numbers that obey the usual rules. A subspace is a subset that is itself a vector space: it contains the zero vector and is closed under both operations.

In Swedish: Vektorrum och underrum

Vector spaces and subspaces

The relation

dim(U + W)=dim U+dim W−dim(U ∩ W)

A vector space is a set where sums and scalar multiples stay inside the set; a subspace is a subset with the same property. The dimension of the sum of two subspaces is dim(U + W) = dim U + dim W − dim(U ∩ W).

Solve for

dim(U + W)=3

dim(U + W) equals (2 plus 2) minus 1, equals 4 minus 1, equals 3

Working3 steps

Practice questions

You are given

  • dim(U + W)=4
  • dim U=2
  • dim W=2

What a vector space is

A vector space is a set V with an addition and a multiplication by numbers that obey the usual rules: the sum is commutative and associative, there is a zero vector, every vector has an opposite, and the multiplication by numbers distributes over sums and is compatible with the product of numbers, with 1·v = v. Besides the vectors of the plane and of space, the polynomials of degree at most n, the m×n matrices and the continuous functions on an interval are vector spaces. The rules are what the proofs use, not what the elements look like.

A subset U of a vector space V is a subspace when it is a vector space with the same operations. That takes three checks, the subspace test:

The dimension of a sum

For two subspaces U and W of the same vector space, their sum U + W is all vectors u + w with u in U and w in W. It is the smallest subspace that contains both. If the spaces are finite-dimensional,

The intersection U ∩ W, the vectors in both, is counted in both dimensions and has to be taken away once. The card above gives any one of the four dimensions from the other three.

Holds for subspaces of one and the same vector space, when the dimensions are finite.

Worked example

Let U be the xy-plane in ℝ³, the vectors (x, y, 0), and W the yz-plane, the vectors (0, y, z). Both have dimension 2. A vector in both has x = 0 and z = 0, so U ∩ W is the y-axis, of dimension 1. Then

so U + W is all of ℝ³: any (x, y, z) is (x, y, 0) + (0, 0, z). Adding the dimensions without the intersection gives 4, which is impossible in a space of dimension 3.

Is it a subspace?

The plane x + y + z = 0 in ℝ³ is a subspace. It contains (0, 0, 0). If both (x, y, z) and (x′, y′, z′) satisfy the equation, their sum does too, since (x + x′) + (y + y′) + (z + z′) = 0 + 0, and so does λ(x, y, z). Its dimension is 2.

The plane x + y + z = 1 is not: it does not contain the zero vector, and the sum of two of its points has coordinate sum 2.

The set of points (x, y) with xy ≥ 0, the first and third quadrants with the axes, passes the first and third checks: (0, 0) is in it, and λ(x, y) has the product λ²xy ≥ 0. It fails the second. (1, 2) and (−3, −1) are in the set, and their sum (−2, 1) is not.

Set Subspace? Why
A line through the origin in ℝ² yes dimension 1
A line not through the origin no does not contain 0
The solutions of Ax = 0 yes the null space, see the page on rank
The solutions of Ax = b, b ≠ 0 no does not contain 0
The union of two different lines through the origin no the sum of two nonzero vectors, one from each line, is on neither

Common mistakes

Where to go next

The number of vectors that span a subspace without waste is its dimension; see basis and dimension and linear independence.

Frequently asked questions

Is the set containing only the zero vector a subspace? Yes. It contains 0, and 0 + 0 and λ·0 are 0. Its dimension is 0, and it is contained in every subspace.

What is the difference between a vector space and a subspace? A subspace is a vector space that sits inside a bigger one and uses the same addition and multiplication. The rules already hold in the bigger space, so what is left to check is that the zero vector, the sums and the multiples stay in the subset: the three conditions above.

When is the sum of two subspaces a direct sum? When U ∩ W contains only the zero vector. The formula then gives dim(U + W) = dim U + dim W, and every vector of U + W can be written as u + w in exactly one way.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
dim Udim(U + W)+dim(U ∩ W)−dim W3+1−22
dim Wdim(U + W)+dim(U ∩ W)−dim U3+1−22
dim(U ∩ W)dim U+dim W−dim(U + W)2+2−31
dim(U + W)dim U+dim W−dim(U ∩ W)2+2−13

Last reviewed November 7, 2026 ·How pages are reviewed

Calculate it in practice

Linear algebraAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.