# Give a basis of a subspace

• Feb 9th 2009, 02:49 PM
arbolis
Give a basis of a subspace
Hi MHF,
We have the following vectorial subspace $W$ pertaining to $\mathbb{R}^4$ such that $W=\{ (x,y,z,w) \in \mathbb{R}^4 : 2x-z+w=0, x-y-z=0 \}$.
1)Find a basis of W.
2)Find a basis of W orthogonal.
My attempt :
1)I just wrote the 2 equations defining W as a matrix and chosen the 2 first column vectors of the matrix as being a basis of W.
Precisely I got that a basis of W is {(2,1),(0,-1)}. (0,-1) being the last column vector of the matrix I formed.
2)I'm not 100% sure about what I've done here. I chosen the basis {(2,1),(1,0)}.

How can I check if I'm right on this? I guess I could form a matrix with the vectors in the basis I gave and try to get a null row or column when reducing it. But I'm not sure, and not sure how to form the matrix too.
Can you help me?
• Feb 9th 2009, 05:20 PM
NonCommAlg
Quote:

Originally Posted by arbolis
Hi MHF,
We have the following vectorial subspace $W$ pertaining to $\mathbb{R}^4$ such that $W=\{ (x,y,z,w) \in \mathbb{R}^4 : 2x-z+w=0, x-y-z=0 \}$.
1)Find a basis of W.
2)Find a basis of W orthogonal.
My attempt :
1)I just wrote the 2 equations defining W as a matrix and chosen the 2 first column vectors of the matrix as being a basis of W.
Precisely I got that a basis of W is {(2,1),(0,-1)}. (0,-1) being the last column vector of the matrix I formed.
2)I'm not 100% sure about what I've done here. I chosen the basis {(2,1),(1,0)}.

How can I check if I'm right on this? I guess I could form a matrix with the vectors in the basis I gave and try to get a null row or column when reducing it. But I'm not sure, and not sure how to form the matrix too.
Can you help me?

to find a basis for W, just solve the equations: $\begin{cases}2x-z+w=0 \\ x-y-z=0 \end{cases},$ which gives you: $z=x-y, \ w=-x-y.$ so a typical element of W is: $\begin{bmatrix}x \\ y \\ x-y \\ -x-y \end{bmatrix}=x \begin{bmatrix}1 \\ 0 \\ 1 \\ -1 \end{bmatrix} + y \begin{bmatrix} 0 \\ 1 \\ -1 \\ -1 \end{bmatrix}=xu_1+yu_2.$

thus $\{u_1,u_2\}$ is a basis for W. to find a basis for $W^{\perp},$ an easy way is to look for all vectors $v=\begin{bmatrix} x \\ y \\ z \\ w \end{bmatrix}$ such that $v \cdot u_1=v \cdot u_2=0,$ i.e. $\begin{cases}x+z-w=0 \\ y-z-w=0 \end {cases}.$ that gives us: $z=\frac{y-x}{2}, \ w=\frac{x+y}{2}.$

so a typical element of $W^{\perp}$ is: $\begin{bmatrix} x \\ y \\ \frac{y-x}{2} \\ \frac{x+y}{2} \end{bmatrix}=\frac{x}{2}\begin{bmatrix} 2 \\ 0 \\ -1 \\ 1 \end{bmatrix}+\frac{y}{2}\begin{bmatrix} 0 \\ 2 \\ 1 \\ 1 \end{bmatrix}=\frac{x}{2}u_3 + \frac{y}{2}u_4.$ thus $\{u_3,u_4 \}$ is a basis for $W^{\perp}.$
• Feb 9th 2009, 06:52 PM
math2009
$2x-z+w=\begin{bmatrix} 2 \\ 0 \\-1 \\ 1 \end{bmatrix}.\begin{bmatrix} x \\ y \\z \\ w \end{bmatrix}=0$,normal vector $\vec{v}_1=\begin{bmatrix} 2 \\ 0 \\-1 \\ 1 \end{bmatrix}
,x-y-z=0$
, normal vector $\vec{v}_2=\begin{bmatrix} 1 \\ -1 \\ -1 \\ 0 \end{bmatrix}
$

