# Given a set and a basis of $\Bbb R^3$, find coordinates of vectors in the basis $B$ of the orthogonal complement of the set

Let $$\Bbb S=\{\vec x\in\Bbb R^3\mid x_1-x_2=0\}$$ and $$B=\{(1,2,1),v,(2,1,1)\}$$ be a basis of $$\Bbb R^3$$. It is known that $$[(-3,9,1)]_B=\Bigl(\begin{smallmatrix}2\\3\\-1\end{smallmatrix}\Bigr)$$.

Find coordinates in the base $$B$$ of the vectors of a basis of $$\Bbb S^\perp$$.

I have done the following:

First we have to know $$v$$. Using the fact that $$[(-3,9,1)]_B=\Bigl(\begin{smallmatrix}2\\3\\-1\end{smallmatrix}\Bigr)$$, then $$2(1,2,1)+3(v_1,v_2,v_3)+(-1)(2,1,1)=(-3,9,1)\implies\begin{cases}2+3v_1-2=-3,\\4+3v_2-1=9,\\2+3v_3-1=1\end{cases}\equiv\begin{cases}v_1=-1,\\v_2=2,\\v_3=0\end{cases}\implies v=(-1,2,0).$$ To find the orthogonal complement of $$\Bbb S$$, we need a basis of $$\Bbb S$$. Let $$U_{\Bbb S}$$ be that basis. So from $$\{\vec x\in\Bbb R^3\mid x_1-x_2=0\}$$ we can conclude that $$U_{\Bbb S}=\{(1,1,0),(0,0,1)\}$$, so to find the coordinates of the basis of $$U_{\Bbb S^\perp}$$ we have to make two scalar products: $$\begin{cases}(x,y,z)\cdot(1,1,0)=0\\(x,y,z)\cdot(0,0,1)=0\end{cases}\equiv\begin{cases}y=-x,\\z=0,\end{cases}$$ thus $$U_{\Bbb S^\perp}=\{(1,-1,0)\}$$.

However, this basis IS NOT in the $$B$$ basis, so we have to state $$[(1,-1,0)]_B=\Bigl(\begin{smallmatrix}x\\y\\z\end{smallmatrix}\Bigr)$$. Therefore, $$x(1,2,1)+y(-1,2,0)+z(2,1,1)=(1,-1,0)\implies\begin{cases}x-y+2z=1,\\2x+2y+z=-1,\\x+z=0\end{cases}\equiv\begin{cases}x=-1,\\y=0,\\z=1.\end{cases}$$ Hence, the answer to the question is that the coordinates in basis $$B$$ of a basis of $$\Bbb S^\perp$$ (we called it $$U_{\Bbb S^\perp}$$) is $$\boxed{(x,y,z)=(-1,0,1)}$$.

Are both the reasoning and the words used correct?

Thanks!