Tutorials › Linear Algebra › Bases for Direct Sums of Subspaces

Basis and Dimension · Tutorial 333 of 1000

Bases for Direct Sums of Subspaces

See why zero intersection lets two subspace bases combine into a basis of their sum, with dimension equal to the sum of the two dimensions.

Intermediate 9 min read

What You'll Learn

  • Define the sum of two subspaces and when it is an internal direct sum
  • Prove that zero intersection makes the combined basis list independent and spanning
  • Use the combined-list criterion to test whether a sum is direct
  • Establish unique decomposition of vectors in a direct sum
  • Apply the dimension formula to concrete subspaces

Combining Subspaces Without Overlap

When two subspaces share only the zero vector, their directions do not overlap. This makes it possible to combine a basis for each subspace without introducing redundant vectors. The key condition is not that the subspaces look different or have different descriptions: it is that their intersection contains no nonzero vector. Under this condition, every vector in their sum has exactly one decomposition into a vector from each subspace.

Let \(U\) and \(W\) be subspaces of a vector space \(V\) over \(\mathbb{R}\). Their sum is the set of all sums of one vector from each subspace:

$$ U+W=\{\mathbf{u}+\mathbf{w}:\mathbf{u}\in U,\ \mathbf{w}\in W\}. $$

This is a subspace: it contains \(\mathbf{0}+\mathbf{0}=\mathbf{0}\), and if \(\mathbf{u}_1+\mathbf{w}_1\) and \(\mathbf{u}_2+\mathbf{w}_2\) belong to it, then their sum is \((\mathbf{u}_1+\mathbf{u}_2)+(\mathbf{w}_1+\mathbf{w}_2)\), which is still in \(U+W\); for any scalar \(c\), \(c(\mathbf{u}_1+\mathbf{w}_1)=c\mathbf{u}_1+c\mathbf{w}_1\) is also in \(U+W\). The sum contains both \(U\) and \(W\), since \(\mathbf{u}=\mathbf{u}+\mathbf{0}\) and \(\mathbf{w}=\mathbf{0}+\mathbf{w}\).

Definition: The sum \(U+W\) is a direct sum if \(U\cap W=\{\mathbf{0}\}\). In that case we write \(U\oplus W\). This is an internal direct sum: both subspaces lie inside the same space \(V\).

A basis is an ordered list that is both linearly independent and spanning. If \((\mathbf{u}_1,\dots,\mathbf{u}_r)\) is a basis for \(U\), and \((\mathbf{w}_1,\dots,\mathbf{w}_s)\) is a basis for \(W\), the candidate list for the sum is the concatenation \((\mathbf{u}_1,\dots,\mathbf{u}_r,\mathbf{w}_1,\dots,\mathbf{w}_s)\). It spans \(U+W\) by the definition of the sum. The important question is whether it is independent; zero intersection is exactly the condition that guarantees this.

The Basis Theorem for a Direct Sum

Theorem: Let \(U\) and \(W\) be positive-dimensional, finite-dimensional subspaces of a real vector space \(V\). Let \((\mathbf{u}_1,\dots,\mathbf{u}_r)\) and \((\mathbf{w}_1,\dots,\mathbf{w}_s)\) be bases for \(U\) and \(W\), respectively. Their concatenated list is a basis for \(U+W\) if and only if \(U\cap W=\{\mathbf{0}\}\).

Proof. First suppose \(U\cap W=\{\mathbf{0}\}\). The concatenated list spans \(U+W\): any \(\mathbf{x}\in U+W\) has the form \(\mathbf{x}=\mathbf{u}+\mathbf{w}\), and because the two lists are bases, there are scalars \(a_1,\dots,a_r,b_1,\dots,b_s\) such that \(\mathbf{u}=\sum_{i=1}^{r}a_i\mathbf{u}_i\) and \(\mathbf{w}=\sum_{j=1}^{s}b_j\mathbf{w}_j\). Thus \(\mathbf{x}\) is a linear combination of the concatenated list.

