How Do You Rotate One Vector to Another and Apply the Same Rotation to a Matrix?

Click For Summary
SUMMARY

This discussion focuses on the mathematical process of rotating one unit vector into another and applying the same rotation to a 3x3 matrix. The user outlines a method involving rotations about the z-axis, cross products, and Rodriguez's rotation formula. The key steps include calculating the angle of rotation using arctan, determining the new axis of rotation through the cross product, and applying the geometric product to achieve the desired transformation. The discussion confirms that a single rotation in the plane containing the two vectors suffices for the transformation.

PREREQUISITES
  • Understanding of vector mathematics and unit vectors
  • Familiarity with rotation matrices and transformations
  • Knowledge of Rodriguez's rotation formula
  • Basic concepts of geometric algebra and bivectors
NEXT STEPS
  • Study the application of Rodriguez's rotation formula in 3D transformations
  • Learn about the geometric product and its implications in vector rotations
  • Explore the cross product and its role in determining rotation axes
  • Investigate the mathematical properties of bivectors and their applications in physics
USEFUL FOR

Mathematicians, computer graphics developers, and engineers involved in 3D modeling and simulations who require a deep understanding of vector rotations and transformations.

Val di Vera
Messages
1
Reaction score
0
I want to find the rotations needed to rotate one unit vector into another unit vector and then use these rotations to rotate a 3x3 matrix.

For example: I want to determine the rotations needed to rotate [1 0 0] into [-0.342, -0.938, 0.0566] and apply the same rotation to the matrix M =

(1 0 0)
(0 2 0)
(0 0 3)

The way I've thought of doing this is to:

1. Rotate [1 0 0] about the z-axis by the angle arctan( \frac{0.938}{0.342} ) to get [-0.3425 -0.9395 0]. Apply the same rotation to M.
2. Take the cross product between [-0.3425 -0.9395 0] and [-0.342 -0.938 0.0566] to get a new axis of rotation \hat{r}.
3. The new angle of rotation should be \hat{\theta} = arctan(\frac{0.0566}{\sqrt{0.3425^{2} + 0.9395^{2}}}).
4. Apply Rodriguez's rotation formula by \hat{\theta} about \hat{r} to M

I hope it's clear what I'm trying to do. If anyone can confirm that I'm doing this correctly, or come up with a better way of doing this, I'd very much appreciate it.

Thanks!
 
Physics news on Phys.org
Hello and welcome to PF!
To rotate one vector into another one, you
need only a single rotation in the plane containing the two vectors.
Here is a general method of finding such a single rotation.

The angle of rotation is a
bivector whose direction specifies the plane of rotation and whose
magnitude specifies how much to rotate.

Let a and b be two unit vectors in 3D space.
Since any unit vector multiplied by itself is just equal to the
square of its magnitude, a^2=b^2=1 , so it follows that
<br /> a = ab^2 = (ab) b = (a \cdot b + a \wedge b) b.<br />
i.e. the geometric product ab rotates the vector b
into the vector a . The product may be written in terms of the
angle of rotation, the bivector \mathbf A .
Write {\mathbf A} = \mid {\mathbf A} \mid \widehat{\mathbf A} , where
\mid {\mathbf A}\mid is the magnitude of the
rotation angle and \widehat{\mathbf A} is the unit
bivector specifying the plane of rotation. Using the fact that
\widehat{\mathbf A}^2 = -1 , the product can be expressed as
<br /> ab = e^{\mathbf A}= \cos{\mathbf A} + \sin{\mathbf A}.<br />
<br /> ab = \cos{\theta} + \widehat{\mathbf A } \sin{\theta}.<br />
It only remains to identify the scalar and bivector parts of this with
a\cdot b and a\wedge b (which you know) in order
to get the sine and cosine of the rotation angle and the plane of
rotation.

Any vector in the rotation plane, \widehat{\mathbf A},
may therefore be rotated through the angle \theta by
pre-multiplying it with the geometric product ab . Any
vector perpendicular to this plane remains unaltered by this
multiplication; hence, to rotate some arbitrary vector x in the same
way that you rotated the vector b , you must first find
its components parallel and perpendicular to the plane of rotation:
x = x_\parallel + x_\perp<br />
The rotated vector is then
x&#039; = x_\perp + ab x_\parallel .
You can get the two components from
x_\parallel = (x\cdot \widehat{\mathbf A})\widehat{\mathbf A}^{-1}<br />
x_\perp = (x\wedge \widehat{\mathbf A})\widehat{\mathbf A}^{-1}<br /> .

There is an alternative way to rotate an arbitrary vector. Let
<br /> R = \cos{\theta/2} + \widehat{\mathbf A} \sin{\theta/2}<br />
<br /> R^\dagger = \cos{\theta/2} - \widehat{\mathbf A } \sin{\theta/2}<br />
The rotated vector is then
x&#039; = R^\dagger x R<br /> .

That's it, but it may be useful to spell this out somewhat. Let
{e_1,e_2,e_3} be a set of orthonormal vectors spanning the
space. These have the properties e_i^2=1
and e_i e_j = -e_j e_i . The unit vectors defining the rotation
are then
<br /> a = a_1e_1 + a_2e_2 + a_3e_3<br />
<br /> b = b_1e_1 + b_2e_2 + b_3e_3<br />
The dot product and wedge products are
<br /> a\cdot b = a_1b_1 + a_2b_2 + a_3b_3 = \cos{\theta}<br />
<br /> a\wedge b = {\mathbf A} = A_3 e_1e_2 + A_1 e_2e_3 + A_2 e_3e_1<br />
where A_3=a_1b_2 - a_2b_1 , with similar expressions for
A_1 and A_2 . The magnitude of the bivector
\mathbf A is
\mid {\mathbf A} \mid = \sqrt{A_1^2+A_2^2 + A_3^2}=\sin{\theta}
and the unit plane of rotation is
<br /> \widehat{\mathbf A}= {\mathbf A} / \sin{\theta}.<br />
This should be enough to get you started.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
684
Replies
31
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K