TheoremComplete

Dimension Theorem for Subspaces

The Dimension Theorem describes how the dimensions of two subspaces relate to the dimensions of their sum and intersection. It is the linear algebra analogue of the inclusion-exclusion principle.


Statement

Theorem1.9Dimension Theorem

Let W1W_1 and W2W_2 be finite-dimensional subspaces of a vector space VV. Then W1+W2W_1 + W_2 is finite-dimensional and

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

Proof

Let dim(W1W2)=k\dim(W_1 \cap W_2) = k, dimW1=m\dim W_1 = m, dimW2=n\dim W_2 = n.

Choose a basis {v1,,vk}\{v_1, \ldots, v_k\} of W1W2W_1 \cap W_2. Extend it to a basis {v1,,vk,u1,,umk}\{v_1, \ldots, v_k, u_1, \ldots, u_{m-k}\} of W1W_1 and to a basis {v1,,vk,w1,,wnk}\{v_1, \ldots, v_k, w_1, \ldots, w_{n-k}\} of W2W_2.

Claim: B={v1,,vk,u1,,umk,w1,,wnk}\mathcal{B} = \{v_1, \ldots, v_k, u_1, \ldots, u_{m-k}, w_1, \ldots, w_{n-k}\} is a basis for W1+W2W_1 + W_2.

Spanning: Any element of W1+W2W_1 + W_2 is x+yx + y with xW1x \in W_1 and yW2y \in W_2. Both can be written in terms of the given bases, so x+yspan(B)x + y \in \text{span}(\mathcal{B}).

Independence: Suppose aivi+bjuj+cw=0\sum a_i v_i + \sum b_j u_j + \sum c_\ell w_\ell = 0. Then cw=aivibjujW1\sum c_\ell w_\ell = -\sum a_i v_i - \sum b_j u_j \in W_1. But cwW2\sum c_\ell w_\ell \in W_2, so cwW1W2\sum c_\ell w_\ell \in W_1 \cap W_2. Write cw=divi\sum c_\ell w_\ell = \sum d_i v_i. Since {v1,,vk,w1,,wnk}\{v_1, \ldots, v_k, w_1, \ldots, w_{n-k}\} is a basis for W2W_2, the relation cwdivi=0\sum c_\ell w_\ell - \sum d_i v_i = 0 forces all c=0c_\ell = 0 and di=0d_i = 0. Then aivi+bjuj=0\sum a_i v_i + \sum b_j u_j = 0, and independence of the basis of W1W_1 gives ai=bj=0a_i = b_j = 0.

So B=k+(mk)+(nk)=m+nk|\mathcal{B}| = k + (m - k) + (n - k) = m + n - k.


Examples

ExampleTwo planes in R^3

In R3\mathbb{R}^3, let W1={(x,y,0)x,yR}W_1 = \{(x, y, 0) \mid x, y \in \mathbb{R}\} (the xyxy-plane, dim=2\dim = 2) and W2={(0,y,z)y,zR}W_2 = \{(0, y, z) \mid y, z \in \mathbb{R}\} (the yzyz-plane, dim=2\dim = 2).

W1W2={(0,y,0)yR}W_1 \cap W_2 = \{(0, y, 0) \mid y \in \mathbb{R}\} (the yy-axis, dim=1\dim = 1).

dim(W1+W2)=2+21=3\dim(W_1 + W_2) = 2 + 2 - 1 = 3, so W1+W2=R3W_1 + W_2 = \mathbb{R}^3.

ExamplePlane and line in R^3

W1={(x,y,0)}W_1 = \{(x, y, 0)\} (dim=2\dim = 2) and W2={(0,0,z)}W_2 = \{(0, 0, z)\} (the zz-axis, dim=1\dim = 1).

W1W2={0}W_1 \cap W_2 = \{0\} (dim=0\dim = 0).

dim(W1+W2)=2+10=3\dim(W_1 + W_2) = 2 + 1 - 0 = 3, so W1W2=R3W_1 \oplus W_2 = \mathbb{R}^3 (a direct sum since the intersection is trivial).

ExampleTwo lines in R^2

W1=span{(1,0)}W_1 = \text{span}\{(1, 0)\} (dim=1\dim = 1) and W2=span{(0,1)}W_2 = \text{span}\{(0, 1)\} (dim=1\dim = 1).

W1W2={0}W_1 \cap W_2 = \{0\} (dim=0\dim = 0).

dim(W1+W2)=1+10=2=dimR2\dim(W_1 + W_2) = 1 + 1 - 0 = 2 = \dim \mathbb{R}^2, so R2=W1W2\mathbb{R}^2 = W_1 \oplus W_2.

ExampleSame subspace