To prove independence, suppose \(\sum_{i=1}^{r}a_i\mathbf{u}_i+\sum_{j=1}^{s}b_j\mathbf{w}_j=\mathbf{0}\). Rearranging gives \(\sum_{i=1}^{r}a_i\mathbf{u}_i=-\sum_{j=1}^{s}b_j\mathbf{w}_j\). The left side belongs to \(U\), and the right side belongs to \(W\), so their common value belongs to \(U\cap W\). The intersection is \(\{\mathbf{0}\}\), hence both sums equal \(\mathbf{0}\). Independence of the basis of \(U\) gives \(a_i=0\) for every \(i\); independence of the basis of \(W\) gives \(b_j=0\) for every \(j\). The concatenated list is independent and spanning, so it is a basis for \(U+W\).

For the reverse direction, suppose the concatenated list is a basis, and take any \(\mathbf{x}\in U\cap W\). Since \(\mathbf{x}\in U\), write \(\mathbf{x}=\sum_{i=1}^{r}a_i\mathbf{u}_i\). Since \(\mathbf{x}\in W\), also write \(\mathbf{x}=\sum_{j=1}^{s}b_j\mathbf{w}_j\). Subtracting these expressions gives \(\sum_{i=1}^{r}a_i\mathbf{u}_i-\sum_{j=1}^{s}b_j\mathbf{w}_j=\mathbf{0}\), a linear combination of the concatenated list. Its independence forces every \(a_i\) and every \(b_j\) to be zero. Therefore \(\mathbf{x}=\mathbf{0}\). This proves \(U\cap W=\{\mathbf{0}\}\), completing both directions. \(\square\)

The proof separates the two jobs a basis must do. Spanning follows from how the sum is formed, whether or not the subspaces overlap. Independence is where the intersection condition matters: a nonzero vector shared by both subspaces can be written using either basis, creating a nontrivial relation between the two parts of the concatenated list.

Corollary: If \(U\) and \(W\) are finite-dimensional subspaces with \(U\cap W=\{\mathbf{0}\}\), then \(\dim(U\oplus W)=\dim U+\dim W\).

Proof. If both subspaces have positive dimension, the theorem says that concatenating their bases gives a basis for \(U\oplus W\). That list has \(r+s\) vectors, where \(r=\dim U\) and \(s=\dim W\), so the dimension of the sum is \(r+s\). If either subspace is \(\{\mathbf{0}\}\), the sum is the other subspace, and its dimension equals its dimension plus \(0\). Thus the formula holds in that case as well. \(\square\)

Unique Decomposition

The same condition also explains the notation \(U\oplus W\). A vector in the sum can be written as \(\mathbf{u}+\mathbf{w}\) by the definition of \(U+W\). If the intersection is zero, this representation is unique.

Theorem: For subspaces \(U,W\) of a real vector space, every vector in \(U+W\) has a unique expression \(\mathbf{u}+\mathbf{w}\), with \(\mathbf{u}\in U\) and \(\mathbf{w}\in W\), if and only if \(U\cap W=\{\mathbf{0}\}\).

Proof. Suppose \(U\cap W=\{\mathbf{0}\}\), and suppose \(\mathbf{x}=\mathbf{u}_1+\mathbf{w}_1=\mathbf{u}_2+\mathbf{w}_2\). Subtracting yields \(\mathbf{u}_1-\mathbf{u}_2=\mathbf{w}_2-\mathbf{w}_1\). The left side belongs to \(U\), the right side belongs to \(W\), and so this common vector belongs to the intersection. It must be \(\mathbf{0}\), giving \(\mathbf{u}_1=\mathbf{u}_2\) and \(\mathbf{w}_1=\mathbf{w}_2\). The expression is unique.

Conversely, suppose every vector in \(U+W\) has a unique such expression, and let \(\mathbf{x}\in U\cap W\). Then both \(\mathbf{0}=\mathbf{0}+\mathbf{0}\) and \(\mathbf{0}=\mathbf{x}+(-\mathbf{x})\) are expressions of \(\mathbf{0}\) as a vector from \(U\) plus a vector from \(W\). Uniqueness forces \(\mathbf{x}=\mathbf{0}\). Hence the intersection is \(\{\mathbf{0}\}\). \(\square\)

