Finding the basis of a subspace given a subspace containing conditions 
Let $Y_1 = \lbrace (x,y,z,w)\in \mathbb{R}^4 : y+z+w =0\rbrace$ and $Y_2 = \lbrace (x,y,z,w)\in \mathbb{R}^4 : x+y =0 , z = 2w\rbrace$. Find the bases of $Y_1$ and $Y_2$.

I know I have to find a number of linearly independent vectors but I don't know how many. I know they have to be less than $4$.
I'm mostly interested in finding the method of finding a basis of a subspace given a subspace in this format: $Y = \lbrace (x_1,x_2,...,x_n)\in \mathbb{R}^n: \mathrm{condition}\rbrace$ rather than the solution to the above mentioned subspaces.
 A: $y + z+ w = 0$ implies that $w = -y - z$. Therefore, vectors in $Y_1$ are of the form $$(x,y,z,-y-z)$$
for some $x,y,z \in \mathbb{R}$.
We have:
$$Y_1 \ni (x,y,z,-y-z) = x(1,0,0,0) + y(0,1,0,-1) + z(0,0,1,-1)$$
so the set $\{(1,0,0,0), (0,1,0,-1), (0,0,1,-1)\}$ spans $Y_1$. Furthermore, it is linearly independent, so it is a basis for $Y_1$.
Similarly, $x + y = 0$ implies $y = -x$ so vectors in $Y_2$ are of the form
$$(x,-x,2w,w)$$
for some $x,w \in \mathbb{R}$.
We have:
$$Y_2 \ni (x,-x,2w,w) = x(1,-1,0,0) + w(0,0,2,1)$$
so the set $\{(1,-1,0,0), (0,0,2,1)\}$ spans $Y_2$. Furthermore, it is linearly independent so it is a basis for $Y_2$.
So, the general method would be to use the conditions to establish how a vector in your subset look like. It will be of the form
$$(\alpha_1x + \beta_1y + \gamma_1z + \delta_1w, \alpha_2x + \beta_2y + \gamma_2z + \delta_2w, \alpha_3x + \beta_3y + \gamma_3z + \delta_3w, \alpha_4x + \beta_4y + \gamma_4z + \delta_4w)$$
and write it as a linear combination of some constant set of vectors. That set of vectors spans your subspace. Now reduce it to a linearly independent set. It will then be a basis.