$W=\{ (x,y,z,w) \in \mathbb{R}^4 : 2x-z+w=0, x-y-z=0 \}
$
, so $W$ is intersection line of two hyperplanes.

We solve equation $A\vec{x}=\vec{0}, A=\begin{bmatrix} 2&0&-1&1\\ 1&-1&-1&0 \end{bmatrix},
W=ker (A) ,rref (A)=\begin{bmatrix} 1&0&-1/2&1/2\\ 0&1&1/2&1/2 \end{bmatrix},$

$rank(A) = Dim(W)=2$, so there are two linear independent vectors in basis.

$W=\begin{bmatrix} (z-w)/2 \\ -(z+w)/2 \\ z \\ w \end{bmatrix}
=z\begin{bmatrix} 1/2 \\ -1/2 \\ 1 \\ 0 \end{bmatrix}+w\begin{bmatrix} -1/2 \\ -1/2 \\ 0 \\ 1 \end{bmatrix}, basis = (\begin{bmatrix} \frac{1}{2}\\ -\frac{1}{2} \\ 1 \\ 0 \end{bmatrix},\begin{bmatrix} -\frac{1}{2}\\ -\frac{1}{2} \\ 0 \\ 1 \end{bmatrix})
$

by the way, dimension is four. if it's 3, it's easy to calc by W = span(v1 x v2)

**********
$
W^{\perp}
$
is hyperplane orthogonal to intersection line $W$. Its basis is two linear independent normal vectors $(\vec{v}_1,\vec{v}_2).
W^{\perp} basis = (\begin{bmatrix} 2 \\0 \\ -1 \\ 1 \end{bmatrix},\begin{bmatrix} 1 \\ -1 \\ -1 \\ 0 \end{bmatrix})
$

There is no union solution. This answer is the same with **NonCommAlg's Avatar** above.
• Feb 10th 2009, 03:57 AM
arbolis
Thank you very much to both. I'll study this in detail today.
• Feb 10th 2009, 08:46 AM
HallsofIvy
Without using matrices: You have two equations, 2x-z+w=0 and x-y-z=0 in 4 variables. The equations are independent so we can solve for two of the variables in terms of the other 2 meaning that this is a two dimensional subspace of the four dimensional $R^4$.

We get z= x- y from the second equation and, putting that into the first, 2x-(x-y)+ w= x+ y+ w= 0 so w= -x-y. If we take x= 1, y= 0, z= 1, w= -1 so (1, 0, 1, -1) is a vector in that subspace. Taking x= 0, y= 1, z= -1, w= -1 so (0, 1, -1, -1) is another vector in that subspace. Taking x=1, y= 0 and x= 0, y= 1 ensures that they are independent vectors so {(1, 0, 1, -1), (0, 1, -1, -1)} is a basis for the subspace W.

Vectors in the orthogonal subspace to W must be perpendicular to every vector in W. Since we already know that 2x- z+ w= 2(x)+ 0(y)+ (-1)z+ (1)w= 0 and x-y-z= 1(x)+ (-1)y+ (-1)z+ 0(w)= 0, it is clear that (2, 0, -1, 1) and (1, -1, -1, 0) are in that orthogonal orthogonal space and it is clear that they are independent so {(2, 0, -1, 1), (1, -1, -1, 0)} is a basis for the orthogonal subspace to W
• Feb 10th 2009, 10:39 AM
arbolis
To NCA : I could follow all you put until here : . Could you please tell me how did you get these values for z and w?

To HallsofIvy : Nicely saw. Especially the second part. Thank you.
• Feb 10th 2009, 03:36 PM
math2009
To add two equations: $\begin{cases}x+z-w=0 \\ y-z-w=0 \end {cases}$ $\rightarrow (x+z-w) + (y-z-w)=0 \rightarrow x+y-2w=0 \rightarrow w=\frac{x+y}{2}$