How to find orthogonal vector to an arbitrary 3 dimentional vector [duplicate]












0












$begingroup$



This question already has an answer here:




  • Determining the general perpendicular normal

    4 answers




Given a vector $begin{bmatrix}a\b\cend{bmatrix}$ what is a simple solution to find any vector perpendicular to it?










share|cite|improve this question











$endgroup$



marked as duplicate by amd, Alexander Gruber Jan 17 at 23:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • $begingroup$
    In numerical calculations, approaches like "swap the largest and smallest components in magnitude, negating the largest one in magnitude, then orthogonalize (one step of Gram-Schmidt)", can be used.
    $endgroup$
    – Nominal Animal
    Jan 18 at 17:13
















0












$begingroup$



This question already has an answer here:




  • Determining the general perpendicular normal

    4 answers




Given a vector $begin{bmatrix}a\b\cend{bmatrix}$ what is a simple solution to find any vector perpendicular to it?










share|cite|improve this question











$endgroup$



marked as duplicate by amd, Alexander Gruber Jan 17 at 23:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • $begingroup$
    In numerical calculations, approaches like "swap the largest and smallest components in magnitude, negating the largest one in magnitude, then orthogonalize (one step of Gram-Schmidt)", can be used.
    $endgroup$
    – Nominal Animal
    Jan 18 at 17:13














0












0








0





$begingroup$



This question already has an answer here:




  • Determining the general perpendicular normal

    4 answers




Given a vector $begin{bmatrix}a\b\cend{bmatrix}$ what is a simple solution to find any vector perpendicular to it?










share|cite|improve this question











$endgroup$





This question already has an answer here:




  • Determining the general perpendicular normal

    4 answers




Given a vector $begin{bmatrix}a\b\cend{bmatrix}$ what is a simple solution to find any vector perpendicular to it?





This question already has an answer here:




  • Determining the general perpendicular normal

    4 answers








linear-algebra geometry vectors






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 17 at 15:14







George Vinokhodov

















asked Jan 17 at 15:11









George VinokhodovGeorge Vinokhodov

112




112




marked as duplicate by amd, Alexander Gruber Jan 17 at 23:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by amd, Alexander Gruber Jan 17 at 23:21


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • $begingroup$
    In numerical calculations, approaches like "swap the largest and smallest components in magnitude, negating the largest one in magnitude, then orthogonalize (one step of Gram-Schmidt)", can be used.
    $endgroup$
    – Nominal Animal
    Jan 18 at 17:13


















  • $begingroup$
    In numerical calculations, approaches like "swap the largest and smallest components in magnitude, negating the largest one in magnitude, then orthogonalize (one step of Gram-Schmidt)", can be used.
    $endgroup$
    – Nominal Animal
    Jan 18 at 17:13
















$begingroup$
In numerical calculations, approaches like "swap the largest and smallest components in magnitude, negating the largest one in magnitude, then orthogonalize (one step of Gram-Schmidt)", can be used.
$endgroup$
– Nominal Animal
Jan 18 at 17:13




$begingroup$
In numerical calculations, approaches like "swap the largest and smallest components in magnitude, negating the largest one in magnitude, then orthogonalize (one step of Gram-Schmidt)", can be used.
$endgroup$
– Nominal Animal
Jan 18 at 17:13










2 Answers
2






active

oldest

votes


















1












$begingroup$

If you have a (non zero) $2$-dimensional vector $begin{bmatrix}a\bend{bmatrix}$, the orthogonal vectors of it are the $lambda begin{bmatrix}-b\aend{bmatrix}$ where $lambda in mathbf{R}$.



