Dimension Theorem
If \(U\) and \(W\) are finite-dimensional subspaces of a vector space \(V\), then \[ \dim(U+W)=\dim U+\dim W-\dim(U\cap W). \]

Proof

Choose a basis of \(U\cap W\):

$$ \begin{align*} b_1,\ldots,b_k \end{align*} $$

Thus, \(\dim(U\cap W)=k\). Next, since \(U \cap W \subseteq U\), the linearly independent list \(b_1,\ldots,b_k\) can be extended basis of \(U\). Hence, add vectors \(u_1,\ldots,u_m\), giving

$$ \begin{align*} b_1,\ldots,b_k,u_1,\ldots,u_m. \end{align*} $$

Therefore, \(\dim(U)=k+m.\) Similarly, Since \(U\cap W\subseteq W\), we can also extend \(b_1,\ldots,b_k\) to a basis of \(W\). Add vectors \(w_1,\ldots,w_n\), giving

$$ \begin{align*} b_1,\ldots,b_k,w_1,\ldots,w_n. \end{align*} $$

Therefore, \(\dim W=k+n\). Consider the combined list

$$ \begin{align*} \mathcal B= b_1,\ldots,b_k,\; u_1,\ldots,u_m,\; w_1,\ldots,w_n. \end{align*} $$

We claim that \(\mathcal B\) is a basis of \(U+W\). To prove this claim, we must show two things: \(\mathcal B\) spans \(U+W\) and \(\mathcal B\) is linearly independent. Next, we’ll prove that it spans \(U+W\). Take any \(x\in U+W\). By the definition of \(U+W\),

$$ \begin{align*} x=u+w \end{align*} $$

for some \(u\in U\) and \(w\in W\). Because

$$ \begin{align*} b_1,\ldots,b_k,u_1,\ldots,u_m \end{align*} $$

is a basis of \(U\), the vector \(u\) is a linear combination of the \(b_i\)’s and \(u_j\)’s. Similarly, because

$$ \begin{align*} b_1,\ldots,b_k,w_1,\ldots,w_n \end{align*} $$

is a basis of \(W\), the vector \(w\) is a linear combination of the \(b_i\)’s and \(w_\ell\)’s. Therefore, \(x=u+w\) is a linear combination of

$$ \begin{align*} b_1,\ldots,b_k,u_1,\ldots,u_m,w_1,\ldots,w_n. \end{align*} $$

Thus, \(\mathcal B\) spans \(U+W\). Next, we show independence. Suppose a linear combination of the vectors in \(\mathcal B\) equals zero:

$$ \begin{align*} \sum_{i=1}^{k}\lambda_i b_i +\sum_{j=1}^{m}\mu_j u_j +\sum_{\ell=1}^{n}\gamma_\ell w_\ell =0. \tag{1} \end{align*} $$

We need to prove that every coefficient is zero:

$$ \begin{align*} \lambda_i=0,\qquad \mu_j=0,\qquad \gamma_\ell=0. \end{align*} $$

Rearrange the equation:

$$ \begin{align*} \sum_{i=1}^{k}\lambda_i b_i +\sum_{j=1}^{m}\mu_j u_j = -\sum_{\ell=1}^{n}\gamma_\ell w_\ell. \end{align*} $$

and let

$$ \begin{align*} x = \sum_{i=1}^{k}\lambda_i b_i +\sum_{j=1}^{m}\mu_j u_j = -\sum_{\ell=1}^{n}\gamma_\ell w_\ell. \end{align*} $$

We claim \(x \in U\cap W\). This is because the left-hand side belongs to \(U\) since it’s a combination of vectors in \(U\), while right-hand expression is a linear combination of vectors in \(W\). We know that \(x\in U\cap W\).

Next, since \(b_1,\ldots,b_k\) is a basis of \(U\cap W\), there are scalars \(\alpha_1,\ldots,\alpha_k\) such that

$$ \begin{align*} x=\sum_{i=1}^{k}\alpha_i b_i. \end{align*} $$

But we also know

$$ \begin{align*} x=-\sum_{\ell=1}^{n}\gamma_\ell w_\ell. \end{align*} $$

Subtracting both equations, we obtain

$$ \begin{align*} \sum_{i=1}^{k}\alpha_i b_i +\sum_{\ell=1}^{n}\gamma_\ell w_\ell=0. \end{align*} $$

The list \(b_1,\ldots,b_k,w_1,\ldots,w_n\) is a basis of \(W\), so it is linearly independent. Hence all its coefficients must be zero:

$$ \begin{align*} \alpha_i=0 \quad\text{and}\quad \gamma_\ell=0. \end{align*} $$

In particular,

$$ \begin{align*} x=0 \quad\text{and}\quad \gamma_1=\cdots=\gamma_n=0. \end{align*} $$

Since \(\gamma_1=\cdots=\gamma_n=0\), then (1) becomes

$$ \begin{align*} \sum_{i=1}^{k}\lambda_i b_i +\sum_{j=1}^{m}\mu_j u_j =0. \end{align*} $$

But \(b_1,\ldots,b_k,u_1,\ldots,u_m\) is a basis of \(U\), so it is linearly independent. Therefore,

$$ \begin{align*} \lambda_1=\cdots=\lambda_k=0 \end{align*} $$

and

$$ \begin{align*} \mu_1=\cdots=\mu_m=0. \end{align*} $$

Thus, every coefficient in the original equation is zero, proving that our proposed basis for \(U+W\) is linearly independent. Hence

$$ \begin{align*} b_1,\ldots,b_k,u_1,\ldots,u_m,w_1,\ldots,w_n \end{align*} $$

both spans \(U+W\) and is linearly independent. Therefore, it is a basis of \(U+W\). This basis contains \(k+m+n\) vectors, so

$$ \begin{align*} \dim(U+W)=k+m+n. \end{align*} $$

We also know that

$$ \begin{align*} \dim U=k+m,\qquad \dim W=k+n,\qquad \dim(U\cap W)=k. \end{align*} $$

Therefore,

$$ \begin{align*} \dim U+\dim W-\dim(U\cap W) &=(k+m)+(k+n)-k\\ &=k+m+n\\ &=\dim(U+W). \end{align*} $$

Hence,

$$ \begin{align*} \dim(U+W)=\dim U+\dim W-\dim(U\cap W). \end{align*} $$

as we wanted to show. \(\blacksquare\)


References