<p>Suppose I want to perform translate in the following order:</p>

<ol>
<li>Scale by $S$</li>
<li>Rotate by matrix $R_1$</li>
<li>Rotate by matrix $R_2$</li>
<li>Translate by $T%$.</li>
</ol>

<p>When I apply the matrix, should the overall transformation matrix be:</p>

<p>$M = T \times R_1^{-1} \times R_2^{-1} \times S$</p>

<p>or </p>

<p>$M = T \times R_2^{-1} \times R_1^{-1} \times S$
?</p>

<p>I always thought the transformations should be applied in reverse, so it should be the second case. But I'm told that it's the first case instead. Is there a special need to reverse the order of rotation apart from taking the inverse too?</p>

<p>By the way, why must I take the inverse matrix for rotation?</p>

CC BY-SA 3.0
2018-01-14T04:30:04.793Z
Matrices can be row or column major which flips the order that you would apply them in. There's no need to inverse any rotations to accomplish a rotation.
Andrew Wilson
<raytracing><model>
Is this the correct application of model transformation?
oldselflearner1959
# Is this the correct application of model transformation?

(Asked by: username_0 on 2018-01-13)

Suppose I want to perform translate in the following order:

1. Scale by $S$
2. Rotate by matrix $R\_1$
3. Rotate by matrix $R\_2$
4. Translate by $T%$.

When I apply the matrix, should the overall transformation matrix be:

$M = T \times R\_1^{-1} \times R\_2^{-1} \times S$

or

$M = T \times R\_2^{-1} \times R\_1^{-1} \times S$
?

I always thought the transformations should be applied in reverse, so it should be the second case. But I'm told that it's the first case instead. Is there a special need to reverse the order of rotation apart from taking the inverse too?

By the way, why must I take the inverse matrix for rotation?

**Tags:** raytracing, model
> **Comments:**
> **username_1**: Matrices can be row or column major which flips the order that you would apply them in. There's no need to inverse any rotations to accomplish a rotation.  

---

## 0 answers

