If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

4. Commutativity

We need to be careful with the order of scaling and translation. But why? First, we move an object 5 steps to the right and 3 steps up. Then, we make the object twice as big. But, if we first make the object big and then move it, we end up in a different place! This means the order of doing things matters. When the order doesn't matter, we call it "commutative". When the order does matter, we call it "non-commutative"..

Want to join the conversation?

Video transcript

(springing noises) - We're a good way towards building a shot that matches the sketch we got from the story department. But before we continue, let's pause for a moment to explore an interesting issue that comes up when combining operations. In the last exercise, you used the two operations of scaling and translation to position some objects. For example, suppose I start by translating this object by five in X and three in Y, and then scale by a factor of two. But what if I change the order and do scaling before translation? In this case, I'll scale by a factor of two, and then translate by five in X and three in Y. Huh. I get a different result. ^ That means the order of operations matters ^ when we combine scaling and translation. Let's try applying two different translations. The first by, say, hmm, five in X and three in Y. And the second by, say, two in X and four in Y. And if I do these in the opposite order, I get the same result. ^ So apparently, order doesn't matter ^ when combining two translations. When order doesn't matter, mathematicians say that the operations are commutative. (magical chiming) When order does matter, mathematicians say the operations are (magical chiming) non-commutative. Translations commute with each other because addition is commutative. ^ But scaling and translation don't commute. ^ We'll study commutativity in more detail a little later. In the meantime, use the next exercise to get some practice with this concept.