Decomposition of a linear map into scale/rotation/shear matrices

1.4k Views Asked by At

When I have a linear map

$$ A = \pmatrix{a & b \\ c &d} $$

It obviously has 4 degrees of freedom. I would now like to decompose it into scale, rotation and sheer components:

$$ A = BCD = \pmatrix{s_1 & 0 \\ 0 & s_2}\pmatrix{\cos \alpha & -\sin \alpha \\ \sin \alpha & \cos \alpha} \pmatrix{1 & s_3 \\ s_4 & 1} $$

Or a similar decomposition. My problem here is, that I know have 5 degrees of freedom, so at least one variable must be a function of the others.

I suspect that there $BC$ isn't uniquely defined this way and shear can be expressed in one dimension combined with the correct rotation, but I do not know what's the actual decomposition I am looking for.

Some resources on shear maps suggest that your define horizontal $s_4=0$ or vertical ($s_3=0$) shear maps, so it is area preserving. But my map $A$ is a general transformation between two arbitrary (non-degenerate) triangles, so there are no such constraints and most transformations will need a non-area-preserving term.

2

There are 2 best solutions below

2
On

A transformation which is a combination of scaling, rotation, shear, and translation is affine and conserves the parallelism. Your case is a special case where the translation is null. You can eliminate one parameter by applying the conservation of parallelism.

0
On

I think the Polar Decomposition is what I was looking for.

$A=UP$ is a decomposition in a unitary matrix $U$ and a positive semi-definite hermitian matrix $P$, in which $U$ describes rotation or reflection and $P$ scaling and shearing.

It can be calculated using the SVD $W\Sigma V^*$ by

$$ U = V \Sigma V^* \\ P = W V^* $$

I think if necessary, one can then further decompose $U$ into a scale and a shear matrix by finding the scale matrix $S$ such that all diagonal entries of the shear matrix $S^{-1}U$ are $1$.

The number of degrees of freedom can be explained by the properties of the matrices, e.g. the rotation matrix has the constraint of being unitary and having $\alpha\in[0;2\pi)$ (with other values being equivalent to values in this range), which limits its degree of freedom.