Clarify the correct reasoning to calculate the subspace sum I know the definition of subspace sum, but I would like to clarify how to calculate it. 
For example, let $A$ and $B$ be vector spaces such that $A=(0,0,x)$ and $B=(-y,y,y)$ for $x,y \in \mathbb{R}$, how can I compute $A+B$? I have worked out that it will be a direct sum, but will it equal $\mathbb{R}^3$?
In another example, let $A= (x, y, -x)$ and $B=(0, t, z)$. How can I compute the sum? It is not a direct sum, but will its dimension be equal to $3$?
Can you show me what is the correct reasoning to do in these cases? Also, can you give me a link to more worked examples and problems?
 A: The easiest way is to find bases for each subspace, putting them together and removing vectors that make the union linearly dependent.
First example.
A basis for $A$ is $\{(0,0,1)\}$, a basis for $B$ is $\{(-1,1,1)\}$; the matrix
$$
\begin{bmatrix}
0 & -1 \\
0 & 1\\
1 & 1
\end{bmatrix}
$$
is easily seen to have rank $2$, so a basis for $A+B$ is $\{(0,0,1),(-1,1,1)\}$.
Second example.
A basis for $A$ is $\{(1,0,-1),(0,1,0)\}$, a basis for $B$ is $\{0,1,0),(0,0,1)\}$. Do Gaussian elimination
$$
\begin{bmatrix}
1 & 0 & 0 & 0\\
0 & 1 & 1 & 0\\
-1 & 0 & 0 & 1
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & 0 & 0\\
0 & 1 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix}
$$
which shows that the third column is a linear combination of the first two (of course this is obvious, because the second and third columns are equal), but also that the first, second and fourth columns form a linearly independent set. So a basis for $A+B$ is $\{(1,0,-1),(0,1,0),(0,0,1)\}$.
Grassmann's formula
$$
\dim(A+B)=\dim A+\dim B-\dim(A\cap B)
$$
will tell you whether $A\cap B=\{0\}$ or not.

Without Gaussian elimination, you can still work out the problem. The first case is really easy: just prove that the two given vectors form a linearly independent set.
For the second case, note that $(0,1,0)$ appears in both bases, so we can remove it; then prove that $\{(1,0,-1),(0,1,0),(0,0,1)\}$ is linearly independent by direct computation.
A: Verify that it follows from definition that the dimension of the sum of two vector spaces can not exceed the sum of their dimensions.
From this we conclude that in both examples the dimension of the sum is at most $2$, and is not $\mathbb{R}^3$
A: In the first example write it as $e_A = (0,0,1)$ and $e_B =(-1,1,1)$. You see these are linearly independent and span a subspace of dimension 2. For the second example consider the spaces spanned by $span\{(1,0,-1),(0,1,0)\}$ and $span\{(0,1,0),(0,0,1)\}$.
