Which matrices to use in Given's rotation in QR decomposition

388 Views Asked by At

\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}

If I want to zero the $d$ element, I must multiply, on the left, by

\begin{bmatrix} c & -s & 0 \\ s & c & 0 \\ 0 & 0 & 1 \end{bmatrix}

We end up with

\begin{bmatrix} ca -sd & cb-se & cc -sf \\ sa + cd & sb+ec & sc+cf \\ g & h & i \end{bmatrix}

By doing $s=d/r, c=-a/r$ where $r=\sqrt{a^2 + d^2}$, we end up zeroeing the $g$ element as desired.

in order to zero the $h$ element, I multiply by \begin{bmatrix} 1 & 0& 0 \\ 0 & c & -s \\ 0 & s & c \end{bmatrix}

Now, in order to zero the $g$ element, what should I do? Would

\begin{bmatrix} 0 & 0& 1 \\ c & -s & 0 \\ s & c & 0 \end{bmatrix}

work?

Or does the $R_Y(\theta)$ matrix work for zeroeing $g$?

I'm asking this because according to wikipedia, enter image description here

What should be the $r$ when I use matrix $R_Y(\theta)$?