# Uniqueness of complement of a vector subspace

We know that in general, if $X$ is a vector space and $Y, Z, W$ are subspaces such that $X=Y\oplus Z$ and $X=Y\oplus W$ then it may not be true that $Z=W$.

But if we are given further that $Z\subseteq W$, then this should be true. A proof I can think of goes like this: Let $w\in W$. As $X=Y\oplus Z$, we get $w = y+z$ for some $y \in Y$ and $z \in Z \subseteq W$. But also $X=Y\oplus W$ and $w=0+w$, so the uniqueness of the decomposition forces $y=0,z=w$, whence $w=z \in Z$. So $W \subseteq Z$, and equality follows.

Somehow, I feel that there should perhaps be a cleaner and more straightforward way to see that $W=Z$, but I haven't been able to work one out.

My question is: Is there any other way this could be seen more directly?

Edit: Perhaps I should have added that these spaces could be infinite-dimensional.

What you need to show is that $W\subseteq Z$. So take $w\in W$; since $X=Y\oplus Z$, you can uniquely write $$w=y+z$$ with $y\in Y$ and $z\in Z$; however $z\in W$, so $y=w-z\in W$ and therefore $y=0$.
We can use dimension if $Z$ is of finite dimension, we have $dim(Z)=dim(X)-dim(Y)=dim(W)$ and $Z\subset W$ so $$Z=W$$