# Relation between SVD and affine transformations (2D)

I am trying to decompose affine transformations in elementary operations (rotation, scaling, shear), leaving translation aside for the moment, and in particular, to understand the relation of affine transformations with the singular value decomposition (SVD). I am focusing on the two dimensional case.

$$M = U \Sigma V^t$$

In particular, I observed, but could not prove, that

1. The singular values of an affine transformation matrix are the absolute values of the scaling parameters.
2. The SVD of a transformation consisting in a uniform scaling and a proper rotation didn't reconstruct the original matrices, but introduced two improper rotations (i.e., determinant = -1).
3. Nonetheless, the multiplication of these two improper rotations yielded the original rotation. Perhaps because the transformation is conformal?

In Python code:

In [66]: rot
Out[66]:
array([[ 0.8660254, -0.5      ],
[ 0.5      ,  0.8660254]])

In [67]: sc
Out[67]:
array([[ 2.,  0.],
[ 0.,  2.]])

In [68]: svd(rot @ sc)
Out[68]:
(array([[-0.8660254, -0.5      ],
[-0.5      ,  0.8660254]]), array([ 2.,  2.]), array([[-1., -0.],
[ 0.,  1.]]))

In [69]: det(_68[0])
Out[69]: -1.0000000000000002

In [70]: _68[0] @ _68[2]
Out[70]:
array([[ 0.8660254, -0.5      ],
[ 0.5      ,  0.8660254]])


Under which assumptions can we perform this decomposition or does it make sense? Is there any proof that the singular values are the sorted absolute scaling factors? Is there a decomposition that is robust against reflection (i.e. improper transformations)?

What do you mean by "improper rotations"? An orthogonal transformation with a reflection (i.e. determinant -1)? This would appear to be a non-uniqueness problem and could be fixed by flipping the sign of an arbitrary (but same index) column of $U$ and $V$, which would still be a valid SVD.
• @astrojuanlu: Ok, then just multiply the first (say) column of U and V by -1 each. Since $\det \Sigma>0$ by definition, and provided that $\det M>0$, $\det U$ and $\det V$ will always either be both +1 or -1, so you can "fix" your SVD such that U and V are proper rotations. Diagonal elements of $\Sigma$ are obviously scaling factors, with one rotation applied before and one after the scaling. – Stefan Böttner Jun 22 '17 at 9:48