Worked Examples

Worked Example: A Plane and a Perpendicular Axis

In \(\mathbb{R}^3\), let \(U\) be the \(xy\)-plane and \(W\) the \(z\)-axis. Find bases for these subspaces and determine whether their combined list is a basis for their sum.

Write the subspaces as \(U=\{(a,b,0):a,b\in\mathbb{R}\}\) and \(W=\{(0,0,c):c\in\mathbb{R}\}\). A basis for \(U\) is \(\mathbf{e}_1=\begin{bmatrix}1\\0\\0\end{bmatrix}\) and \(\mathbf{e}_2=\begin{bmatrix}0\\1\\0\end{bmatrix}\); a basis for \(W\) is \(\mathbf{e}_3=\begin{bmatrix}0\\0\\1\end{bmatrix}\). Their intersection consists of vectors \((a,b,0)=(0,0,c)\). Comparing coordinates gives \(a=0\), \(b=0\), and \(c=0\), so \(U\cap W=\{\mathbf{0}\}\).

The theorem now says the combined list \((\mathbf{e}_1,\mathbf{e}_2,\mathbf{e}_3)\) is a basis for \(U+W\). Directly, any \(\begin{bmatrix}a\\b\\c\end{bmatrix}\in\mathbb{R}^3\) is \(a\mathbf{e}_1+b\mathbf{e}_2+c\mathbf{e}_3\), so the list spans. If \(a\mathbf{e}_1+b\mathbf{e}_2+c\mathbf{e}_3=\mathbf{0}\), then \(\begin{bmatrix}a\\b\\c\end{bmatrix}=\begin{bmatrix}0\\0\\0\end{bmatrix}\), so \(a=b=c=0\) and the list is independent.

Check: the sum is all of \(\mathbb{R}^3\), and each vector has the decomposition \(\begin{bmatrix}a\\b\\c\end{bmatrix}=\begin{bmatrix}a\\b\\0\end{bmatrix}+\begin{bmatrix}0\\0\\c\end{bmatrix}\). The intersection is zero, and the basis has three vectors, giving \(\dim(U\oplus W)=2+1=3\).

Worked Example: Two Planes That Are Not a Direct Sum

Let \(U\) be the \(xy\)-plane and \(W\) the \(xz\)-plane in \(\mathbb{R}^3\). Explain why concatenating bases for these planes does not give a basis for \(U+W\), and find a basis for the sum.

Choose bases \((\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}0\\1\\0\end{bmatrix})\) for \(U\) and \((\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}0\\0\\1\end{bmatrix})\) for \(W\). A vector in both planes must have the form \(\begin{bmatrix}a\\b\\0\end{bmatrix}=\begin{bmatrix}c\\0\\d\end{bmatrix}\). Coordinate comparison gives \(b=d=0\) and \(a=c\); hence \(U\cap W=\{(a,0,0):a\in\mathbb{R}\}\), which is not just the zero vector.

The concatenated list is dependent: the first vector from \(U\) and the first vector from \(W\) are equal, so \(1\begin{bmatrix}1\\0\\0\end{bmatrix}+0\begin{bmatrix}0\\1\\0\end{bmatrix}-1\begin{bmatrix}1\\0\\0\end{bmatrix}+0\begin{bmatrix}0\\0\\1\end{bmatrix}=\begin{bmatrix}0\\0\\0\end{bmatrix}\) is a nontrivial relation. Thus this is not a direct sum, and the concatenated list is not a basis.

The sum is nevertheless all of \(\mathbb{R}^3\): for every \(\begin{bmatrix}a\\b\\c\end{bmatrix}\), \(\begin{bmatrix}a\\b\\c\end{bmatrix}=\begin{bmatrix}a\\b\\0\end{bmatrix}+\begin{bmatrix}0\\0\\c\end{bmatrix}\in U+W\). A basis for the sum is \((\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}0\\1\\0\end{bmatrix},\begin{bmatrix}0\\0\\1\end{bmatrix})\).

