How to define orthogonal complement in an arbitrary vector space In this article about codimension there is the following remark: 
The codimension of a subspace  $L$ of a vector space $V$ is equal to the dimension of any complement of $L$ in $V$, since all complements have the same dimension (as the orthogonal complement).
I know the definition of orthogonal complement in a Hilbert space but it's not clear to me how the orthogonal complement is defined in an arbitrary vector space. 

How to define it in this case?

Also, 

What's the definition of a (non-orthogonal) complement of a subspace?

Edit
"complement" is also used in this answer here. It's really not clear to me how to define a complement (if it's not orthogonal).
 A: (1) Let $X$ be a finite-dimensional vector space, $W \subset X$ a vector subspace.
A complement of $W$ in $X$ is any subspace $S \subset X$ such that
$$X = W \oplus S.$$
(2) Let $X$ be a finite-dimensional inner product space, $W \subset X$ a vector subspace.
The orthogonal complement of $W \subset X$ is the subspace $W^\perp := \{x \in X \colon \langle x,w \rangle = 0 \ \forall w \in W\}$.  The orthogonal complement satisfies
$$X = W \oplus W^\perp.$$
Therefore, the orthogonal complement is a complement of $W$.

(3) Let $X$ be a Banach space, $W \subset X$ a closed vector subspace.
A (Banach space) complement of $W$ in $X$ is any closed subspace $S \subset V$ such that
$$X = W \oplus S.$$
(4) Let $X$ be a Hilbert space, $W \subset X$ a closed vector subspace.
The orthogonal complement of $W \subset X$ is the subspace $W^\perp := \{x \in X \colon \langle x,w \rangle = 0 \ \forall w \in W\}$.  The orthogonal complement is a closed subspace of $X$, and satisfies
$$X = W \oplus W^\perp.$$
Therefore, the orthogonal complement is a (Banach space) complement of $W$.

Edit: As Nate Eldredge points out in the comments, in the case where $X$ is an inner product space (of any dimension) and $W \subset X$ is not necessarily closed, then what we have is
$$X = \overline{W} \oplus W^\perp.$$
If $X$ is finite-dimensional, then any subspace $W \subset X$ is automatically closed, and so $\overline{W} = W$ in that case.
A: The most general statement of orthogonality I've seen is in a Banach space. If you have a Banach space $X$ and denote it's dual by $X^{*} $ then, for $V \subseteq X$, the complement of $V $ is defined as all $x^{*} \in X^{*}$ s.t for every $v \in V $, $x^{*}(v)=0$. 
