# Are subspaces $X$ and $Y$ closed under addition?

If $X$ and $Y$ are each a subspace of $\mathbb{R^n}$, is $X+Y$ also a subspace of $\mathbb{R^n}$, where $X+Y$ is the set of all vectors $x+y$ such that $x\in X$ and $y\in Y$?

I've already showed that for some $z\in X+Y$, if $z$ is the sum of two $x$'s $\in X$ or two $y$'s $\in Y$, or $z=x+y$ then $X+Y$ is closed under linear combinations (i.e. the subsets of $X+Y$ that contain $X$ and $Y$). Now I'm trying to show that if $z \in X+Y$ but $z \not \in X$ and $z \not \in Y$, then $X+Y$ is still closed under linear combinations (i.e. the rest of $X+Y$).

I thought of writing $z \in X+Y$ such that $z \not \in X$ and $z \not \in Y$ as $z = a_1b_1+a_2b_2$ such that $a_1,b_1 \in X$ and $a_2,b_2 \in Y$, but I'm not entirely sure how I can use this to show that linear combinations of $z$ are also in $X+Y$, thus showing that all of $X+Y$ is closed under linear combinations and proving the positive of the question asked.

let $v_1,v_2$ be in $X+Y$, then we have $v_1=x_1+y_1$ and $v_2=x_2+y_2$ we then have $v_1+v_2=x_1+y_2+x_2+y_2=(x_1+x_2)+(y_1+y_2)$ since $X$ and $Y$ are subspaces $x_1+x_2$ and $y_1+y_2$ are in $X$ and $Y$ respectively, so $X+Y$ is closed under addition.
If $z_1,z_2\in X+Y$, then by definition $\exists x_1,x_2 \in X,y_1,y_2\in Y$such that $z_1=x_1+y_1,z_2=x_2+y_2$. Let $a,b\in \mathbb R$. Then $az_1+bz_2=a(x_1+y_1)+b(x_2+y_2)=ax_1+ay_1+bx_2+by_2$. Since $X,Y$ are subspaces, we get $ax_1+bx_2 \in X,ay_1+by_2\in Y$. Hence, by commuting the addition, we get $az_1+bz_2$ is indeed equal to something in X plus something in Y, so by definition, it is in $X+Y$