Why is matrix scaling not commutative in homogeneous coordinates?

221 Views Asked by At

I have a 4x4 matrix $A$ that describes a rotation and translation in 3D. I have a 4x1 vector $x$ whose last component is 1.

Let $S$ be a scaling matrix with the last diagonal entry $1$. I tested experimentally $SAx$ and $ASx$ and I am not getting the same outcome, I thought scaling operations were commutative.

As an additional question. What matrix $B$ would satisfy $SAx = BSx$?

1

There are 1 best solutions below

0
On

A sequence of scalings is commutative, and so is a sequence of translations. But a mixed sequence of transformations is generally not commutative.

Consider: point $p$ is at the origin, $(0, 0, 0, 1)$. Scale by $10$ then translate by $1$ in the $X$ direction. The scaling does nothing, so the point is now at $(1, 0, 0, 1)$. But if we translate then scale the point ends up at $(10, 0, 0, 1)$.

If $SAx = BSx$ for all vectors $x$, then $B = SAS^{-1}$.