# Separating Out Parts of a Matrix (Translation, Rotation, Scaling)

Is there a there a way to separate out parts of matrices?

given a Matrix = Translation * Rotation * Scaling

How can I find out only one part of the matrix?

For instance if I only wanted the rotation element of the matrix?

-
Translations are affine transformations, but they aren't linear (they don't send zero to zero, for one thing). Thus, there aren't matrices corresponding to translation, so your question needs some fixing. You may be thinking of the Iwasawa decomposition, which asserts that an invertible matrix can be written as the product of a diagonal matrix, an upper-triangular matrix, and an orthogonal matrix. Is this what you mean? –  NKS Dec 28 '11 at 21:46
The Iwasawa decomposition asserts that an invertible matrix $M$ can be written in the form $M = KAN$, where $K$ is an orthogonal matrix, $A$ is a diagonal matrix, and $N$ is an upper-triangular matrix with $1$'s along the diagonal. Carrying this out in practice is nothing more than Gram-Schmidt orthogonalization, which produces an orthogonal basis from an arbitrary basis.
Let $F$ be a field (think of $F = \mathbb{R}$ if that's more familiar). Given $M \in GL_n(F)$ (i.e. an invertible $n\times n$ matrix), take the columns as a basis for $F^n$; write them as $v_1, \dots, v_n$. Gram-Schmidt will produce a new, orthonormal basis $u_1, \dots, u_n$, with the property that $$u_k = \sum_{i=1}^k a_{ik} v_i$$ for $a_{ik} \in F$. If we think about change-of-basis matrices, we recognize that the expression above tells us that the change-of-basis matrix taking $v_1,\dots,v_n$ to $u_1,\dots,u_n$ is upper-triangular, because $u_k$ is formed only from $v_1, \dots, v_k$. Any upper-triangular matrix is the product of a diagonal matrix and an upper-triangular matrix with $1$'s on the diagonal (this is called a unipotent matrix); call this product $AN$.
We can think of the original $M$ as taking us from the standard basis to the $v$ basis. Gram-Schmidt then takes us from the $v$-basis to another orthonormal basis $u$, which is represented by an orthogonal matrix $K$. What this means in practice is that we have the identity $$K^{-1}ANM = I;$$ equivalently $$M^{-1} = K^{-1}AN.$$ Of course, the inverse of a diagonal matrix $A$ or a unipotent matrix $N$ will be of the same form, so this gives you your decomposition for $M^{-1}$ ; to get this for $M$, just apply Gram-Schmidt to $M^{-1}$.