[Math] find all vectors perpendicular to a given vector

linear algebravectors

Given a vector $a\vec{i}+b\vec{j}+c\vec{k}$, how do you find all vectors perpendicular to it in a parametrised form preferably? One can of course say $x,y,z\,\,such \,that \,ax+by+cz=0$. I am looking for a very succinct parametrisation, as minimum parametrising variables as possible. We already know that all such vectors will lie on circle.So there should be some very easy parametrisation that does not have to iterate through $x,y,z$. Actually i want to write a computer code, and iterating through all possible $x,y,z$ just won't cut it. Any smart way of representing all vectors?

Best Answer

To simplify matters lets call $e_1 = (a,b,c)$ in your chosen basis. You can extend $\{e_1 \}$ to an orthogonal basis $\{e_1, e_2, e_3\}$ using Gram-Schmidt. You can google Gram-Schmidt algorithm if you don't already know it. Then $span\{e_2 ,e_3\}$ is the plane orthogonal to $e_1$, and any element in that plane is a linear combination of $e_2$ and $e_3$, i.e. $\lambda_2 e_2 + \lambda_3 e_3$.

If you only want those vectors with unit length(forming a circle), you could also parameterize it by $$ \sin{\theta} e_2 + \cos{\theta}e_3 $$ so that $\sin{\theta} ^2 + \cos{\theta}^2 =1$

Of course you need to normalize $\{e_1, e_2, e_3\}$ into an orthonormal basis first.

I would say the first approach is more complicated to write down but easier to think of in an abstract way. You simply write a $2$-$d$ rotational matrix in the basis $\{e_2 ,e_3\}$ and act on any orthogonal non-zero vector, e.g. $e_2$. To implement this simply find the matrix sending the standard basis to $\{e_1,e_2,e_3\}$ and conjugate a $2$-$d$ rotational matrix with it. You will basically get the same thing.