Is it true that any matrix can be decomposed into product of rotation,reflection,shear,scaling and projection matrices?

The question is not posed completely clearly, but I think that something close to what the questioner wants should follow quickly from the singular value decomposition, which states that any real matrix $A$ can be written in the form $$ A=UDV, $$ where $U$ and $V$ are square real orthogonal matrices and $D$ is a (possibly rectangular) diagonal matrix with nonnegative entries on the diagonal. Since $U$ and $V$ are orthogonal they are products of rotations and reflections, while $D$ can be thought of as a product of projections and scalings.

For example, if $$ A=\left(\begin{array}{cc}1&2x\\0&1\end{array}\right), $$ then $$ A= \left(\begin{array}{cc}\cos \phi&-\sin\phi\\\sin\phi&\cos\phi\end{array}\right) \left(\begin{array}{cc}\sqrt{x^2+1}-x&0\\0&\sqrt{x^2+1}+x\end{array}\right) \left(\begin{array}{cc}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{array}\right), $$ where $$ \phi=-\frac{\pi}{4}-\frac{1}{2}\arctan x, \qquad \theta=\frac{\pi}{4}-\frac{1}{2}\arctan x. $$

In reply to the comments below: Interpreting a diagonal matrix with positive entries along the diagonal as a scaling relies on allowing the scaling to be non-uniform, i.e., allowing it to scale different axes by different amounts. If the scaling matrices are restricted to be uniform, then, by using examples like the one above, you can write a square diagonal matrix with positive entries as a product of orthogonal matrices, shears, and a uniform scaling.


There are several things that are true and known for a long time, related to the question. First, we can consider non-singular matrices without much loss of generality, since any singular matrix can be written (in many ways) as non-singular composed with (orthogonal) projection.

As in another answer, the "singular value decomposition" (an example of a Cartan decomposition, valid in many other scenarios) expresses an arbitrary non-singular (real, for specificness) matrix as a product of rotation, diagonal matrix, and another rotation. Yes, this does express "shearing" as such a composition.

Another decomposition of non-singular real matrices is as a product of shear (upper triangular with 1's on the diagonal), diagonal, and then rotation. Among its other names, this is a special case of "Iwasawa decomposition".

Yet another is as product of upper triangular, permutation matrix (=exactly one non-zero entry, a "1", in each row and column), then another shear. This is a special case of "Bruhat decomposition".

Yes, each of these applies to the components of the others.