How to find vector that is orthonormal on other.

117 Views Asked by At

I have to generate a Q matrix for Schur decomposition and I have the first column, let's it is the following: \begin{bmatrix}1/√3\\1/√3\\1/√3 \end{bmatrix}

Now I need to find the second column that is a vector, orthonormal on the above one. I know how to check if two vectors are orthonormal with Gram-Schimdt method, but I have no idea how to generate one.

4

There are 4 best solutions below

0
On

Hint: $(a,b,c)\perp (0,-c,b)$ $$\phantom{}\phantom{}\phantom{}\phantom{}\phantom{}\phantom{}\phantom{}$$

0
On

You need a vector $(x,y,z)$ such that $$x\frac{1}{\sqrt3}+y\frac{1}{\sqrt3}+z\frac{1}{\sqrt3}=0\ .$$ Hopefully you can see an answer to this without working, for example, $x=1$, $y=-1$, $z=0$. So $(1,-1,0)$ is orthogonal to your vector. Since you want the vectors to be orthonormal you need to divide by the length of this vector, which is $\sqrt2$. So a possible answer is $$\pmatrix{1/\sqrt2\cr -1/\sqrt2\cr 0\cr}\ .$$ If you didn't spot the "easy" solution you could take any values you like for $x,y$, then solve for $z$. For example, $x=1$, $y=2$ gives $z=-3$, and the vector $(1,2,-3)$ has length $\sqrt{14}$. So another answer is $$\pmatrix{1/\sqrt{14}\cr 2/\sqrt{14}\cr -3/\sqrt{14}\cr}\ .$$

0
On

Gram-Schmidt is indeed the easiest. Call your original vector $v$. Find another vector $u$ which is not a multiple of $v$ (i.e. linearly independent of $v$). Then define

$$z= u - \frac{v^T u}{v^T v} v$$

and $z$ will be orthogonal to $v$.

0
On

Obviously $\begin{pmatrix}1/\sqrt{2}\\ -1/\sqrt{2}\\ 0\end{pmatrix}$ is orthogonal to the first vector a has length $1$. Now take the cross product of those two vectors and the work is done.