Decompose a 2D arbitrary transform into only scaling and rotation
Solution 1:
Jim Blinn gives a direct computation of the singular value decomposition for the $2\times 2$ case in his article "Consider the lowly $2\times 2$ matrix", which I summarize below:
We want the decomposition $$\begin{bmatrix}A&B\\C&D\end{bmatrix}=\begin{bmatrix}\cos\beta&\sin\beta\\-\sin\beta&\cos\beta\end{bmatrix}\begin{bmatrix}w_1&0\\0&w_2\end{bmatrix}\begin{bmatrix}\cos\gamma&\sin\gamma\\-\sin\gamma&\cos\gamma\end{bmatrix}.$$ Define $E$, $F$, $G$, and $H$ so that $$\begin{bmatrix}A&B\\C&D\end{bmatrix}=\begin{bmatrix}E&H\\-H&E\end{bmatrix}+\begin{bmatrix}F&G\\G&-F\end{bmatrix}.$$ Then $$\begin{align} \frac{w_1+w_2}2&=\sqrt{E^2+H^2},\\ \frac{w_1-w_2}2&=\sqrt{F^2+G^2},\\ \gamma-\beta&=\tan^{-1}(G/F), \\ \gamma+\beta&=\tan^{-1}(H/E). \\ \end{align}$$
As Blinn says, "You can take it from here."