
A.3 Matrix Decompositions 855
Clearly the translation vector is an easy term to select! However, the scaling and
rotation are problematic. Consider just the product of two such homogeneous trans-
formations
RS
t
0
T
1
=
R
2
S
2
t
2
0
T
1
R
1
S
1
t
1
0
T
1
=
R
2
S
2
R
1
S
1
R
2
S
2
t
1
+
t
2
0
T
1
The total translation is
t = R
2
S
2
t
1
+
t
2
. The total scale-rotation component is
R
2
S
2
R
1
S
1
. In the special case that both S
1
and S
2
represent uniform scales, that is,
S
i
= σ
i
I for i = 1, 2 and where I is the identity matrix, we can determine R and S
uniquely by
R
2
S
2
R
1
S
1
= R
2
σ
2
IR
1
σ
1
I =R
2
σ
2
R
1
σ
1
= R
2
R
1
(σ
2
σ
1
)
The ability to commute σ
2
and R
1
is just a property of scalar multiplication of a
matrix. The final selection is S =σ
2
σ
1
I, another uniform scaling, and R = R
2
R
1
,aro-
tation since it is the product of two rotations. In this special case of two homogeneous
terms, if S
2
is a uniform scale matrix, then S =S
2
σ
1
and R =R
2
R
1
. But the complica-
tion is when S
2
is nonuniform. Generally, if D
1
is a diagonal matrix for which at least
two diagonal entries are different, and if R
1
is a rotation matrix, it is not possible to
find a diagonal matrix D
2
for which R
1
D
1
= D
2
R
2
with R
2
a rotation matrix. Gener-
ally, if the transformation system of a graphics engine allows nonuniform scaling, the
complication arises.
The intuitive problem is that the nonuniform scales are applied along specific
axes, so the orientation of those axes is an important issue. In 2D consider transform-
ing the circle x
2
+y
2
=1 by rotations and nonuniform scaling. Figure A.1 illustrates
the problem. Observe that if we allow scaling along a different set of coordinate axes,
in this case the axes (1, 1)/
√
2 and (−1, 1)/
√
2, we can force the circle in the bottom
sequence to stretch to the final ellipse in the top sequence. The scale 2 must be applied
along the direction (1, 1)/
√
2.
This motivates what is called the polar decomposition. A nonuniform scale in
a particular coordinate system is obtained by rotating that system to the standard
coordinate system, applying the scaling in the standard system, then rotating back to
the original system. If R represents the rotation from the specified coordinate system
to the standard coordinate system and if D is the diagonal nonuniform scaling matrix
in the standard coordinate system, then the scaling in the specified coordinate system
is S = R
T
DR. This just states mathematically what we said in words. The matrix S is
necessarily symmetric.
Given a matrix A, the polar decomposition is A =QS,whereQ is an orthogonal
matrix and S is a symmetric matrix. In the application mentioned previously, the
matrix of interest is A =R
2
S
2
R
1
S
1
. It is generally not possible to factor A =RS,where
R is a rotation and S is diagonal. The polar decomposition is always possible. The