Is $V= W\oplus W^{\perp}$ always? 
Is $V= W\oplus W^{\perp}$ always?
Here, $W$ is a subspace of the vector space $V$.

I think this holds if $V$ is finite-dimensional, but what if it is not? Could someone help me prove $V= W\oplus W^{\perp}$ in the infinite-dimensional case, or produce a counterexample? I'm really not sure where to start.
The thing is, I am not able to see how moving from finite dimensions to infinite dimensions changes anything. Shouldn't it be the case that a vector lies in $W$ or $W^\perp$? Where else can it lie?
P.S.
This isn't part of a homework exercise or something, it just came to my mind. I'm taking a class in Linear Algebra right now that deals mostly with finite-dimensional vector spaces only, so I don't know where to start in this case.
 A: In order to define orthogonal complements we need $V$ to be an inner product space, not just a vector space. Then it is generally false that $V = W \oplus W^{\perp}$ if $V$ is an infinite-dimensional inner product space. A standard counterexample is to take $V$ to be the $\ell^2$ space of sequences
$$\ell^2(\mathbb{N}) = \{ a_n \in \mathbb{R}^{\mathbb{N}} : \sum_{n=1}^{\infty} |a_n|^2 < \infty \}$$
equipped with the inner product $\langle a, b \rangle = \sum_{n=1}^{\infty} a_n b_n$, and to take $W$ to be the subspace consisting of sequences with finite support (sequences such that $a_n = 0$ for sufficiently large $n$). It's a nice exercise to check that $W^{\perp} = 0$, so $W \oplus W^{\perp} = W$ is strictly smaller than $V$, and does not contain e.g. the sequence $a_n = \frac{1}{n}$.
The standard fix is to assume that $V$ is a Hilbert space (which is true here) and that $W$ is a closed subspace (which is not true here); then the statement is true. $V$ being a Hilbert space and $W$ being closed allows you to define the orthogonal projection of an element of $V$ onto $W$ which is what makes the proof work; you can check in the above example that the sequence $a_n = \frac{1}{n}$ does not admit an orthogonal projection onto $W$.
In a bit more detail, one way to define the orthogonal projection which works in finite dimensions is to take the closest vector in $W$, and another is to use an orthonormal basis of $W$ and define the orthonormal projection as a certain sum of projections onto the basis; both approaches generally fail in infinite dimensions because a limit you need to exist doesn't always exist, unless $V$ is Hilbert and $W$ is closed.

Shouldn't it be the case that a vector lies in $W$ or $W^\perp$?

Be careful; this is not what a direct sum means. A direct sum means that a vector decomposes into a component in $W$ and a component in $W^{\perp}$, not that it lies in either $W$ or $W^{\perp}$.
