Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A book on CG says:

... we can construct any affine transformation from a sequence of rotations, translations, and scalings.

But I don't know how to prove it.

Even in a particular case, I found it still hard. For example, how to construct a shear transformation from a sequence of rotations, translations, and scalings?

Can you please help? Thank you.


Axis scalings may use different scaling factors for the axes.

Is there a matrix representation or proof for this?

For example, to show that a two-dimensional rotation can be decomposed into three shear transformation, we can write $$ \begin{pmatrix} \cos\alpha & \sin\alpha\\ -\sin\alpha & \cos\alpha \end{pmatrix} = \begin{pmatrix} 1 & \tan\frac{\alpha}{2}\\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0\\ -\sin\alpha & 1 \end{pmatrix} \begin{pmatrix} 1 & \tan\frac{\alpha}{2}\\ 0 & 1 \end{pmatrix} $$

share|cite|improve this question
This is not true. Rotations, translations and scalings are all conformal transformations (they preserve angles) and a shear is not. Sequences of rotations, translations and scalings will only allow you to construct any orientation-preserving similitude transformation. – Vhailor May 27 '11 at 14:24
Could it be that by "scalings", the book means axis scalings that may use different scaling factors for the axes? – joriki May 27 '11 at 14:32
Indeed, if you Google your quote, you find this page:, which makes the same claim verbatim; further up on the page, they define "scaling" and say "We shall need nonuniform scaling to build up the full set of affine transformations that we shall use in modeling and viewing. Scaling transformations have a fixed point. Hence, to specify a scaling, we can specify the fixed point, a direction in which we wish to scale, and a scale factor." So these are scalings in a certain direction, e.g. along one of the axes. – joriki May 27 '11 at 14:35
Does that answer your question, or would you like to see how affine transformations are constructed from rotations, translations and such non-uniform scalings? – joriki May 27 '11 at 14:36
For example, given a square centered on the origin whose sides are horizontal and vertical, notice that the three transformations "rotate 45 degrees counter-clockwise around the origin", "stretch along the x-axis" and "rotate clockwise until two sides of the new shape are parallel to the x-axis" is equivalent to a horizontal shear. – Chris Taylor May 27 '11 at 14:45
up vote 2 down vote accepted

You can write any affine transformation

$$ \vec{x}'=A\vec{x}+\vec{t}\;, $$

where $A$ is any non-singular matrix, as follows:

$$ \left( \begin{array}{c} \vec{x}'\\ 1 \end{array} \right) = \left( \begin{array}{cc} A&\vec{t}\\ 0&1 \end{array} \right) \left( \begin{array}{c} \vec{x}\\ 1 \end{array} \right) \;. $$

This allows you to compose affine transformations by composing the corresponding matrices. In this approach, rotations, translations and axis scalings can respectively be written like this:

$$ \left( \begin{array}{cc} \Omega&0\\ 0&1 \end{array} \right) \;, $$

$$ \left( \begin{array}{cc} I&\vec{t}\\ 0&1 \end{array} \right) \;, $$

$$ \left( \begin{array}{cc} S&0\\ 0&1 \end{array} \right) \;, $$

where $\Omega$ is a rotation matrix, $I$ is the identity matrix and $S$ is a diagonal matrix with the scaling factors on the diagonal.

Given any affine transformation specified by $A$ and $\vec{t}$, you can split it into a translation and a linear part:

$$ \left( \begin{array}{cc} A&\vec{t}\\ 0&1 \end{array} \right) = \left( \begin{array}{cc} I&\vec{t}\\ 0&1 \end{array} \right) \left( \begin{array}{cc} A&0\\ 0&1 \end{array} \right) \;. $$

So now we just need to be able to write any non-singular matrix as a product of rotations and axis scalings. This is possible due to the singular value decomposition.

share|cite|improve this answer
Thank you very much! I've got it. – Roun May 27 '11 at 15:39

Perhaps using the singular value decomposition?

For the homogeneus case (linear transformation), we can always write

$y = A x = U D V^t x$

for any square matrix $A$ with positive determinant, were U and V are orthogonal and D is diagonal with positive real entries. U and V would the be the rotations and D the scaling.

Some (trivial?) details to polish: what if A has negative determinant, what is U and V are not pure rotations but also involve axis reflections.

It only remains add the indepent term to get the affine transformation ($y = Ax +b$) and that would be the translation.

share|cite|improve this answer
Thank you all the same. You've told me some detailed points. – Roun May 27 '11 at 15:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.