U={(x,y,z,w):x-y+2w=0}

W={(a,b,a,0)}

are subspaces of R^4. Determine whether the sum U+W is direct and find dim(U+W).

I find it is not direct since, for example, (1,1,1,0) is a member of both.

Now for the second part I use theorem Dim(U+W)=dim(U)+dim(W)-dim('union'))

I know dim(U) and dim(W) as I earlier calculated basis for them but how do I find the dimension of the union?