Find orthogonal vector to current vector in 3D

In summary, there are two main ways to find an orthogonal vector in 3D: using the dot product or using the cross product. The dot product method involves setting the dot product of the given vector and the unknown vector to 0 and solving for the unknown components. The cross product method involves choosing an arbitrary vector not parallel to the given vector and finding the cross product between them. However, there isn't a unique orthogonal vector in 3D and if a unit vector is desired, a square root operation may be necessary.
  • #1
lemd
31
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
  • #2
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.
 
  • #3
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
 
  • #4
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:
  • #5


Yes, there is a similar method for finding an orthogonal vector in 3D. In order to find an orthogonal vector to a given vector (a,b,c) in 3D, we can use the cross product. The cross product of two vectors (a,b,c) and (d,e,f) is given by the vector (bf-ce, cd-af, ae-bd). This means that the cross product of (a,b,c) and (-c,a,b) will result in an orthogonal vector to the original vector. So, to find an orthogonal vector to (a,b,c), we can simply take the cross product with any vector that has a different z-component, such as (-c,a,b) or (b,-a,0). This method can also be extended to higher dimensions by using the generalized cross product.
 

1. What is an orthogonal vector?

An orthogonal vector is a vector that is perpendicular to another vector. This means that the dot product of the two vectors is equal to zero.

2. How do you find an orthogonal vector to a given vector in 3D?

To find an orthogonal vector to a given vector in 3D, you can use the cross product. Take the cross product of the given vector with any other vector that is not parallel to it. The resulting vector will be orthogonal to the given vector.

3. Can there be more than one orthogonal vector to a given vector in 3D?

Yes, there can be infinitely many orthogonal vectors to a given vector in 3D. This is because for any vector, you can take the cross product with another vector that is not parallel to it to get another orthogonal vector.

4. How do you check if two vectors are orthogonal to each other?

To check if two vectors are orthogonal to each other, you can take their dot product. If the dot product is equal to zero, then the vectors are orthogonal. If the dot product is not equal to zero, then the vectors are not orthogonal.

5. Can an orthogonal vector be in the same direction as the given vector?

No, an orthogonal vector cannot be in the same direction as the given vector. This is because for two vectors to be orthogonal, their dot product must be equal to zero, which is not possible if they are in the same direction.

Similar threads

  • General Math
Replies
1
Views
700
  • Linear and Abstract Algebra
Replies
9
Views
197
Replies
2
Views
939
Replies
9
Views
1K
  • Linear and Abstract Algebra
Replies
9
Views
571
Replies
3
Views
1K
Replies
4
Views
136
  • General Math
Replies
3
Views
2K
Replies
2
Views
1K
  • Differential Geometry
Replies
0
Views
626
Back
Top