# Decomposition into diagonal and orthogonal matrixes

I'd like to decompose a matrix M into a diagonal matrix D and an orthogonal matrix Q, such that

$$\begin{bmatrix} d_1 & 0 & 0 \\ 0& d_2 & 0\\ 0 & 0 & d_3 \\ \end{bmatrix} \cdot \begin{bmatrix} q_1 & q_2 & q_3 \\ q_4 & q_5 & q_6\\ q_7 & q_8 & q_9 \\ \end{bmatrix} = \begin{bmatrix} m_1 & m_2 & m_3 \\ m_4 & m_5 & m_6\\ m_7 & m_8 & m_9 \\ \end{bmatrix}$$

Does somebody know, if there exists such a decomposition?

I'm using this to split a matrix into a projection matrix and a rotation matrix. This is usually done with the RQ-Decomposition (Upper-Triangle * Orthogonal). But in my case, I want the projection matrix to be a 'trivial' diagonal matrix.

Thanks for your help.

Normalise every nonzero row of $M$ to obtain a matrix $Q_1$. The desired decomposition is possible if and only if all nonzero rows of $Q_1$ are orthogonal to each other.
• I see. The rows in my $Q_1$ are not orthogonal to each other. If I force $Q_1$ to be orthogonal (replace third row by crossproduct of row 1 and 2), the RQ-Decomposition of $Q_1$ returns as an Upper-Triangle matrix in form of a diagonal matrix. Sep 17, 2015 at 11:46
In general there does not exist such a decomposition. Not in $R^3$, and not in any $R^n$ for $n\geq 2$. This is because $DQ$ always carries the Euclidean unit ball onto an ellipsoid whose axes are parallel to the standard axes. There exist, however, ellipsoids whose axes are not parallel to the standard axes. Since every ellipsoid centered at the origin is a linear image of the Euclidean unit ball, you cannot hope to get such a decomposition in general.