So if you have a (non zero) $3$ dimensional vector $begin{bmatrix}a\b\cend{bmatrix}$ you have easily a lot of orthogonal vectors :
$lambda begin{bmatrix}-b\a\0end{bmatrix} + mubegin{bmatrix}0\-c\bend{bmatrix}+ nu begin{bmatrix}-c\0\aend{bmatrix} $
It is possible to check you generate all the orthogonal vectors to $begin{bmatrix}a\b\cend{bmatrix}$ like this (in reality, you just need two of them, but which ones you choose depends on the eventual annulations of $a$,$b$,$c$).






share|cite|improve this answer









$endgroup$













  • $begingroup$
    There are some trivial terms that might appear in my sum ; still you get every time all the othogonal vectors. If a=0, b=0, c=1 you have all the orthogonal vectors by choosing $lambda$ = 0 and $mu, nu$ varying in $mathbf{R}$ (so you don't need $lambda$ in this case). If it was a=1, b=0, c=0, it is $mu$ that is not needed.
    $endgroup$
    – DLeMeur
    Jan 17 at 15:32










  • $begingroup$
    This trio of vectors is actually of rank 2 (consider $lambda=c$, $mu = a$, and $nu = -b$), so you need to take care that your parameters aren't part of the kernel.
    $endgroup$
    – Dan Uznanski
    Jan 17 at 15:33





















1












$begingroup$

You can use $begin{bmatrix}b+c\c-a\-a-bend{bmatrix}$ vector.



Here is the verification: $begin{bmatrix}a\b\cend{bmatrix} . begin{bmatrix}b+c\c-a\-a-bend{bmatrix} = a(b+c) + b(c-a)+c(-a-b)=0$



The third orthogonal vector is found by taking a cross product of initial and derived vector.



Any linear combination of these two derived vectors are orthogonal to original one as well.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Nice one. You should just emphasize that it's not unique.
    $endgroup$
    – Andrei
    Jan 17 at 15:13






  • 1




    $begingroup$
    as @dan-uznanski pointed, in another answer, this example doesn't work for some particular values.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 20:52










  • $begingroup$
    And since (en.wikipedia.org/wiki/Hairy_ball_theorem) There is no single continuous function that can generate a vector in R3 that is orthogonal to a given one for all vector inputs. so it seems it is impossible to construct one elegant universal solution.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 21:33


















2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

If you have a (non zero) $2$-dimensional vector $begin{bmatrix}a\bend{bmatrix}$, the orthogonal vectors of it are the $lambda begin{bmatrix}-b\aend{bmatrix}$ where $lambda in mathbf{R}$.



So if you have a (non zero) $3$ dimensional vector $begin{bmatrix}a\b\cend{bmatrix}$ you have easily a lot of orthogonal vectors :
$lambda begin{bmatrix}-b\a\0end{bmatrix} + mubegin{bmatrix}0\-c\bend{bmatrix}+ nu begin{bmatrix}-c\0\aend{bmatrix} $
It is possible to check you generate all the orthogonal vectors to $begin{bmatrix}a\b\cend{bmatrix}$ like this (in reality, you just need two of them, but which ones you choose depends on the eventual annulations of $a$,$b$,$c$).






share|cite|improve this answer









$endgroup$













  • $begingroup$
    There are some trivial terms that might appear in my sum ; still you get every time all the othogonal vectors. If a=0, b=0, c=1 you have all the orthogonal vectors by choosing $lambda$ = 0 and $mu, nu$ varying in $mathbf{R}$ (so you don't need $lambda$ in this case). If it was a=1, b=0, c=0, it is $mu$ that is not needed.
    $endgroup$
    – DLeMeur
    Jan 17 at 15:32










  • $begingroup$
    This trio of vectors is actually of rank 2 (consider $lambda=c$, $mu = a$, and $nu = -b$), so you need to take care that your parameters aren't part of the kernel.
    $endgroup$
    – Dan Uznanski
    Jan 17 at 15:33


















1












$begingroup$

If you have a (non zero) $2$-dimensional vector $begin{bmatrix}a\bend{bmatrix}$, the orthogonal vectors of it are the $lambda begin{bmatrix}-b\aend{bmatrix}$ where $lambda in mathbf{R}$.



So if you have a (non zero) $3$ dimensional vector $begin{bmatrix}a\b\cend{bmatrix}$ you have easily a lot of orthogonal vectors :
$lambda begin{bmatrix}-b\a\0end{bmatrix} + mubegin{bmatrix}0\-c\bend{bmatrix}+ nu begin{bmatrix}-c\0\aend{bmatrix} $
It is possible to check you generate all the orthogonal vectors to $begin{bmatrix}a\b\cend{bmatrix}$ like this (in reality, you just need two of them, but which ones you choose depends on the eventual annulations of $a$,$b$,$c$).






share|cite|improve this answer









$endgroup$













  • $begingroup$
    There are some trivial terms that might appear in my sum ; still you get every time all the othogonal vectors. If a=0, b=0, c=1 you have all the orthogonal vectors by choosing $lambda$ = 0 and $mu, nu$ varying in $mathbf{R}$ (so you don't need $lambda$ in this case). If it was a=1, b=0, c=0, it is $mu$ that is not needed.
    $endgroup$
    – DLeMeur
    Jan 17 at 15:32










  • $begingroup$
    This trio of vectors is actually of rank 2 (consider $lambda=c$, $mu = a$, and $nu = -b$), so you need to take care that your parameters aren't part of the kernel.
    $endgroup$
    – Dan Uznanski
    Jan 17 at 15:33
















1












1








1





$begingroup$

If you have a (non zero) $2$-dimensional vector $begin{bmatrix}a\bend{bmatrix}$, the orthogonal vectors of it are the $lambda begin{bmatrix}-b\aend{bmatrix}$ where $lambda in mathbf{R}$.



So if you have a (non zero) $3$ dimensional vector $begin{bmatrix}a\b\cend{bmatrix}$ you have easily a lot of orthogonal vectors :
$lambda begin{bmatrix}-b\a\0end{bmatrix} + mubegin{bmatrix}0\-c\bend{bmatrix}+ nu begin{bmatrix}-c\0\aend{bmatrix} $
It is possible to check you generate all the orthogonal vectors to $begin{bmatrix}a\b\cend{bmatrix}$ like this (in reality, you just need two of them, but which ones you choose depends on the eventual annulations of $a$,$b$,$c$).






share|cite|improve this answer









$endgroup$



If you have a (non zero) $2$-dimensional vector $begin{bmatrix}a\bend{bmatrix}$, the orthogonal vectors of it are the $lambda begin{bmatrix}-b\aend{bmatrix}$ where $lambda in mathbf{R}$.



So if you have a (non zero) $3$ dimensional vector $begin{bmatrix}a\b\cend{bmatrix}$ you have easily a lot of orthogonal vectors :
$lambda begin{bmatrix}-b\a\0end{bmatrix} + mubegin{bmatrix}0\-c\bend{bmatrix}+ nu begin{bmatrix}-c\0\aend{bmatrix} $
It is possible to check you generate all the orthogonal vectors to $begin{bmatrix}a\b\cend{bmatrix}$ like this (in reality, you just need two of them, but which ones you choose depends on the eventual annulations of $a$,$b$,$c$).







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 17 at 15:21









DLeMeurDLeMeur

3148




3148












  • $begingroup$
    There are some trivial terms that might appear in my sum ; still you get every time all the othogonal vectors. If a=0, b=0, c=1 you have all the orthogonal vectors by choosing $lambda$ = 0 and $mu, nu$ varying in $mathbf{R}$ (so you don't need $lambda$ in this case). If it was a=1, b=0, c=0, it is $mu$ that is not needed.
    $endgroup$
    – DLeMeur
    Jan 17 at 15:32










  • $begingroup$
    This trio of vectors is actually of rank 2 (consider $lambda=c$, $mu = a$, and $nu = -b$), so you need to take care that your parameters aren't part of the kernel.
    $endgroup$
    – Dan Uznanski
    Jan 17 at 15:33




















  • $begingroup$
    There are some trivial terms that might appear in my sum ; still you get every time all the othogonal vectors. If a=0, b=0, c=1 you have all the orthogonal vectors by choosing $lambda$ = 0 and $mu, nu$ varying in $mathbf{R}$ (so you don't need $lambda$ in this case). If it was a=1, b=0, c=0, it is $mu$ that is not needed.
    $endgroup$
    – DLeMeur
    Jan 17 at 15:32










  • $begingroup$
    This trio of vectors is actually of rank 2 (consider $lambda=c$, $mu = a$, and $nu = -b$), so you need to take care that your parameters aren't part of the kernel.
    $endgroup$
    – Dan Uznanski
    Jan 17 at 15:33


















$begingroup$
There are some trivial terms that might appear in my sum ; still you get every time all the othogonal vectors. If a=0, b=0, c=1 you have all the orthogonal vectors by choosing $lambda$ = 0 and $mu, nu$ varying in $mathbf{R}$ (so you don't need $lambda$ in this case). If it was a=1, b=0, c=0, it is $mu$ that is not needed.
$endgroup$
– DLeMeur
Jan 17 at 15:32




$begingroup$
There are some trivial terms that might appear in my sum ; still you get every time all the othogonal vectors. If a=0, b=0, c=1 you have all the orthogonal vectors by choosing $lambda$ = 0 and $mu, nu$ varying in $mathbf{R}$ (so you don't need $lambda$ in this case). If it was a=1, b=0, c=0, it is $mu$ that is not needed.
$endgroup$
– DLeMeur
Jan 17 at 15:32












$begingroup$
This trio of vectors is actually of rank 2 (consider $lambda=c$, $mu = a$, and $nu = -b$), so you need to take care that your parameters aren't part of the kernel.
$endgroup$
– Dan Uznanski
Jan 17 at 15:33






$begingroup$
This trio of vectors is actually of rank 2 (consider $lambda=c$, $mu = a$, and $nu = -b$), so you need to take care that your parameters aren't part of the kernel.
$endgroup$
– Dan Uznanski
Jan 17 at 15:33













1












$begingroup$

You can use $begin{bmatrix}b+c\c-a\-a-bend{bmatrix}$ vector.



Here is the verification: $begin{bmatrix}a\b\cend{bmatrix} . begin{bmatrix}b+c\c-a\-a-bend{bmatrix} = a(b+c) + b(c-a)+c(-a-b)=0$



The third orthogonal vector is found by taking a cross product of initial and derived vector.



Any linear combination of these two derived vectors are orthogonal to original one as well.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Nice one. You should just emphasize that it's not unique.
    $endgroup$
    – Andrei
    Jan 17 at 15:13






  • 1




    $begingroup$
    as @dan-uznanski pointed, in another answer, this example doesn't work for some particular values.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 20:52










  • $begingroup$
    And since (en.wikipedia.org/wiki/Hairy_ball_theorem) There is no single continuous function that can generate a vector in R3 that is orthogonal to a given one for all vector inputs. so it seems it is impossible to construct one elegant universal solution.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 21:33
















1












$begingroup$

You can use $begin{bmatrix}b+c\c-a\-a-bend{bmatrix}$ vector.



Here is the verification: $begin{bmatrix}a\b\cend{bmatrix} . begin{bmatrix}b+c\c-a\-a-bend{bmatrix} = a(b+c) + b(c-a)+c(-a-b)=0$



The third orthogonal vector is found by taking a cross product of initial and derived vector.



Any linear combination of these two derived vectors are orthogonal to original one as well.






share|cite|improve this answer











$endgroup$













  • $begingroup$
    Nice one. You should just emphasize that it's not unique.
    $endgroup$
    – Andrei
    Jan 17 at 15:13






  • 1




    $begingroup$
    as @dan-uznanski pointed, in another answer, this example doesn't work for some particular values.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 20:52










  • $begingroup$
    And since (en.wikipedia.org/wiki/Hairy_ball_theorem) There is no single continuous function that can generate a vector in R3 that is orthogonal to a given one for all vector inputs. so it seems it is impossible to construct one elegant universal solution.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 21:33














1












1








1





$begingroup$

You can use $begin{bmatrix}b+c\c-a\-a-bend{bmatrix}$ vector.



Here is the verification: $begin{bmatrix}a\b\cend{bmatrix} . begin{bmatrix}b+c\c-a\-a-bend{bmatrix} = a(b+c) + b(c-a)+c(-a-b)=0$



The third orthogonal vector is found by taking a cross product of initial and derived vector.



Any linear combination of these two derived vectors are orthogonal to original one as well.






share|cite|improve this answer











$endgroup$



You can use $begin{bmatrix}b+c\c-a\-a-bend{bmatrix}$ vector.



Here is the verification: $begin{bmatrix}a\b\cend{bmatrix} . begin{bmatrix}b+c\c-a\-a-bend{bmatrix} = a(b+c) + b(c-a)+c(-a-b)=0$



The third orthogonal vector is found by taking a cross product of initial and derived vector.



Any linear combination of these two derived vectors are orthogonal to original one as well.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 17 at 15:24

























answered Jan 17 at 15:11









George VinokhodovGeorge Vinokhodov

112




112












  • $begingroup$
    Nice one. You should just emphasize that it's not unique.
    $endgroup$
    – Andrei
    Jan 17 at 15:13






  • 1




    $begingroup$
    as @dan-uznanski pointed, in another answer, this example doesn't work for some particular values.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 20:52










  • $begingroup$
    And since (en.wikipedia.org/wiki/Hairy_ball_theorem) There is no single continuous function that can generate a vector in R3 that is orthogonal to a given one for all vector inputs. so it seems it is impossible to construct one elegant universal solution.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 21:33


















  • $begingroup$
    Nice one. You should just emphasize that it's not unique.
    $endgroup$
    – Andrei
    Jan 17 at 15:13






  • 1




    $begingroup$
    as @dan-uznanski pointed, in another answer, this example doesn't work for some particular values.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 20:52










  • $begingroup$
    And since (en.wikipedia.org/wiki/Hairy_ball_theorem) There is no single continuous function that can generate a vector in R3 that is orthogonal to a given one for all vector inputs. so it seems it is impossible to construct one elegant universal solution.
    $endgroup$
    – George Vinokhodov
    Jan 17 at 21:33
















$begingroup$
Nice one. You should just emphasize that it's not unique.
$endgroup$
– Andrei
Jan 17 at 15:13




$begingroup$
Nice one. You should just emphasize that it's not unique.
$endgroup$
– Andrei
Jan 17 at 15:13




1




1




$begingroup$
as @dan-uznanski pointed, in another answer, this example doesn't work for some particular values.
$endgroup$
– George Vinokhodov
Jan 17 at 20:52




$begingroup$
as @dan-uznanski pointed, in another answer, this example doesn't work for some particular values.
$endgroup$
– George Vinokhodov
Jan 17 at 20:52












$begingroup$
And since (en.wikipedia.org/wiki/Hairy_ball_theorem) There is no single continuous function that can generate a vector in R3 that is orthogonal to a given one for all vector inputs. so it seems it is impossible to construct one elegant universal solution.
$endgroup$
– George Vinokhodov
Jan 17 at 21:33




$begingroup$
And since (en.wikipedia.org/wiki/Hairy_ball_theorem) There is no single continuous function that can generate a vector in R3 that is orthogonal to a given one for all vector inputs. so it seems it is impossible to construct one elegant universal solution.
$endgroup$
– George Vinokhodov
Jan 17 at 21:33



Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules