How to compute the rotation matrix

In summary, the conversation discusses the concept of computing a rotation matrix from two given matrices, X and X0, with dimensions of 4x3. The question is how to find a rotation matrix, R, such that B=RA, where B is the result of rotating A using R. The solution involves using Gram-Schmidt orthogonalization or Hilbert-Schmidt orthogonalization, depending on the exact problem statement and the meaning of rotation in 4-dimensional space.
  • #1
Renoald
3
0
Hai , I have two matrix , let say X=[ A1 A2 A3
A4 A5 A5
A7 A8 A9
A10 A11 A12]
and X0=[B1 B2 B3
B4 B5 B6
B7 B8 B9
B10 B11 B12]

Can anyone show me how to compute the rotation matrix from X and X0 ?
Thank You
 
Physics news on Phys.org
  • #2
Hey Renoald and welcome to the forums.

One problem that you have is that a rotation matrix preserves the dimension and is a basis which means that the matrix has to be square (even if some values don't contribute in the form of zero entries).

I think it would be helpful if you gave the exact dimensions of your matrices for X and X0. If these are vectors in a Euclidean space, then this is a very well understood problem, but if they are matrices then we will need a more general result.

So let's say X is a matrix with 3 rows and 2 columns, X will be a 3x2 matrix.
 
  • #3
Hai , Thank You for reply!
The dimension of X and X0 is 4 x 3 ( Matrix form) and This is not a square matrix.
Let Say X=RX0 , then the rotation matrix is R . How to compute the R ?
Thank You ...
 
  • #4
I am afraid you are going to have to explain what you mean by "rotating" one matrix to another.
 
  • #5
Hi Renoald.

In [itex]\mathbb R^n[/itex] the term "rotation" usually means an orthogonal matrix with the determinant 1 (the determinant of an orthogonal matrix is always 1 or -1).

So, as far as I understand your question is: given two [itex]4\times 3[/itex] matrices A and B find a rotation (an orthogonal matrix with determinant 1) R such that B=RA. And your matrices have real entries. Am I correct here?

Note that such R does not always exists: for 2 real matrices A and B one can find an orthogonal matrix R such that B=RA if and only if [itex]A^T A =B^T B[/itex], where [itex]A^T[/itex] is the transpose of A. So I assume your matrices satisfy this condition; if not, you are lucky, because such R does not exists, and you do not have to do anything :)

Probably the easiest way to find R is to apply Gram-Schmidt orthogonalization to the columns of one of the matrices (say A). If you know what it is, I can tell you what to do; if not, you have to learn it first.
 
  • #6
Hai , thank you for the reply.
example i give here is what called as coordinate transformation.
I not sure Gram-Schmidt orthogonalization can used to resolve this problem or not !
as what i search by google , the solution given is Helmert transformation.
Any one have idea about this ?
 
  • #7
Renoald,
if you want to get help, then STATE the problem first.

Am I correct, that translated to the mathematical language you problem can be stated like that:
given two 4×3 matrices A and B (with real entries) find a rotation (an orthogonal matrix with determinant 1) R such that B=RA?

If that is the statement, then the problem CAN be solved using Hilbert-Schmidt orthogonalization.

If that is not the statement, you should STATE the problem first: in particular, what do you mean by rotation in 4-dimensional space?
 

FAQ: How to compute the rotation matrix

1. What is a rotation matrix?

A rotation matrix is a mathematical tool used to represent a rotation in a three-dimensional space. It is a square matrix that is used to transform a point or vector from one coordinate system to another.

2. How do you compute a rotation matrix?

To compute a rotation matrix, you need to know the angle of rotation and the axis of rotation. The basic formula for computing a rotation matrix is R = I + sin(θ)K + (1 - cos(θ))K2, where R is the rotation matrix, I is the identity matrix, θ is the angle of rotation, and K is the skew-symmetric matrix formed from the axis of rotation.

3. What is the order of operations for computing a rotation matrix?

The order of operations for computing a rotation matrix is important. It is usually done in three steps: translation, rotation, and then scaling. This order ensures that the rotation is done around the correct axis and in the correct direction.

4. How do you use a rotation matrix in computer graphics?

In computer graphics, rotation matrices are used to transform points or objects in three-dimensional space. They are used to rotate objects around a specified axis and angle. This is important for creating realistic 3D animations and simulations.

5. Can a rotation matrix be used for any angle of rotation?

Yes, a rotation matrix can be used for any angle of rotation. However, it is important to note that some angles may result in a loss of precision or rounding errors. In these cases, it may be necessary to use other methods, such as quaternions, to represent the rotation.

Similar threads

Back
Top