How do you comprehensively decompose a 2x2 matrix into a scaling and a rotation matrix?
I understand that a rotation matrix looks like: $$ \begin{pmatrix} \cos \theta & -\sin\theta \\ \sin\theta & \cos \theta\\ \end{pmatrix} $$ and a scaling matrix looks like: $$ \begin{pmatrix} \alpha & 0 \\ 0 & \alpha\\ \end{pmatrix} $$
The matrix I want to decompose is $$ \begin{pmatrix} 2 & -2 \\ 2 & 2\\ \end{pmatrix} $$
The way they do it in my book is by defining the first column of a as vector $ r =(2,2)$. Then $|r| = 2 \sqrt{2} $. So the scaling factor $\alpha = 2\sqrt{2}$ and the rotation is $ \pi / 4 $
Can this be done with every matrix? And how about the second column. Doesn't that matter at all?
Many thanks in advance!
A rotation perserves the angles, hence the columns of the matrix must be orthogonal. It also preserves the (ratios of) lengths and the columns must have the same Euclidean norm.
$$\begin{pmatrix}a&b\\c&d\end{pmatrix}$$ must be such that
$$ab+cd=0$$ and $$a^2+c^2=b^2+d^2.$$
In fact, these constraints imply that the matrix must be of the form
$$\begin{pmatrix}a&-c\\c&a\end{pmatrix}.$$