I am studying the Linear Algebra Done Right book by Sheldon Axler and one of the exercises is to verify whether addition on the subspaces of a vector space $V$ is associative. The exact phrasing of the question is, "if $U_1$, $U_2$, $U_3$ are subspaces of (vector space) $V$, is:"
$(U_1 + U_2) + U_3 = U_1 + (U_2+U_3)$
where $U_1 + U_2 + U_3$ stands for the sum of the subspaces not the union of subspaces and is a subspace.
I wanted to check the validity of a proof that would go as follows:
Let $x \in U_1$, $y \in U_2$ and $z \in U_3$
All elements of $U_1 + U_2 + U_3$ can be written as $x+y+z$
All elements of $(U_1 + U_2) + U_3$ can be written as $(x+y)+z$
All elements of $U_1 + (U_2 + U_3)$ can be written as $x+(y+z)$
Since $U_1 + U_2 + U_3$ is a vectorspace, we have associativity therefore $x+y+z$ = $(x+y)+z$ = $x+(y+z)$ showing that $U_1 + U_2 + U_3 = (U_1 + U_2) + U_3 = U_1 + (U_2 + U_3)$
Please correct me if I am missing something.
A few notes:
You mentioned "All elements of $U_1+U_2+U_3$ can be written as $x+y+z$". This is not obvious in the context of this question (it is basically the result you want to prove). So you cannot just use a notation like $x+y+z$ without justifying it. In general, you can add three things (like $x+y+z$) without specifying the order only when you have associativity for addition otherwise the notation is ambiguous.
The addition of vectors from these subspaces is always (by closure of addition over $V$) in $V$ so you can use the associativity of addition in $V$ to your advantage.
Like you said, say $x \in U_1, y \in U_2, z \in U_3$. Now you have to show that a member of $U_1 + U_2 + U_3$ defined by $(x+y)+z$ is exactly the same member defined by $x + (y+z)$ and that this is true for all $x$, $y$ and $z$. This just needs use of associativity of addition in $V$.