How to find a basis of $W$ given the span of $W^{\perp}$? I am having trouble finding the basis of $W$ with the span of a $W^{\perp}$ given. The problem in question is:



I understand how to find $W^{\perp}$ from $W$, but not this way around. The answer is the vector $$(1,1,1,1)$$ but I do not understand how come. If a question like this was to pop up in my exam, how could I solve it? Thanks a lot. I hope you guys can help me out!
 A: You should know that $W\oplus W^\bot=V$, if $W$ is a vector subspace of $V$ with $\dim (V)=\dim(W)+\dim(W^\bot)$. The othogonal complement $W^\bot$ is unique. Therefore it doesn't matter, if you take $W$ and determine $W^\bot$ or if you take $W^\bot$ and determine $(W^\bot)^\bot=W$. The way to determine them is the same. I will give you the general idea of it:
Let $n$ be a positive integer and $\langle.,.\rangle$ be the scalar product of $\mathbb{K}^n$. Given $W$ a vector subspace of $\mathbb{K}^n$ by a generator $\{w_1,...,w_r\}$. We want to determine $W^\bot$.


*

*Determine a basis $(v_1,...,v_r)$ von $W$ and the basis $(v_{r+1},...,v_n)$ of the complement of $W$ in $\mathbb{K}^n$, e.g. by the lemma of Steinitz. 

*Apply the Gram-Schmidt-process on the basis $(v_1,...,v_n)$ of $\mathbb{K}^n$. 

*Is $(u_1,...,u_n)$ the generated family by the process, then $(u_1,...,u_r)$ is the orthonormal basis of $W$ and $(u_{r+1},...,u_n)$ is the orthonormal basis of $W^\bot$.
A: Consider
$$v_1=\begin{bmatrix}{1}\\{-1}\\{0}\\0\end{bmatrix},v_2=\begin{bmatrix}{0}\\{1}\\{-1}\\0\end{bmatrix},v_3=\begin{bmatrix}{0}\\{0}\\{1}\\-1\end{bmatrix},u=\begin{bmatrix}{1}\\{1}\\{1}\\1\end{bmatrix}.$$ Then, $B_{W^{\perp}}=\{v_1,v_2,v_3\}$ is a basis of $W^{\perp}$. We have $\dim W=4-\dim W^{\perp}=4-3=1$ and $$\langle u,v_1\rangle=0,\langle u,v_2\rangle=0,\langle u,v_3\rangle=0,$$ So $u\ne0$ and $u\in W$, hence a basis of $W$ is $B_{W}=\{u\}.$
A: Other answers have given you some excellent general procedures for finding the basis for the orthogonal complement of a space. Here’s another one that’s quite simple to apply and doesn’t require a tedious Gram-Schmidt calculation.  
Every vector in $W$ is orthogonal to every vector in $W^\perp$, so in particular it’s orthogonal to the vectors in the given spanning set of $W^\perp$. This gives you a system of linear equations that must be satisfied by elements of $W$: $$\begin{align}x_1-x_2&=0\\x_2-x_3&=0\\x_3-x_4&=0.\end{align}$$ So, you can find a basis for $W$ by finding the nullspace of the matrix $$\begin{bmatrix}1&-1&0&0\\0&1&-1&0\\0&0&1&-1\end{bmatrix}.$$ In this particular case, you can quickly find that the nullspace is spanned by $\begin{bmatrix}1&1&1&1\end{bmatrix}^T$.  
This technique is generally applicable. To find a basis for the orthogonal complement of the span of a set of vectors, compute the kernel of the matrix that has those vectors as rows, which amounts to solving a homogeneous system of linear equations that capture the orthogonality conditions.  
This reflects the fact that there are two basic ways to specify a subspace: you can list a spanning set for it, or you can list a set of dual vectors that annihilate the subspace. It’s also connected to the fact that for a linear map $L$, $\ker(L^*)$ annihilates $\operatorname{im}(L)$ and $\operatorname{im}(L^*)$ annihilates $\ker(L)$.
However, for multiple-choice questions like this one, you can often find the solution even more quickly by inspection. You know that $\mathbb R^4=W\oplus W^\perp$, so you can immediately eliminate the first choice because it has the wrong dimension (it’s easy to verify by inspection that the given spanning set for $W^\perp$ is linearly independent). Since the dot product of any vector in $W$ with one in $W^\perp$ is zero, you know from examining the first vector in $W^\perp$ that the first two coordinates of every vector in $W$ must be equal. This eliminates the second choice and you can then easily verify that the remaining choice is in fact orthogonal to the given generators of $W^\perp$. 