If W1=W2=WW_1 = W_2 = W, then W1W2=WW_1 \cap W_2 = W and W1+W2=WW_1 + W_2 = W, so dimW=dimW+dimWdimW\dim W = \dim W + \dim W - \dim W. Trivially true.

ExampleSubspaces of R^4

In R4\mathbb{R}^4, let W1=span{e1,e2,e3}W_1 = \text{span}\{e_1, e_2, e_3\} (dim=3\dim = 3) and W2=span{e2,e3,e4}W_2 = \text{span}\{e_2, e_3, e_4\} (dim=3\dim = 3).

W1W2=span{e2,e3}W_1 \cap W_2 = \text{span}\{e_2, e_3\} (dim=2\dim = 2).

dim(W1+W2)=3+32=4\dim(W_1 + W_2) = 3 + 3 - 2 = 4, so W1+W2=R4W_1 + W_2 = \mathbb{R}^4.

ExampleSubspaces of P_3(R)

W1=span{1,x,x2}=P2(R)W_1 = \text{span}\{1, x, x^2\} = P_2(\mathbb{R}) (dim=3\dim = 3) and W2=span{x2,x3}W_2 = \text{span}\{x^2, x^3\} (dim=2\dim = 2).

W1W2=span{x2}W_1 \cap W_2 = \text{span}\{x^2\} (dim=1\dim = 1).

dim(W1+W2)=3+21=4=dimP3(R)\dim(W_1 + W_2) = 3 + 2 - 1 = 4 = \dim P_3(\mathbb{R}), so W1+W2=P3(R)W_1 + W_2 = P_3(\mathbb{R}).

ExampleSymmetric and skew-symmetric

In Mn×n(F)M_{n \times n}(F) (char 2\neq 2): dimSymn=n(n+1)/2\dim \text{Sym}_n = n(n+1)/2 and dimSkewn=n(n1)/2\dim \text{Skew}_n = n(n-1)/2.

SymnSkewn={0}\text{Sym}_n \cap \text{Skew}_n = \{0\} (if AT=AA^T = A and AT=AA^T = -A, then 2A=02A = 0, so A=0A = 0).

dim(Symn+Skewn)=n(n+1)2+n(n1)20=n2=dimMn×n\dim(\text{Sym}_n + \text{Skew}_n) = \frac{n(n+1)}{2} + \frac{n(n-1)}{2} - 0 = n^2 = \dim M_{n \times n}.

So Mn×n=SymnSkewnM_{n \times n} = \text{Sym}_n \oplus \text{Skew}_n.

ExampleUpper and lower triangular

Un=U_n = upper triangular, Ln=L_n = lower triangular. Then UnLn=DnU_n \cap L_n = D_n (diagonal).

dimUn+dimLndimDn=n(n+1)2+n(n+1)2n=n2+nn=n2\dim U_n + \dim L_n - \dim D_n = \frac{n(n+1)}{2} + \frac{n(n+1)}{2} - n = n^2 + n - n = n^2.

So Un+Ln=Mn×n(F)U_n + L_n = M_{n \times n}(F).

ExampleNo simple formula for three subspaces

For three subspaces, the inclusion-exclusion analogy breaks down. There is no general formula

dim(W1+W2+W3)=dimW1+dimW2+dimW3\dim(W_1 + W_2 + W_3) = \dim W_1 + \dim W_2 + \dim W_3 - \cdots

In R2\mathbb{R}^2, three distinct lines through the origin each have dim=1\dim = 1 and pairwise intersection dim=0\dim = 0, but dim(W1+W2+W3)=2\dim(W_1 + W_2 + W_3) = 2.

ExampleDirect sum criterion

V=W1W2V = W_1 \oplus W_2 if and only if V=W1+W2V = W_1 + W_2 and dimV=dimW1+dimW2\dim V = \dim W_1 + \dim W_2. Equivalently, W1W2={0}W_1 \cap W_2 = \{0\} and dimV=dimW1+dimW2\dim V = \dim W_1 + \dim W_2.

ExampleExistence of complements

Every subspace WW of a finite-dimensional space VV has a complement: a subspace WW' such that V=WWV = W \oplus W'. Extend a basis of WW to a basis of VV; the additional vectors span WW'. The complement is not unique (unless W={0}W = \{0\} or W=VW = V).

ExampleHyperplane complement

A hyperplane WW in Rn\mathbb{R}^n (i.e., dimW=n1\dim W = n - 1, say W={xax=0}W = \{x \mid a \cdot x = 0\}) has a one-dimensional complement. Any nonzero vWv \notin W gives Rn=Wspan{v}\mathbb{R}^n = W \oplus \text{span}\{v\}.


RemarkLooking ahead

The Dimension Theorem for subspaces extends to the Rank-Nullity Theorem, which relates the dimension of the domain, kernel, and image of a linear transformation.