For the affine transformation: $$ \begin{bmatrix} a & b & c\\ e & f & g\\ i & j & k\\ \end{bmatrix} $$
how do I extract the rotation and scale parts?
According to this answer, the scale along each axis can be extracted by taking the length of the respective matrix column, but what about the sign of the scale? This is especially interesting for me because the matrix might be used to flip around an axis using a scale of -1.
A pure rotation matrix will have determinant 1. Find the determinant of the given matrix. That will be the "scale". Dividing the matrix by its determinant gives the pure rotation matrix.