Linear Algebra Done Right 2nd Edition – Chapter 1 Exercise 9 Chapter 1 Exercise 9.

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. $\text{Proof:}\\\\ \text{Given } X \text{ and } Y \text{ are subspaces of } V.\\\\ \text{Let } X \cup Y \text{ be a subspace of } V.\\\\ \text{Suppose } X \not\subseteq Y \text{ and } Y \not\subseteq X. \\\\ \text{Since } X \text{ and } Y \text{ are subspaces, they are non-empty. So, } \exists x \in X \text{ such that x } \not\in Y \text{ and } \exists y \in Y \text{ such that } y \not\in X.\\\\ \text{By definition of union, } x \in X \cup Y \text{ and } y \in X \cup Y.\\\\ \text{Since } X \cup Y \text{ is a subspace, } x + y \in X \cup Y.\\\\ \text{That is, } x + y \in X \text{ or } x + y \in Y \text{ or both}.\\\\ \text{Say } x + y \in X. \text{ Since } X \text{ is a subspace } -x \in X \text{ and } -x + (x + y) \in X.\\\\ \text{Then, by the associative property of subspaces and the definition of additive inverse, }\\ (-x + x) + y \in X \Rightarrow O_V + y \in X \Rightarrow y \in X.\\\\ \text{But } y \not\in X. \text{ We reach a similar contradiction for } x + y \in Y.\\\\ \text{(1) Thus, if } X \cup Y \text{ is a subspace of } V \text{, either } X \subseteq Y \text{ or } Y \subseteq X.$ $\text{Now, let either } X \subseteq Y \text{ or } Y \subseteq X \text{, say }X \subseteq Y\\\\ \text{For every } x_i, x_j \in X \text{ and } y_i, y_j \in Y,\text{ since } X \text{ is a subspace, } \\\\ x_i + x_j \in X \Rightarrow x_i + x_j \in X \cup Y.\text{ Similarly } y_i + y_j \in X \cup Y.\\\\ \text{Since } Y \text{ is a subspace, and by the assumption } x_i \in Y, x_i + y_j \in X \cup Y\\\\ \indent \text{a) Thus, for every } w_i, w_j \in X \cup Y, w_i + w_j \in X \cup Y\\\\ \text{Let } u \in X \cup Y. \text{ Since } X \subseteq Y, u \in Y. \text{ Since } Y \text{ is a subspace, } au \in Y, \forall a \in F.\\\\ \indent \text{b) Thus, } au \in X \cup Y \ \forall a \in F\\\\ \text{Since } X \text{ is a subspace, } O_V \in X.\\\\ \indent \text{c) Thus, } O_V \in X \cup Y\\\\ \text{(2) Thus, by a, b and c, if } X \subseteq Y, \text{ then } X \cup Y \text{ is a subspace of } V$

Therefore, by 1 and 2, 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. $\square$