Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4624978
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:12:25+00:00 2026-05-22T03:12:25+00:00

I have rotation matrix which is not orthogonal. Whats wrong. I can’t get it.

  • 0

I have rotation matrix which is not orthogonal. Whats wrong. I can’t get it.
Exterior=[-6.6861,12.6118,-8.0660,[-0.4467,-0.3168,0.2380]*pi/180];%# deg 2 rad
%#data

ax=Exterior(4);
by=Exterior(5);
cz=Exterior(6);
%#Rotation in X

 Rx = [1  0        0
        0  cos(ax)  -sin(ax)
        0  sin(ax)  cos(ax)];


%#Rotation in Y    
Ry = [cos(by)  0  sin(by)
        0        1  0
        -sin(by) 0  cos(by)];


%#Rotation in Z        
Rz = [cos(cz) -sin(cz) 0
        sin(cz) cos(cz)  0
        0       0        1];
R=Rx*Ry*Rz;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
R =

  0.99998   -0.0041538   -0.0055292
0.0041969      0.99996    0.0077962
0.0054966   -0.0078192      0.99995

Orthogonality check

Inv(R)-R'=

 2.2204e-016  2.6021e-018  8.6736e-019
            0  1.1102e-016 -1.7347e-018
 -2.6021e-018  3.4694e-018  2.2204e-016

R*R'=

 2.2204e-016  2.6021e-018  8.6736e-019
            0  1.1102e-016 -1.7347e-018
 -2.6021e-018  3.4694e-018  2.2204e-016

Why there is different signs.???????

Any mistake??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:12:26+00:00Added an answer on May 22, 2026 at 3:12 am

    Looks like the numbers in your orthogonality check are just due to rounding errors… They’re really quite tiny.

    There is an error in the question, pointed out by @ChisA. The OP pasted the same matrix for inv(R)-R' and R*R'

    If we reconstruct the input file:

    Exterior = [-6.681,12.6118,-8.0660,[-0.4467,-03168,0.2380]*pi/180]
    
    ax = Exterior(4)
    by = Exterior(5)
    cz = Exterior(6)
    
    Rx = [1 0 0 ; 0 cos(ax) -sin(ax) ; 0 sin(ax) cos(ax)]
    Ry = [cos(by) 0 sin(by) ; 0 1 0 ;  -sin(by) 0 cos(by)]
    Rz = [cos(cz) -sin(cz) 0 ; sin(cz) cos(cz) 0 ; 0 0 1]
    
    R = Rx*Ry*Rz
    
    inv(R)-R'
    
    R*R'
    

    And run in through Octave (I don’t have MATLAB):

    Exterior =
    
      -6.6810e+00   1.2612e+01  -8.0660e+00  -7.7964e-03  -5.5292e+01   4.1539e-03
    
    ax = -0.0077964
    by = -55.292
    cz =  0.0041539
    Rx =
    
       1.00000   0.00000   0.00000
       0.00000   0.99997   0.00780
       0.00000  -0.00780   0.99997
    
    Ry =
    
       0.30902   0.00000   0.95106
       0.00000   1.00000   0.00000
      -0.95106   0.00000   0.30902
    
    Rz =
    
       0.99999  -0.00415   0.00000
       0.00415   0.99999   0.00000
       0.00000   0.00000   1.00000
    
    R =
    
       0.3090143  -0.0012836   0.9510565
      -0.0032609   0.9999918   0.0024092
      -0.9510518  -0.0038458   0.3090076
    
    ans =
    
      -5.5511e-17   1.3010e-18   1.1102e-16
       2.1684e-19   0.0000e+00  -4.3368e-19
      -1.1102e-16  -4.3368e-19  -5.5511e-17
    
    ans =
    
       1.0000e+00  -1.9651e-19  -4.6621e-18
      -1.9651e-19   1.0000e+00   8.4296e-19
      -4.6621e-18   8.4296e-19   1.0000e+00
    

    Notice the R*R' is very close to I and inv(R)-R' is very close to 0.
    Notice also that I get different small values than the OP. Because I am using a different piece of software the rounding errors will be different. So you should never rely on an exact comparison between two floating point numbers. You always should include some tolerance.

    I hope this makes things a little clearer. See the comment by @gnovice below for links to more detailed information about rounding errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a System.Drawing.Drawing2D.Matrix with rotation and translation transforms which I need to apply
Does anyone have an example of using the ImageSnapshot.captureBitmapData function with a rotation matrix?
I have been provided with a rotation matrix to use: and have entered the
I have a custom UIViewController in a UITabbarController and want to respond to rotation
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have an object which I want to rotate via keys. The object should
I am working on a Flash Project in which i have to rotate a
How do I retrieve the rotation matrix, the translation vector and maybe some scaling
To get a better idea of how matrix transformations work cause I'm having a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.