Check: the displayed decomposition proves spanning. A linear combination of these three vectors is \(\begin{bmatrix}a\\b\\c\end{bmatrix}\); it equals \(\mathbf{0}\) only when \(a=b=c=0\), proving independence. The sum has dimension \(3\).

Worked Example: Even and Odd Directions in the Quadratic Polynomials

In the real vector space \(P_2\) of polynomials of degree at most \(2\), let \(U=\operatorname{span}\{1,x^2\}\) and \(W=\operatorname{span}\{x\}\). Show that their combined basis list is a basis for \(P_2\).

The list \((1,x^2)\) is a basis for \(U\): it spans by the definition of \(U\), and if \(a+bx^2\) is the zero polynomial, its coefficients give \(a=b=0\). The list \((x)\) is a basis for \(W\), since \(cx\) is the zero polynomial only when \(c=0\).

To find the intersection, suppose \(a+bx^2=cx\). Equality of polynomials means equality of each coefficient. The constant, \(x\), and \(x^2\) coefficients give \(a=0\), \(c=0\), and \(b=0\), respectively. Therefore \(U\cap W=\{0\}\). The theorem implies that \((1,x^2,x)\) is a basis for \(U+W\).

In fact, \(U+W=P_2\). An arbitrary polynomial \(p(x)=a+cx+bx^2\) can be written as \(p(x)=(a+bx^2)+(cx)\), with the first term in \(U\) and the second in \(W\). The list spans, and if \(a+bx^2+cx\) is the zero polynomial, coefficient comparison gives \(a=b=c=0\), so it is independent.

Check: every polynomial of degree at most \(2\) has the displayed decomposition, and that decomposition is unique because its three coefficients are fixed. Thus \(\dim P_2=2+1=3\).

Common Mistake: Adding Dimensions Without Checking the Intersection

A common error is to assume that the dimension of a sum is always the sum of the dimensions. The theorem gives that conclusion for a direct sum, not for every pair of subspaces. In the two-plane example, each plane has dimension \(2\), so the incorrect calculation would be \(\dim(U+W)=2+2=4\). But the sum is \(\mathbb{R}^3\), with basis \((\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}0\\1\\0\end{bmatrix},\begin{bmatrix}0\\0\\1\end{bmatrix})\), and therefore has dimension \(3\). The source of the error is the shared vector \(\begin{bmatrix}1\\0\\0\end{bmatrix}\): counting both copies as independent directions counts one direction twice.

When asked to combine bases, first identify the intersection. If it is \(\{\mathbf{0}\}\), concatenate the basis lists and use the theorem. If it contains a nonzero vector, the sum is not direct and the concatenated list is dependent; remove redundancy to find a basis for the sum. The test concerns the subspaces themselves, so it does not depend on which bases were selected.

Check Your Understanding

Use the intersection condition and the combined-basis theorem to justify each answer.

  1. Let \(U=\operatorname{span}\{\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}0\\1\\0\end{bmatrix}\}\) and \(W=\operatorname{span}\{\begin{bmatrix}0\\0\\1\end{bmatrix}\}\). What is a basis for \(U+W\), and what is its dimension?
  2. For the \(xy\)-plane and \(xz\)-plane in \(\mathbb{R}^3\), identify a nonzero vector in their intersection and write a dependence relation in the concatenated basis list.
  3. Suppose \(U\) and \(W\) have dimensions \(3\) and \(2\), and \(U\cap W=\{\mathbf{0}\}\). How many vectors are in the concatenated basis, and what is \(\dim(U\oplus W)\)?
  4. In \(P_2\), write \(4-3x+2x^2\) as a sum of a vector in \(\operatorname{span}\{1,x^2\}\) and a vector in \(\operatorname{span}\{x\}\).
  5. Explain why a nonzero vector in \(U\cap W\) prevents the concatenation of bases for \(U\) and \(W\) from being independent.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon