Normalize transformation matrix with inverse scale

matricestransformation

I am attempting to export a transformation matrix from the API of a design program. The matrix looks fine and it is workable apart from 1 issue where the scaling factor is inverse. This means when you scale down a shape it results in a scaling factor > 1 and vice versa.

For example, following matrix
\begin{bmatrix}2&0\\0&2\end{bmatrix}
Results in the shape being twice as small.

Now I am trying to use this matrix and apply it somewhere else, but because of the inverse scale I am unable to use it. Is there any way to normalize the scaling factor of a affine transformation matrix?

One last thing to note is the fact that the rotation applied, according to documentation is also reversed from standard formulas. Their rotation matrix would look something like this:
\begin{bmatrix}cos&sin\\-sin&cos\end{bmatrix}

Best Answer

Usually, we use a matrix to transform a shape from one coordinates to another coordinates. However, here we are asked to provide a backwards transformation which means that we have to provide the inverted matrix. So the sollution is just that you take the matrix which you would use if the scaling wasn't inverted and you invert the matrix.

When the matrix is diagonal (your first example), the inverse matrix is also diagonal, only the elements on the diagonal are inverted.

When the matrix is unitary (your second example), it holds that $A^{-1}=A^T$. All rotation matrices are unitary and in the case of 2D rotation matrices, it's clear that the inverse has to be the backwards rotation.