Determine the orthogonal complement of the subspace of $\mathbb{R}^3$ given by

linear algebraorthonormal

Determine the orthogonal complement of the subspace of $\mathbb{R}^3$ given by:
$$V=\{(x,y,z)^T:x-y=0\}$$
and find an orthonormal basis for it.

My try:

$x-y=0\implies x=y$
$$\begin{bmatrix} x \\ y \\ z \end{bmatrix}=\begin{bmatrix} y \\ y \\ z \end{bmatrix}=y\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}+z\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}$$
Let $u_1=\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix},u_2=\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}$
$$u_1\cdot u_2=\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}\cdot \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}=0$$So, they are orthogonal.

And to determine the orthonormal basis I need to used Gram-Schmidt right?

Can anyone tell whether I am doing right or wrong?

Best Answer

$V$ is a two-dimensional subspace, spanned by $$ \left[\begin{array}{c}1 \\ 1 \\ 0 \end{array}\right],\;\left[\begin{array}{c}0 \\ 0 \\ 1\end{array}\right]. $$ The orthogonal complement of $V$ is a one-dimensional subspaced, spanned by

$$ \left[\begin{array}{c} 1 \\ -1 \\ 0 \end{array}\right]. $$ So an orthonormal basis of $V^{\perp}$ is $$ \left\{ \left[\begin{array}{c} 1/\sqrt{2} \\ -1/\sqrt{2} \\ 0 \end{array}\right]\right\} $$