# Finding unitary rotation matrix for triangularization

I have an arbitrary complex $$2 \times 2$$ matrix $$B$$ and want to find a unitary rotation

$$Q = \begin{bmatrix} c & -\bar{s} \\ s & \bar{c} \\ \end{bmatrix}$$

with $$|c|^2+|s|^2 = 1$$, such that

$$Q^HB = \begin{bmatrix} f & z_1 \\ 0 & z_2 \\ \end{bmatrix}$$

where $$f$$ is a real number and $$z_1$$ and $$z_2$$ are complex numbers.

This is to triangularize $$B$$ as it is described in this paper: Computing the Singular Values of 2-by-2 Complex Matrices.

• What you're looking for is a QR decomposition of $B$. – Ben Grossmann Apr 23 '14 at 14:56
• Try the Givens rotation. BTW your $Q$ is not unitary (I guess you made a typo). Also, I believe you meant the conjugate transpose ($^H$) instead of the ordinary transposition ($^T$). – Algebraic Pavel Apr 23 '14 at 15:01
• You're right. I edited the question. In the paper, $Q$ is called a unitary rotation, but it's of course not a unitary matrix. – user1618022 Apr 23 '14 at 16:18

With respect to the notation used in the linked paper, $$c=\frac{b_{11}}{f}, \quad s=\frac{b_{12}}{f}, \quad f=\sqrt{|b_{11}|^2+|b_{12}|^2},$$ where $\begin{bmatrix}b_{11}\\b_{12}\end{bmatrix}$ is the first column of $B$. It is trivial to verify that $$Q^H\begin{bmatrix}b_{11}\\b_{12}\end{bmatrix} =\begin{bmatrix}\overline{c}&\overline{s}\\-s &c\end{bmatrix}\begin{bmatrix}b_{11}\\b_{12}\end{bmatrix}=\begin{bmatrix}f\\0\end{bmatrix}.$$