# Find a basis for $\mathbf{W}^{\perp}$ given spanning vectors of $\mathbf{W}$

I am solving these problems in preparation to a midterm. Here's the problem I have solved before tackling the one I am asking help with:

I was given 1 basis vector for $\mathbf{W}$ - $\begin{bmatrix} 1\\ 2\\ 3\\ 4\\ 5 \end{bmatrix}$, and I had to find a basis for $\mathbf{W}^{\perp}$. I set up an equation $\begin{bmatrix} 1\\ 2\\ 3\\ 4\\ 5 \end{bmatrix}$ dotted with $\begin{bmatrix} a & b & c & d & e \end{bmatrix}$ = 0 and found the kernel (it was $\begin{bmatrix} -2b-3c-4d-5e\\ b\\ c\\ d\\ e \end{bmatrix}$.)

Now, I know that Span of $\mathbb{W}$ = $\begin{bmatrix} 1\\ 2\\ 3\\ 0 \end{bmatrix}$, $\begin{bmatrix} 1\\ 2\\ 3\\ 4 \end{bmatrix}$. I need to find a basis for $\mathbf{W}^{\perp}$, or the sub-space that contains vectors such that if two vectors from $\mathbf{W}$ and $\mathbf{W}^{\perp}$ were dotted, the result would be 0. But I am not sure how to go about this similar problem when I am given two vectors. Thanks!

-

Okay, first of all you can simplify your basis vectors a bit. You can write

$$W = \operatorname{span} \left\{ \begin{pmatrix} 1 \\ 2 \\ 3 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} \right\}$$

In general you can apply Gram-Schmidt before to get an ON-basis for the subspace.

Call the vectors $v_1$ and $v_2$. Now, if $u \in W^\perp$, $\langle u, v_1 \rangle = \langle u, v_2 \rangle = 0$. Let $u = (a,b,c,d)^T$. Immidiately you get:

$$\langle u, v_2 \rangle = 0 \Leftrightarrow d = 0$$

And

$$\langle u, v_1 \rangle = 0 \Leftrightarrow a + 2b + 3c = 0$$

which gives a parametric solution (set $c = t$ and $b = s$, solve fo $a$):

$$u = s \begin{pmatrix} 3 \\ 0 \\ -1 \\ 0 \end{pmatrix} + t \begin{pmatrix} 2 \\ -1 \\ 0 \\ 0 \end{pmatrix}$$

$$W^\perp = \operatorname{span} \left\{ \begin{pmatrix} 3 \\ 0 \\ -1 \\ 0 \end{pmatrix}, \begin{pmatrix} 2 \\ -1 \\ 0 \\ 0 \end{pmatrix} \right\}$$

-

Your same ideas as before will work.

Take a vector

$\begin{bmatrix} a\\ b\\ c\\ d \end{bmatrix}$

You want this vector to be perpendicular to $\begin{bmatrix} 1\\ 2\\ 3\\ 0 \end{bmatrix}$ and to $\begin{bmatrix} 1\\ 2\\ 3\\ 4 \end{bmatrix}$

You get $a + 2b + 3c = 0$ and $a+ 2b + 3c + 4d = 0$.

From which you get $d = 0$ and $a+2b+3c = 0$.

Hence, $W^{\perp}$ is a $2D$ subspace, with $d=0$ and $a+2b+3c = 0$ i.e. $\begin{bmatrix} -2b-3c\\ b\\ c\\ 0 \end{bmatrix}$

Select two pairs $(a,b,c)$ such that the two are linearly independent to get a pair of basis for $W^{\perp}$.

An example for the two basis are $[3,0,-1,0]$ and $[2,-1,0,0]$

-