Find orthogonal vector to current vector in 3D

Click For Summary

Discussion Overview

The discussion revolves around finding orthogonal vectors in three-dimensional space, exploring methods similar to those used in two dimensions. Participants consider various mathematical approaches, including the dot product and cross product, and discuss the implications of vector properties in 3D.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Exploratory

Main Points Raised

  • One participant notes that in 2D, a vector (a,b) is orthogonal to (-b,a) and questions if a similar method exists in 3D.
  • Another participant explains that the dot product can be used to find an orthogonal vector by setting the dot product of the given vector and the unknown vector to zero.
  • They provide an example using the vector v = (4,2,3) and demonstrate how to find an orthogonal vector c by choosing values for x and y.
  • The same participant also suggests using the cross product, illustrating this with the same vector v and an arbitrary vector p.
  • A later reply emphasizes that there are infinitely many vectors orthogonal to a given vector in 3D.
  • Another participant expresses a preference for simpler methods to enhance performance in coding, similar to the 2D case, and inquires about analogous tricks in 3D.
  • One participant clarifies that while there are multiple orthogonal vectors, finding a unit orthogonal vector may require calculations involving square roots.

Areas of Agreement / Disagreement

Participants generally agree that there are multiple orthogonal vectors in 3D, but there is no consensus on a universally simple method akin to the 2D case. The discussion remains unresolved regarding the best approach for performance optimization in coding.

Contextual Notes

Some limitations include the dependence on the choice of arbitrary vectors and the conditions under which orthogonality is defined. The discussion does not resolve the efficiency of various methods in practical applications.

lemd
Messages
31
Reaction score
0
Hi,

In 2D I know a simple answer: vector (a,b) is orthogonal to vector (-b,a)

Is there anyway similar to that to find an orthogonal vector in 3D?
 
Mathematics news on Phys.org
You can use the dot product. For example, if you have a vector v and want to find vector c that is orthogonal to v, then use the dot product <v,c> and set it equal to 0.

Example:
v = (4,2,3)
c = (x,y,z) = ?

(i) Set the dot product to zero:
<v,c> = 4x + 2y + 3z = 0

(ii) Choose some values for x and y, e.g. x=0 and y=-3

(iii) Solve the equation in (i) for z:
z = 1/3*(-4x-2y) = 1/3*(0+6) = 2

Result: c = (0,-3,2)

---

Another possibility is to use the cross product.
If vector v is given, choose some vector p (not parallel to v) and form the vector c = v x p.

Example:
v = (4,2,3)

(i) Choose an arbitrary vector p (not parallel to v):
p = (0,0,1)

(ii) Form the vector c = v x p (cross product):
c = (4,2,3) x (0,0,1) = (2,-4,0)

---

Note that there are infinitely many vectors that are orthogonal to a given vector.
 
Many thanks

I knew dot and cross product, but because I write code so I need the simplest way to boost performance. As in 2D case I don't need to calculate anything, just use the trick. Also that it works for normalized vectors which doesn't need square root, a slow operation. I hope there are some tricks like that in 3D

Regards
 
There isn't a unique vector orthogonal to a given vector in 3D. If the vector doesn't need to have any other properties, the same "trick" works. A vector orthogonal to (a, b, c) is (-b, a, 0), or (-c, 0, a) or (0, -c, b).

But if you want a unit orthogonal vector, you will have to use something like a square root.
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 73 ·
3
Replies
73
Views
8K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K