![EF-1C-3](sol-2.pdf#page=10) --- Commentary: $\textbf{Exercise 12.}$ Prove that the union of two subspaces of $V$ is a subspace of $V$ if and only if one of the subspaces is contained in the other. $\textbf{Solution 12.}$ Suppose $U$ and $W$ are subspaces of $V$ such that $U \cup W$ is a subspace of $V$. We will use proof by contradiction to show that $U \subseteq W$ or $W \subseteq U$. Suppose our desired result is false. Then $U \nsubseteq W$ and $W \nsubseteq U$. This means that there exists $u \in U$ such that $u \notin W$ and there exists $w \in W$ such that $w \notin U$. Because $u$ and $w$ are both in $U \cup W$, which is a subspace of $V$, we can conclude that $u + w \in U \cup W$. Thus $u + w \in U$ or $u + w \in W$. First consider the possibility that $u + w \in U$. In this case $w$, which equals $(u + w) + (-u)$, would be the sum of two elements of $U$. Hence we would have $w \in U$, contradicting our assumption that $w \notin U$. Now consider the possibility that $u + w \in W$. In this case $u$, which equals $(u + w) + (-w)$, would be the sum of two elements of $W$. Hence we would have $u \in W$, contradicting our assumption that $u \notin W$. The two paragraphs above show that $u + w \notin U$ and $u + w \notin W$, contradicting the final sentence of the first paragraph of this solution. This contradiction completes our proof that $U \subseteq W$ or $W \subseteq U$. The other direction of this exercise is trivial: if we have two subspaces of $V$, one of which is contained in the other, then the union of these two subspaces equals the larger of them, which is a subspace of $V$. $\textit{Commentary:}$ This exercise explores when the union of two subspaces is a subspace. Unlike the intersection, which is always a subspace, the union is a subspace only in the trivial case where one subspace is contained in the other. The proof uses contradiction, assuming that neither subspace is contained in the other and deriving a contradiction to the fact that their union is a subspace. The key idea is to take an element from each subspace that is not in the other, and show that their sum must be in the union but cannot be in either subspace individually. This result is important in understanding the structure of a vector space and how subspaces can be combined. It shows that, in general, the union of subspaces is not a subspace, which is why the concept of the sum of subspaces (which is always a subspace) is needed. $\textit{Example:}$ In $\mathbb{R}^2$, let $U$ be the $x$-axis and $W$ be the $y$-axis. Then $U \cup W$ is not a subspace of $\mathbb{R}^2$, because neither $U \subseteq W$ nor $W \subseteq U$. In the space of polynomials $\mathbb{Q}_3[x]$, let $U$ be the subspace of polynomials with degree at most 1, and $W$ be the subspace of polynomials with degree at most 2 and constant term 0. Then $U \cup W$ is not a subspace, because $1 \in U$ but $1 \notin W$, and $x^2 \in W$ but $x^2 \notin U$. In the space of functions from $\mathbb{R}$ to $\mathbb{R}$, let $U$ be the subspace of constant functions and $W$ be the subspace of linear functions. Then $U \cup W$ is a subspace, because $U \subseteq W$. These examples show that the union of subspaces is rarely a subspace. In finite-dimensional spaces, the union of subspaces is a subspace only when one subspace is contained in the other. In infinite-dimensional spaces, there are some other possibilities (for instance, the union of an increasing sequence of subspaces is a subspace), but these are relatively rare.