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$$
There are already a number of questions asking about this, none of them with a general, definitive answer:
- Decomposing an Affine transformation (non-general answer, only specific chain of operations)
- extracting rotation, scale values from 2d transformation matrix (non-definitive answer, see discussion)
- Given this transformation matrix, how do I decompose it into translation, rotation and scale matrices? (does not explain how to pad the problem to 4 dimensions, incorrect in the presence of shear, see discussion)
- Why can any affine transformaton be constructed from a sequence of rotations, translations, and scalings? (accepted answer omits the explanation about singular value decomposition, second answer mentions "trivial" details that have to be polished but does not address them)
In particular, I observed, but could not prove, that
- The singular values of an affine transformation matrix are the absolute values of the scaling parameters.
- 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).
- Nonetheless, the multiplication of these two improper rotations yielded the original rotation. Perhaps because the transformation is conformal?
In Python code:
In : rot Out: array([[ 0.8660254, -0.5 ], [ 0.5 , 0.8660254]]) In : sc Out: array([[ 2., 0.], [ 0., 2.]]) In : svd(rot @ sc) Out: (array([[-0.8660254, -0.5 ], [-0.5 , 0.8660254]]), array([ 2., 2.]), array([[-1., -0.], [ 0., 1.]])) In : det(_68) Out: -1.0000000000000002 In : _68 @ _68 Out: 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)?