Rotating vectors and matrices

In summary, to rotate one unit vector into another, a single rotation in the plane containing the two vectors is needed. This can be achieved by using the geometric product of the two vectors, with the resulting angle of rotation and plane of rotation determined by identifying the scalar and bivector parts of the product. An alternative method is to use the unit vectors defining the rotation to find the dot and wedge products, which can then be used to calculate the magnitude and unit plane of rotation.
  • #1
Val di Vera
1
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 [tex]M[/tex] =

(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( [tex]\frac{0.938}{0.342}[/tex] ) to get [-0.3425 -0.9395 0]. Apply the same rotation to [tex]M[/tex].
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 [tex]\hat{r}[/tex].
3. The new angle of rotation should be [tex]\hat{\theta}[/tex] = arctan([tex]\frac{0.0566}{\sqrt{0.3425^{2} + 0.9395^{2}}}[/tex]).
4. Apply Rodriguez's rotation formula by [tex]\hat{\theta}[/tex] about [tex]\hat{r}[/tex] to [tex]M[/tex]

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
  • #2
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 [tex] a [/tex] and [tex] b [/tex] be two unit vectors in 3D space.
Since any unit vector multiplied by itself is just equal to the
square of its magnitude, [tex] a^2=b^2=1 [/tex] , so it follows that
[tex]
a = ab^2 = (ab) b = (a \cdot b + a \wedge b) b.
[/tex]
i.e. the geometric product [tex] ab [/tex] rotates the vector [tex] b [/tex]
into the vector [tex] a [/tex] . The product may be written in terms of the
angle of rotation, the bivector [tex] \mathbf A [/tex] .
Write [tex] {\mathbf A} = \mid {\mathbf A} \mid \widehat{\mathbf A} [/tex] , where
[tex] \mid {\mathbf A}\mid [/tex] is the magnitude of the
rotation angle and [tex] \widehat{\mathbf A} [/tex] is the unit
bivector specifying the plane of rotation. Using the fact that
[tex] \widehat{\mathbf A}^2 = -1 [/tex] , the product can be expressed as
[tex]
ab = e^{\mathbf A}= \cos{\mathbf A} + \sin{\mathbf A}.
[/tex]
[tex]
ab = \cos{\theta} + \widehat{\mathbf A } \sin{\theta}.
[/tex]
It only remains to identify the scalar and bivector parts of this with
[tex] a\cdot b [/tex] and [tex] a\wedge b [/tex] (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, [tex] \widehat{\mathbf A} [/tex],
may therefore be rotated through the angle [tex] \theta [/tex] by
pre-multiplying it with the geometric product [tex] ab [/tex] . Any
vector perpendicular to this plane remains unaltered by this
multiplication; hence, to rotate some arbitrary vector [tex] x [/tex] in the same
way that you rotated the vector [tex] b [/tex] , you must first find
its components parallel and perpendicular to the plane of rotation:
[tex] x = x_\parallel + x_\perp
[/tex]
The rotated vector is then
[tex] x' = x_\perp + ab x_\parallel [/tex] .
You can get the two components from
[tex] x_\parallel = (x\cdot \widehat{\mathbf A})\widehat{\mathbf A}^{-1}
[/tex]
[tex] x_\perp = (x\wedge \widehat{\mathbf A})\widehat{\mathbf A}^{-1}
[/tex] .

There is an alternative way to rotate an arbitrary vector. Let
[tex]
R = \cos{\theta/2} + \widehat{\mathbf A} \sin{\theta/2}
[/tex]
[tex]
R^\dagger = \cos{\theta/2} - \widehat{\mathbf A } \sin{\theta/2}
[/tex]
The rotated vector is then
[tex] x' = R^\dagger x R
[/tex] .

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

Related to Rotating vectors and matrices

1. What is a rotating vector?

A rotating vector is a mathematical concept that describes the movement of a vector in a three-dimensional space. It involves rotating the vector around an axis, which can be represented by a unit vector, and measuring the angle of rotation.

2. How is a rotating vector represented?

A rotating vector can be represented using a 3x3 rotation matrix. This matrix contains the cosine and sine values of the rotation angle, as well as the cross-product of the unit vector and the vector being rotated.

3. What is the difference between a rotating vector and a rotating matrix?

A rotating vector represents the actual movement of a vector, while a rotating matrix represents the mathematical operation used to rotate the vector. The matrix can be used to rotate multiple vectors, while the vector itself can only be rotated around one axis.

4. Can a matrix rotate in more than one direction?

Yes, a matrix can rotate in multiple directions simultaneously. This is because a matrix can represent multiple rotations by multiplying different rotation matrices together.

5. How is the direction of rotation determined in a matrix?

In a rotation matrix, the direction of rotation is determined by the right-hand rule. If you curl your fingers in the direction of the rotation, your thumb will point in the direction of the resulting rotated vector.

Similar threads

  • Linear and Abstract Algebra
Replies
6
Views
659
  • Linear and Abstract Algebra
Replies
16
Views
1K
Replies
31
Views
2K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
861
  • Linear and Abstract Algebra
Replies
2
Views
739
  • Linear and Abstract Algebra
Replies
3
Views
1K
  • Linear and Abstract Algebra
Replies
4
Views
1K
Back
Top