Find direct sum of vector spaces (with a parameter) This is a generalization of an exercise I've done:
Let $A$ be the vector subspace of $\mathbb{R^3}$ spanned by $(1,0,2)$ and $(1,1,0)$;
let $B=\{(a,b,c)\mid (x)(a+b)=0, a=(x+1)c\}$.
How can I find the values of $x$ such that $\mathbb{R^3}$ is a direct sum of $A$ and $B$?
 A: Well, $B$ must have dimension one, so $x\ne 0$ (as $b$ and $a=c$ can be arbitrary if $x=0$).
On the other hand, $\dim B=1$ whenever $x\ne 0$: write e.g. $c=1$ and find the unique corresponding $a,b$ coordinates.
Then you only have to check whether this vector, that spans $B$, is in $A$ or not.
A: As observed by Berci, if $x = 0$ it's not a direct sum. For $x \ne 0$, write 
$$
u = \begin{bmatrix}
(x+1) \\ -(x+1) \\ 1
\end{bmatrix}
$$
so that $u$ is a basis for $B$. If $u \in A$, then $\mathbb R^3$ is not a direct sum of $A$ and $B$, for $A \oplus B$ is 2-dimensional (it's just $A$!)
Otherwise, $u$ is not in $A$ and everything works out. In the failure case ($u \in A$) the vector $u$ must be a linear combination of the basis vectors for $A$, i.e., there are numbers $p$ and $q$ with 
 $$
\begin{bmatrix}
(x+1) \\ -(x+1) \\ 1
\end{bmatrix} = 
p\begin{bmatrix}
1 \\ 
0 \\ 
2
\end{bmatrix}
+ q
\begin{bmatrix}
1 \\ 
1 \\ 
0
\end{bmatrix}
$$
So we must have 
$$
q = -(x+1) \\
p + q = (x + 1) \\
2p = 1
$$
Thus $p = 2(x+1) = \frac{1}{2}$, so $4(x+1) = 1$, and $x = -\frac{3}{4}$. 
In short: unless $x = -\frac{3}{4}$, $\mathbb R^3$ is a direct sum of $A$ and $B$. 
