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 3977446
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:55:28+00:00 2026-05-20T04:55:28+00:00

I know a matrix [x scale, y skew, x skew, y scale, trans x,

  • 0

I know a matrix [x scale, y skew, x skew, y scale, trans x, trans y], and would like to get the angle in degrees.

thanks!

  • 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-20T04:55:29+00:00Added an answer on May 20, 2026 at 4:55 am

    Consider the following matrix

    | x_sc  y_sk  0  |
    | x_sk  y_sc  0  |
    | x_tr  y_tr  1  |
    

    with sk indicating skew, sc indicating scale and tr indicating translation.

    This only represents a pure rotation if all three are true

    y_sk == -x_sk
    y_sc == x_sc
    x_sc * y_sc - x_sk * y_sk == 1
    

    In this case, if theta is the angle of rotation, then

    theta == arcos(x_sc)
    

    This will give you the answer in radians (most likely), so you’ll need to convert to degrees.

    Assuming you have an object called M, representing the matrix, the properties that match my definitions above, you could do:

    function toPureRotation(var M) {
        if( (M.y_sk != (-1 * M.x_sk)) ||
            (M.y_sc != M.x_sc) ||
            ((M.x_sc * M.y_sc - M.x_sk * M.y_sk) != 1)
        ) {
            return Number.NaN;
        }
        else {
            return Math.acos(M.x_sc); // For radians
            return Math.acos(M.x_sc) * 180 / Math.PI; // For degrees
        }
    }
    

    EDIT

    For a pure rotation followed by (or preceded by) a scaling transform that maintains aspect ratio:

    | sc   0  0 |
    |  0  sc  0 |
    |  0   0  1 |
    

    Then you can us the following identity:

    x_sc * y_sc - x_sk * y_sk == sc^2
    

    This gives us

    function toRotation(var M) {
        if( (M.y_sk != (-1 * M.x_sk)) ||
            (M.y_sc != M.x_sc)
          )
        ) {
            return Number.NaN;
        }
        else {
            var scale_factor = Math.sqrt((M.x_sc * M.y_sc - M.x_sk * M.y_sk));
            return Math.acos(M.x_sc/scale_factor); // For radians
            return Math.acos(M.x_sc/scale_factor) * 180 / Math.PI; // For degrees
        }
    }
    

    If you want to factor in translations, you’re entering a world of hurt.

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

Sidebar

Related Questions

I would like to know how to plot a correlation matrix similar to the
I know the logic two get into a symmetric matrix the values of an
I'd like to know what practical way of constructing reports for EPSON Dot Matrix
I am interested to know what a proper x (vector matrix or data frame)
So let's say I have a matrix, mdat and I only know the index
I have an object which has a position, a rotation angle and a scale
I know a 3x3 matrix M, and I want to find a 1x3 matrix
I know how to implement least-squares with elementary matrix decomposition and other operations, but
I wrote this matrix addition program and I dont know why but I keep
Does anyone know of any standard algorithms to determine an affine transformation matrix based

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.