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?
So you are saying the union of the bases immediately form a spanning set and then use the theorem that says it contains a basis? Well, doing simultaneous equations I get that {U1,U2,W1,W2} is a basis, so it is in fact equal to the whole space.
You got that slightly wrong. It should be Dim(U+W)=dim(U)+dim(W)-dim('intersection')). Now you know that the intersection contains (1,1,1,0), so its dimension is at least 1. If the dimension of the intersection is 2 then it would have to be the whole of W (since W is fairly obviously 2-dimensional).
From that, you should be able to pin down the dimension of , and then the theorem will tell you the dimension of