# Three-Dimensional Givens Rotations

Note: The math on this page is progressively rendered. It can take up to 45 seconds before the final rendering is complete.

Remembering that $\mathrm{cos}\left(\theta +\frac{\pi }{2}\right)=-\mathrm{sin}\left(\theta \right)$ and $\mathrm{sin}\left(\theta +\frac{\pi }{2}\right)=\mathrm{cos}\left(\theta \right)$, the following matrix is the three-dimensional Givens Rotation from the $y$-axis to the $z$-axis (rotation counter-clockwise around the $x$-axis):

$\begin{array}{c}\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}+{90}^{\circ }\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}+{90}^{\circ }\right)\end{array}\right)\\ \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}+\frac{\pi }{2}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}+\frac{\pi }{2}\right)\end{array}\right)\\ \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\end{array}$

This matrix rotates three-dimensional column vectors about the origin of the $y\to z$ plane:

 $y\to z$ $x$ $y$ $z$ $x$ $1$ $0$ $0$ $y$ $0$ $\mathrm{cos}\left({\theta }_{y\to z}\right)$ $-\mathrm{sin}\left({\theta }_{y\to z}\right)$ $z$ $0$ $\mathrm{sin}\left({\theta }_{y\to z}\right)$ $\mathrm{cos}\left({\theta }_{y\to z}\right)$

Similarly, the following is the three-dimensional Givens Rotation from the $x$-axis to the $z$-axis (rotation clockwise around the $y$-axis):

$\begin{array}{c}\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}+{90}^{\circ }\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}+{90}^{\circ }\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}+\frac{\pi }{2}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}+\frac{\pi }{2}\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\end{array}$

This matrix rotates three-dimensional column vectors about the origin of the $x\to z$ plane:

 $x\to z$ $x$ $y$ $z$ $x$ $\mathrm{cos}\left({\theta }_{x\to z}\right)$ $0$ $-\mathrm{sin}\left({\theta }_{x\to z}\right)$ $y$ $0$ $1$ $0$ $z$ $\mathrm{sin}\left({\theta }_{x\to z}\right)$ $0$ $\mathrm{cos}\left({\theta }_{x\to z}\right)$

Notice that this is not the same as the traditional rotation matrix where we rotate around the $y$ axis using the right-hand rule (i.e. where we rotate in the opposite direction about the origin of the $x\to z$ plane). In other words, given $\theta =-\varphi$ and remembering that $\mathrm{cos}\left(-\varphi \right)=\mathrm{cos}\left(\varphi \right)$ and $\mathrm{sin}\left(-\varphi \right)=-\mathrm{sin}\left(\varphi \right)$, we have the following:

$\begin{array}{c}\left(\begin{array}{ccc}\mathrm{cos}\left(\theta \right)& 0& \mathrm{cos}\left(\theta +{90}^{\circ }\right)\\ 0& 1& 0\\ \mathrm{sin}\left(\theta \right)& 0& \mathrm{sin}\left(\theta +{90}^{\circ }\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left(\left(-\varphi \right)\right)& 0& \mathrm{cos}\left(\left(-\varphi \right)+{90}^{\circ }\right)\\ 0& 1& 0\\ \mathrm{sin}\left(\left(-\varphi \right)\right)& 0& \mathrm{sin}\left(\left(-\varphi \right)+{90}^{\circ }\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left(-\varphi \right)& 0& \mathrm{sin}\left(-\varphi +\frac{\pi }{2}\right)\\ 0& 1& 0\\ \mathrm{sin}\left(-\varphi \right)& 0& \mathrm{sin}\left(-\varphi +\frac{\pi }{2}\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left(-\varphi \right)& 0& -\mathrm{sin}\left(-\varphi \right)\\ 0& 1& 0\\ \mathrm{sin}\left(-\varphi \right)& 0& \mathrm{cos}\left(-\varphi \right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left(\varphi \right)& 0& \mathrm{sin}\left(\varphi \right)\\ 0& 1& 0\\ -\mathrm{sin}\left(\varphi \right)& 0& \mathrm{cos}\left(\varphi \right)\end{array}\right)\end{array}$

Lastly, the following is the three-dimensional Givens Rotation from the $x$-axis to the $y$-axis (rotation counter-clockwise around the $z$-axis):

$\begin{array}{c}\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}+{90}^{\circ }\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}+{90}^{\circ }\right)& 0\\ 0& 0& 1\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}+\frac{\pi }{2}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}+\frac{\pi }{2}\right)& 0\\ 0& 0& 1\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)\end{array}$

This matrix rotates three-dimensional column vectors about the origin of the $x\to y$ plane:

 $x\to y$ $x$ $y$ $z$ $x$ $\mathrm{cos}\left({\theta }_{x\to y}\right)$ $-\mathrm{sin}\left({\theta }_{x\to y}\right)$ $0$ $y$ $\mathrm{sin}\left({\theta }_{x\to y}\right)$ $\mathrm{cos}\left({\theta }_{x\to y}\right)$ $0$ $z$ $0$ $0$ $1$

Observe that given $n$ dimensions, we have the following number of distinct Givens Rotation matrices:

$\begin{array}{c}\left(n-1\right)+\left(n-2\right)+\cdots +1\\ \sum _{k=1}^{n-1}k\\ \frac{\left(n-1\right)\left(\left(n-1\right)+1\right)}{2}\\ \frac{\left(n-1\right)\left(n-1+1\right)}{2}\\ \frac{\left(n-1\right)\left(n\right)}{2}\\ \frac{n\left(n-1\right)}{2}\end{array}$

For instance, when we’re in three dimensions, we have $n=3$ and $\frac{n\left(n-1\right)}{2}=\frac{\left(3\right)\left(\left(3\right)-1\right)}{2}=\frac{3\left(\overline{)2}\right)}{\overline{)2}}=3$ distinct Givens Rotation matrices:

 $y\to z$ $x$ $y$ $z$ $x$ $1$ $0$ $0$ $y$ $0$ $\mathrm{cos}\left({\theta }_{y\to z}\right)$ $-\mathrm{sin}\left({\theta }_{y\to z}\right)$ $z$ $0$ $\mathrm{sin}\left({\theta }_{y\to z}\right)$ $\mathrm{cos}\left({\theta }_{y\to z}\right)$

 $x\to z$ $x$ $y$ $z$ $x$ $\mathrm{cos}\left({\theta }_{x\to z}\right)$ $0$ $-\mathrm{sin}\left({\theta }_{x\to z}\right)$ $y$ $0$ $1$ $0$ $z$ $\mathrm{sin}\left({\theta }_{x\to z}\right)$ $0$ $\mathrm{cos}\left({\theta }_{x\to z}\right)$

and

 $x\to y$ $x$ $y$ $z$ $x$ $\mathrm{cos}\left({\theta }_{x\to y}\right)$ $-\mathrm{sin}\left({\theta }_{x\to y}\right)$ $0$ $y$ $\mathrm{sin}\left({\theta }_{x\to y}\right)$ $\mathrm{cos}\left({\theta }_{x\to y}\right)$ $0$ $z$ $0$ $0$ $1$

Moreover, notice the order in which we’re considering these distinct Givens Rotation matrices:

 $x$ $y$ $z$ $x$ $x\to y$ $x\to z$ $y$ $y\to z$ $z$

 $x$ $y$ $z$ $x$ $3$ $2$ $y$ $1$ $z$

We’ll leverage this order in a moment. Before that, let’s see what happens when we rotate the unit column vector $\left(1,0,0\right)$ using each of these Givens Rotations:

 $\begin{array}{c}\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}+{90}^{\circ }\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}+{90}^{\circ }\right)\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}+\frac{\pi }{2}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}+\frac{\pi }{2}\right)\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\end{array}$, $\begin{array}{c}\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}+{90}^{\circ }\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}+{90}^{\circ }\right)\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}+\frac{\pi }{2}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}+\frac{\pi }{2}\right)\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{c}\mathrm{cos}\left({\theta }_{x\to z}\right)\\ 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)\end{array}\right)\end{array}$, and $\begin{array}{c}\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}+{90}^{\circ }\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}+{90}^{\circ }\right)& 0\\ 0& 0& 1\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}+\frac{\pi }{2}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}+\frac{\pi }{2}\right)& 0\\ 0& 0& 1\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)\left(\begin{array}{c}1\\ 0\\ 0\end{array}\right)\\ \left(\begin{array}{c}\mathrm{cos}\left({\theta }_{x\to y}\right)\\ \mathrm{sin}\left({\theta }_{x\to y}\right)\\ 0\end{array}\right)\end{array}$.

As expected, this simply extracts the first column vector from each Givens Rotation matrix. Because we’re extracting the first column vector, we’ll only see $\theta$ in those vectors … we’ll never see $\theta +{90}^{\circ }$; so for the Givens Rotation matrices that modify $\left(1,0,0\right)$, $\mathrm{cos}\left(\theta \right)$ will always be in the $x$ position and $\mathrm{sin}\left(\theta \right)$ will walk its way up the remaining dimensions based on the order established above. For the Givens Rotation matrices that do not modify $\left(1,0,0\right)$ (it’s just that first matrix in three dimensions), those rotations do not impact the $x$ position. Looking back at our established order:

 $x$ $y$ $z$ $x$ $3$ $2$ $y$ $1$ $z$

we see that the non-$x$ rows cannot impact the $x$ position. In this three-dimensional case, we see that the Givens Rotation matrix associated with the $y$ row cannot modify the $x$ position. To make this a little clearer, let’s rotate the arbitrarily positioned column vector $\left(x,y,z\right)$:

 $\begin{array}{c}\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}+{90}^{\circ }\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}+{90}^{\circ }\right)\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}+\frac{\pi }{2}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}+\frac{\pi }{2}\right)\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{c}x\\ y\mathrm{cos}\left({\theta }_{y\to z}\right)-z\mathrm{sin}\left({\theta }_{y\to z}\right)\\ y\mathrm{sin}\left({\theta }_{y\to z}\right)+z\mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\end{array}$, $\begin{array}{c}\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}+{90}^{\circ }\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}+{90}^{\circ }\right)\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}+\frac{\pi }{2}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}+\frac{\pi }{2}\right)\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{c}x\mathrm{cos}\left({\theta }_{x\to z}\right)-z\mathrm{sin}\left({\theta }_{x\to z}\right)\\ y\\ x\mathrm{sin}\left({\theta }_{x\to z}\right)+z\mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\end{array}$, and $\begin{array}{c}\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}+{90}^{\circ }\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}+{90}^{\circ }\right)& 0\\ 0& 0& 1\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}+\frac{\pi }{2}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}+\frac{\pi }{2}\right)& 0\\ 0& 0& 1\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \left(\begin{array}{c}x\mathrm{cos}\left({\theta }_{x\to y}\right)-y\mathrm{sin}\left({\theta }_{x\to y}\right)\\ x\mathrm{sin}\left({\theta }_{x\to y}\right)+y\mathrm{cos}\left({\theta }_{x\to y}\right)\\ z\end{array}\right)\end{array}$.

We immediately see that rotating $\left(x,y,z\right)$ about the $y\to z$ plane (multiplying by the first Givens Rotation matrix) does not impact the $x$ position … and only impacts the $y$ and $z$ positions if $y\ne 0$ or $z\ne 0$ … which only happens when we have a column vector off of the $x$-axis. For the column vector $\left(r,0,0\right)$ on the $x$-axis, rotating about the $y\to z$ plane (multiplying by that first Givens Rotation matrix) has no effect … we’ll still have $\left(r,0,0\right)$ after that multiplication.

This brings up the question: given the column vector $\left(r,0,0\right)$ where $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$ and $r\ge 0$, can all column vectors $\left(x,y,z\right)$ be recovered using just these Givens Rotation matrices?

First, we’ll start by using all the Givens Rotation matrices in our established order … and notice that the first Givens Rotation matrix doesn’t really help out that much:

$\begin{array}{rrr}\hfill \stackrel{3}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}}\stackrel{2}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}}\stackrel{1}{\overbrace{\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}}\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \hfill \stackrel{3}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}}\stackrel{2}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}}\left(\stackrel{1}{\overbrace{\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}}\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \hfill \stackrel{3}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}}\stackrel{2}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}}\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\end{array}$

Then, we have:

$\begin{array}{rrr}\hfill \stackrel{3}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}}\stackrel{2}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}}\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \hfill \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\\ \mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \hfill \left(\begin{array}{c}r\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left({\theta }_{x\to z}\right)\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\end{array}$

For $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$, $r=0$ implies $x=0$, $y=0$, and $z=0$, so given $r=0$, we have:

$\begin{array}{rrr}\hfill \left(\begin{array}{c}r\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left({\theta }_{x\to z}\right)\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \hfill \left(\begin{array}{c}\left(0\right)\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ \left(0\right)\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ \left(0\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}0\\ 0\\ 0\end{array}\right)\\ \hfill \left(\begin{array}{c}0\\ 0\\ 0\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}0\\ 0\\ 0\end{array}\right)\end{array}$

So, we can recover the column vector $\left(0,0,0\right)$.

Given $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$ with $r>0$ and $-{90}^{\circ }\le {\theta }_{x\to z}\le {90}^{\circ }$, we have:

$\begin{array}{ccc}r\mathrm{sin}\left({\theta }_{x\to z}\right)& =& z\\ \left(\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)& =& z\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& =& \frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\\ {\theta }_{x\to z}& =& \mathrm{arcsin}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)\end{array}$

Moreover, since $\mathrm{arcsin}\left(w\right)=\mathrm{arctan}\left(\frac{w}{\sqrt{1-{w}^{2}}}\right)$, we also have:

$\begin{array}{lll}{\theta }_{x\to z}\hfill & =\hfill & \mathrm{arcsin}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)}{\sqrt{1-{\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)}^{2}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}{\sqrt{\frac{{x}^{2}+{y}^{2}+{z}^{2}}{{x}^{2}+{y}^{2}+{z}^{2}}-\frac{{z}^{2}}{{x}^{2}+{y}^{2}+{z}^{2}}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\sqrt{\frac{{x}^{2}+{y}^{2}+\overline{){z}^{2}}-\overline{){z}^{2}}}{{x}^{2}+{y}^{2}+{z}^{2}}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{z}{\overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\frac{\sqrt{{x}^{2}+{y}^{2}}}{\overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\hfill \end{array}$

Remember: $\mathrm{arctan}\left(\frac{y}{x}\right)$ is atan2( y, x ) in C/C++ and ArcTan[ x, y ] in Mathematica.

Given $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$ with $r>0$, $-{90}^{\circ }\le {\theta }_{x\to z}\le {90}^{\circ }$, and remembering that $\mathrm{cos}\left(\mathrm{arctan}\left(w\right)\right)=\frac{1}{\sqrt{1+{w}^{2}}}$ and $\mathrm{sin}\left(\mathrm{arctan}\left(w\right)\right)=\frac{w}{\sqrt{1+{w}^{2}}}$, if ${\theta }_{x\to z}=\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)$, we have:

 $\begin{array}{c}\mathrm{cos}\left({\theta }_{x\to z}\right)\\ \overline{)\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)}\\ \frac{1}{\sqrt{1+{\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)}^{2}}}\\ \frac{1}{\sqrt{\frac{{x}^{2}+{y}^{2}}{{x}^{2}+{y}^{2}}+\frac{{z}^{2}}{{x}^{2}+{y}^{2}}}}\\ \frac{1}{\left(\frac{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}{\sqrt{{x}^{2}+{y}^{2}}}\right)}\\ \overline{)\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}\end{array}$ and $\begin{array}{c}\mathrm{sin}\left({\theta }_{x\to z}\right)\\ \overline{)\mathrm{sin}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)}\\ \frac{\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)}{\sqrt{1+{\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)}^{2}}}\\ \frac{\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}}{\sqrt{\frac{{x}^{2}+{y}^{2}}{{x}^{2}+{y}^{2}}+\frac{{z}^{2}}{{x}^{2}+{y}^{2}}}}\\ \frac{z}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}\frac{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}}\\ \overline{)\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}\end{array}$.

Given $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$ with $r>0$ and $-{180}^{\circ }\le {\theta }_{x\to y}\le {180}^{\circ }$, since $\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)=\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}$, if ${\theta }_{x\to z}=\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)$, we have:

$\begin{array}{ccc}r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& =& y\\ r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)& =& y\\ \left(\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\right)\mathrm{sin}\left({\theta }_{x\to y}\right)\left(\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)& =& y\\ \overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\mathrm{sin}\left({\theta }_{x\to y}\right)\frac{\sqrt{{x}^{2}+{y}^{2}}}{\overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}& =& y\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& =& \frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\\ {\theta }_{x\to y}& =& \mathrm{arcsin}\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\right)\end{array}$

Moreover, since $\mathrm{arcsin}\left(w\right)=\mathrm{arctan}\left(\frac{w}{\sqrt{1-{w}^{2}}}\right)$, we also have:

$\begin{array}{lll}{\theta }_{x\to y}\hfill & =\hfill & \mathrm{arcsin}\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\right)}{\sqrt{1-{\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\right)}^{2}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{\frac{{x}^{2}+{y}^{2}}{{x}^{2}+{y}^{2}}-\frac{{y}^{2}}{{x}^{2}+{y}^{2}}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{\frac{{x}^{2}+\overline{){y}^{2}}-\overline{){y}^{2}}}{{x}^{2}+{y}^{2}}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{y}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}\frac{\sqrt{{x}^{2}}}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{y}{\sqrt{{x}^{2}}}\right)\hfill \\ \hfill & =\hfill & \mathrm{arctan}\left(\frac{y}{x}\right)\hfill \end{array}$

Given $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$ with $r>0$, $-{180}^{\circ }\le {\theta }_{x\to y}\le {180}^{\circ }$, and remembering that $\mathrm{cos}\left(\mathrm{arctan}\left(w\right)\right)=\frac{1}{\sqrt{1+{w}^{2}}}$ and $\mathrm{sin}\left(\mathrm{arctan}\left(w\right)\right)=\frac{w}{\sqrt{1+{w}^{2}}}$ , we have:

 $\begin{array}{c}\mathrm{cos}\left({\theta }_{x\to y}\right)\\ \overline{)\mathrm{cos}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)}\\ \frac{1}{\sqrt{1+{\left(\frac{y}{x}\right)}^{2}}}\\ \frac{1}{\sqrt{\frac{{x}^{2}}{{x}^{2}}+\frac{{y}^{2}}{{x}^{2}}}}\\ \frac{1}{\left(\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}}}\right)}\\ \frac{\sqrt{{x}^{2}}}{\sqrt{{x}^{2}+{y}^{2}}}\\ \overline{)\frac{x}{\sqrt{{x}^{2}+{y}^{2}}}}\end{array}$ and $\begin{array}{c}\mathrm{sin}\left({\theta }_{x\to y}\right)\\ \overline{)\mathrm{sin}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)}\\ \frac{\left(\frac{y}{x}\right)}{\sqrt{1+{\left(\frac{y}{x}\right)}^{2}}}\\ \frac{\frac{y}{x}}{\sqrt{\frac{{x}^{2}}{{x}^{2}}+\frac{{y}^{2}}{{x}^{2}}}}\\ \frac{y}{x\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}}}}\\ \frac{y}{\overline{)x}\frac{\sqrt{{x}^{2}+{y}^{2}}}{\overline{)x}}}\\ \overline{)\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}}\end{array}$

Given $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$ with $r>0$, $-{180}^{\circ }\le {\theta }_{x\to y}\le {180}^{\circ }$, and $-{90}^{\circ }\le {\theta }_{x\to z}\le {90}^{\circ }$, since $\mathrm{cos}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)=\frac{x}{\sqrt{{x}^{2}+{y}^{2}}}$ and $\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)=\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}$, if ${\theta }_{x\to y}=\mathrm{arctan}\left(\frac{y}{x}\right)$ and ${\theta }_{x\to z}=\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)$, we have:

$\begin{array}{c}r\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{cos}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)\\ \left(\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\right)\left(\frac{x}{\sqrt{{x}^{2}+{y}^{2}}}\right)\left(\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)\\ \overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\frac{x}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}\frac{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}{\overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}\\ x\end{array}$

So, we have $r\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)=x$.

Obviously, since $\mathrm{sin}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)=\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}$, $\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)=\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}$, and $\mathrm{sin}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)=\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}$, if ${\theta }_{x\to y}=\mathrm{arctan}\left(\frac{y}{x}\right)$ and ${\theta }_{x\to z}=\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)$, we also have:

 $\begin{array}{c}r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)\\ \left(\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\right)\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\right)\left(\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)\\ \overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\frac{y}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}\frac{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}{\overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}\\ y\end{array}$ and $\begin{array}{c}r\mathrm{sin}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)\\ \left(\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\right)\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)\\ \overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\frac{z}{\overline{)\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}}\\ z\end{array}$.

So, we also have $r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)=y$ and $r\mathrm{sin}\left({\theta }_{x\to z}\right)=z$ such that:

$\begin{array}{rrr}\hfill \left(\begin{array}{c}r\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\\ r\mathrm{sin}\left({\theta }_{x\to z}\right)\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\\ \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\end{array}$

Therefore, all column vectors $\left(x,y,z\right)$ can be recovered by applying the Givens Rotation matrices associated with the $x$ row to the column vector $\left(r,0,0\right)$ where $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$ and $r\ge 0$:

 $x$ $y$ $z$ $x$ $3$ $2$ $y$ $1$ $z$

Notice that the $\left(r,{\theta }_{x\to y},{\theta }_{x\to z}\right)$ coordinate system implied here is not the same as the traditional spherical coordinate system$\left(\rho ,\theta ,\varphi \right)$. In the traditional spherical coordinate system, we have:

$\begin{array}{lll}x\hfill & =\hfill & \rho \mathrm{cos}\left(\theta \right)\mathrm{sin}\left(\varphi \right)\hfill \\ y\hfill & =\hfill & \rho \mathrm{sin}\left(\theta \right)\mathrm{sin}\left(\varphi \right)\hfill \\ z\hfill & =\hfill & \rho \mathrm{cos}\left(\varphi \right)\hfill \end{array}$

where $\rho =\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$, ${0}^{\circ }\le \theta \le {360}^{\circ }$ where $\theta$ is the angle measured from the positive $x$-axis (toward the positive $y$-axis), and ${0}^{\circ }\le \varphi \le {180}^{\circ }$ where $\varphi$ is the angle measured from the positive $z$-axis (toward the negative $z$-axis); however, what we have here is the following:

$\begin{array}{lll}x\hfill & =\hfill & r\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\hfill \\ y\hfill & =\hfill & r\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)\hfill \\ z\hfill & =\hfill & r\mathrm{sin}\left({\theta }_{x\to z}\right)\hfill \end{array}$

where $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$, $-{180}^{\circ }\le {\theta }_{x\to y}\le {180}^{\circ }$ where ${\theta }_{x\to y}$ is the angle measured from the positive $x$-axis (toward the positive $y$-axis), and $-{90}^{\circ }\le {\theta }_{x\to z}\le {90}^{\circ }$ where ${\theta }_{x\to z}$ is the angle measured from the positive $x$-axis (toward the positive $z$-axis).

Now, let’s rotate a column vector $\left(x,y,z\right)$ back to the $x$-axis so that we get the column vector $\left(r,0,0\right)$. In order to do that, let’s first take a look at each inverse of these Givens Rotation matrices using augmentation and finding the reduced row echelon forms … which as you’ll see is very similar for each matrix. Remembering that ${\mathrm{cos}}^{2}\left(\theta \right)+{\mathrm{sin}}^{2}\left(\theta \right)=1$ which implies that $1-{\mathrm{sin}}^{2}\left(\theta \right)={\mathrm{cos}}^{2}\left(\theta \right)$, we have:

$\begin{array}{c}\overline{)\left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)& 0& 1& 0\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)& 0& 0& 1\end{array}\right)}\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0\\ 0& 0& \mathrm{cos}\left({\theta }_{y\to z}\right)+\frac{{\mathrm{sin}}^{2}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0\\ 0& 0& \frac{{\mathrm{cos}}^{2}\left({\theta }_{y\to z}\right)+{\mathrm{sin}}^{2}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0\\ 0& 0& \frac{1}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& -\frac{\mathrm{sin}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& 0\\ 0& 0& 1& 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& 0& 0& \frac{1}{\mathrm{cos}\left({\theta }_{y\to z}\right)}-\frac{{\mathrm{sin}}^{2}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& \mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& 0& 1& 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& 0& 0& \frac{1-{\mathrm{sin}}^{2}\left({\theta }_{y\to z}\right)}{\mathrm{cos}\left({\theta }_{y\to z}\right)}& \mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& 0& 1& 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& 0& 0& \frac{{\mathrm{cos}}^{\overline{)2}}\left({\theta }_{y\to z}\right)}{\overline{)\mathrm{cos}\left({\theta }_{y\to z}\right)}}& \mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& 0& 1& 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\\ \overline{)\left(\begin{array}{cccccc}1& 0& 0& 1& 0& 0\\ 0& 1& 0& 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& 0& 1& 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}\end{array}$

$\begin{array}{c}\overline{)\left(\begin{array}{cccccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)& 1& 0& 0\\ 0& 1& 0& 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)& 0& 0& 1\end{array}\right)}\\ \left(\begin{array}{cccccc}1& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& \frac{1}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 0\\ 0& 1& 0& 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& \frac{1}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 0\\ 0& 1& 0& 0& 1& 0\\ 0& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)+\frac{{\mathrm{sin}}^{2}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& \frac{1}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 0\\ 0& 1& 0& 0& 1& 0\\ 0& 0& \frac{{\mathrm{cos}}^{2}\left({\theta }_{x\to z}\right)+{\mathrm{sin}}^{2}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& \frac{1}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 0\\ 0& 1& 0& 0& 1& 0\\ 0& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& \frac{1}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& 0\\ 0& 1& 0& 0& 1& 0\\ 0& 0& 1& -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to z}\right)}-\frac{{\mathrm{sin}}^{2}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0& 0& 1& 0\\ 0& 0& 1& -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& \frac{1-{\mathrm{sin}}^{2}\left({\theta }_{x\to z}\right)}{\mathrm{cos}\left({\theta }_{x\to z}\right)}& 0& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0& 0& 1& 0\\ 0& 0& 1& -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& \frac{{\mathrm{cos}}^{\overline{)2}}\left({\theta }_{x\to z}\right)}{\overline{)\mathrm{cos}\left({\theta }_{x\to z}\right)}}& 0& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0& 0& 1& 0\\ 0& 0& 1& -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\\ \overline{)\left(\begin{array}{cccccc}1& 0& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0& 0& 1& 0\\ 0& 0& 1& -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}\end{array}$

$\begin{array}{c}\overline{)\left(\begin{array}{cccccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0& 1& 0& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0& 0& 1& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)}\\ \left(\begin{array}{cccccc}1& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0& 0& 1& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{x\to y}\right)+\frac{{\mathrm{sin}}^{2}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 1& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& 0\\ 0& \frac{{\mathrm{cos}}^{2}\left({\theta }_{x\to y}\right)+{\mathrm{sin}}^{2}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 1& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& 0\\ 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 1& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& -\frac{\mathrm{sin}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& 0& 0\\ 0& 1& 0& -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& \frac{1}{\mathrm{cos}\left({\theta }_{x\to y}\right)}-\frac{{\mathrm{sin}}^{2}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& \mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ 0& 1& 0& -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& \frac{1-{\mathrm{sin}}^{2}\left({\theta }_{x\to y}\right)}{\mathrm{cos}\left({\theta }_{x\to y}\right)}& \mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ 0& 1& 0& -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \left(\begin{array}{cccccc}1& 0& 0& \frac{{\mathrm{cos}}^{\overline{)2}}\left({\theta }_{x\to y}\right)}{\overline{)\mathrm{cos}\left({\theta }_{x\to y}\right)}}& \mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ 0& 1& 0& -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)\\ \overline{)\left(\begin{array}{cccccc}1& 0& 0& \mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ 0& 1& 0& -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1& 0& 0& 1\end{array}\right)}\end{array}$

Therefore, the inverse of each three-dimensional Givens Rotation matrix is simply the transpose of that matrix:

$\begin{array}{ccccc}{\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}^{-1}& =& {\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}^{T}& =& \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\\ {\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}^{-1}& =& {\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}^{T}& =& \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)\\ {\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}^{-1}& =& {\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}^{T}& =& \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)\end{array}$

and it shouldn’t be too hard to see that the inverse of each $n$-dimensional Givens Rotation matrix is also the transpose of that matrix … like it is for any other $n$-dimensional rotation matrix.

Also, if we consider rotations in the opposite direction where $\theta =-\varphi$ while remembering that $\mathrm{cos}\left(-\varphi \right)=\mathrm{cos}\left(\varphi \right)$ and $\mathrm{sin}\left(-\varphi \right)=-\mathrm{sin}\left(\varphi \right)$, then we have:

$\begin{array}{ccccc}\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)& =& \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left(-{\varphi }_{y\to -z}\right)& \mathrm{sin}\left(-{\varphi }_{y\to -z}\right)\\ 0& -\mathrm{sin}\left(-{\varphi }_{y\to -z}\right)& \mathrm{cos}\left(-{\varphi }_{y\to -z}\right)\end{array}\right)& =& \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\varphi }_{y\to -z}\right)& -\mathrm{sin}\left({\varphi }_{y\to -z}\right)\\ 0& \mathrm{sin}\left({\varphi }_{y\to -z}\right)& \mathrm{cos}\left({\varphi }_{y\to -z}\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)& =& \left(\begin{array}{ccc}\mathrm{cos}\left(-{\varphi }_{x\to -z}\right)& 0& \mathrm{sin}\left(-{\varphi }_{x\to -z}\right)\\ 0& 1& 0\\ -\mathrm{sin}\left(-{\varphi }_{x\to -z}\right)& 0& \mathrm{cos}\left(-{\varphi }_{x\to -z}\right)\end{array}\right)& =& \left(\begin{array}{ccc}\mathrm{cos}\left({\varphi }_{x\to -z}\right)& 0& -\mathrm{sin}\left({\varphi }_{x\to -z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\varphi }_{x\to -z}\right)& 0& \mathrm{cos}\left({\varphi }_{x\to -z}\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)& =& \left(\begin{array}{ccc}\mathrm{cos}\left(-{\varphi }_{x\to -y}\right)& \mathrm{sin}\left(-{\varphi }_{x\to -y}\right)& 0\\ -\mathrm{sin}\left(-{\varphi }_{x\to -y}\right)& \mathrm{cos}\left(-{\varphi }_{x\to -y}\right)& 0\\ 0& 0& 1\end{array}\right)& =& \left(\begin{array}{ccc}\mathrm{cos}\left({\varphi }_{x\to -y}\right)& -\mathrm{sin}\left({\varphi }_{x\to -y}\right)& 0\\ \mathrm{sin}\left({\varphi }_{x\to -y}\right)& \mathrm{cos}\left({\varphi }_{x\to -y}\right)& 0\\ 0& 0& 1\end{array}\right)\end{array}$

We see that each inverse amounts to just rotating in the opposite direction. In other words, since $\mathrm{cos}\left(-\theta \right)=\mathrm{cos}\left(\theta \right)$ and $\mathrm{sin}\left(-\theta \right)=-\mathrm{sin}\left(\theta \right)$ implies that $\mathrm{cos}\left(\theta \right)=\mathrm{cos}\left(-\theta \right)$ and $\mathrm{sin}\left(\theta \right)=-\mathrm{sin}\left(-\theta \right)$ , we have:

$\begin{array}{ccccc}{\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}^{-1}& =& \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& -\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)& =& \left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left(-{\theta }_{y\to z}\right)& -\mathrm{sin}\left(-{\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left(-{\theta }_{y\to z}\right)& \mathrm{cos}\left(-{\theta }_{y\to z}\right)\end{array}\right)\\ {\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}^{-1}& =& \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ -\mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)& =& \left(\begin{array}{ccc}\mathrm{cos}\left(-{\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left(-{\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left(-{\theta }_{x\to z}\right)& 0& \mathrm{cos}\left(-{\theta }_{x\to z}\right)\end{array}\right)\\ {\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}^{-1}& =& \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)& =& \left(\begin{array}{ccc}\mathrm{cos}\left(-{\theta }_{x\to y}\right)& -\mathrm{sin}\left(-{\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left(-{\theta }_{x\to y}\right)& \mathrm{cos}\left(-{\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)\end{array}$

Now, let’s use those inverse Givens Rotation matrices to rotate a column vector $\left(x,y,z\right)$ in those opposite directions back to the $x$-axis so that we get the column vector $\left(r,0,0\right)$.

First, we’ll start by using all the Givens Rotation matrices in our established order … and get rid of the ones that don’t matter here:

$\begin{array}{lll}\left(\begin{array}{c}x\\ y\\ z\end{array}\right)\hfill & =\hfill & \stackrel{3}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}}\stackrel{2}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}}\stackrel{1}{\overbrace{\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}}\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\hfill \\ \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\hfill & =\hfill & \stackrel{3}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}}\stackrel{2}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}}\left(\stackrel{1}{\overbrace{\left(\begin{array}{ccc}1& 0& 0\\ 0& \mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{y\to z}\right)\\ 0& \mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}}\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\right)\hfill \\ \left(\begin{array}{c}x\\ y\\ z\end{array}\right)\hfill & =\hfill & \stackrel{3}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)& 0\\ \mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ 0& 0& 1\end{array}\right)}}\stackrel{2}{\overbrace{\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to z}\right)& 0& -\mathrm{sin}\left({\theta }_{x\to z}\right)\\ 0& 1& 0\\ \mathrm{sin}\left({\theta }_{x\to z}\right)& 0& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}}\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\hfill \end{array}$

Next, remembering that the inverse of a rotation matrix is its transpose, then we have:

Keeping in mind that $\mathrm{cos}\left(\theta \right)=\mathrm{cos}\left(-\theta \right)$ and $\mathrm{sin}\left(\theta \right)=-\mathrm{sin}\left(-\theta \right)$, we have:

Since $\theta =-\varphi$ implies $-\theta =\varphi$, we also have:

In other words, given a column vector $\left(x,y,z\right)$, we can rotate that vector back to the $x$-axis by applying Givens Rotation matrices in the opposite order using the opposite angles. Instead of the following:

 $x$ $y$ $z$ $x$ $x\to y$ $x\to z$ $y$ $y\to z$ $z$

 $x$ $y$ $z$ $x$ $3$ $2$ $y$ $1$ $z$

repeated again with subscripts to keep things clear:

 $x$ $y$ $z$ $x$ ${3}_{\text{forward}}$ ${2}_{\text{forward}}$ $y$ ${1}_{\text{forward}}$ $z$

we now have the following:

 $-x$ $-y$ $-z$ $x$ $x\to -y$ $x\to -z$ $y$ $y\to -z$ $z$

 $-x$ $-y$ $-z$ $x$ ${1}_{\text{backward}}$ ${2}_{\text{backward}}$ $y$ ${3}_{\text{backward}}$ $z$

In terms of this new backward ordering and keeping in mind that $\varphi =-\theta$, we now have the following:

So, we have:

$\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)-\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)+\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)+\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)-\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)=\left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)$

Given $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$, we choose ${\theta }_{x\to y}=\mathrm{arctan}\left(\frac{y}{x}\right)$, ${\theta }_{x\to z}=\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)$, and ${\theta }_{y\to z}=0$.

After applying ${\theta }_{y\to z}=0$, we have:

$\begin{array}{c}\overline{)\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)-\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)+\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)+\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)-\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{y\to z}\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\mathrm{cos}\left({\theta }_{y\to z}\right)\end{array}\right)}\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{sin}\left(0\right)-\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left(0\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{sin}\left(0\right)+\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left(0\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\mathrm{sin}\left(0\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{cos}\left(0\right)+\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left(0\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\mathrm{cos}\left(0\right)-\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left(0\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\mathrm{cos}\left(0\right)\end{array}\right)\\ \left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\left(0\right)-\mathrm{sin}\left({\theta }_{x\to y}\right)\left(1\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\left(0\right)+\mathrm{cos}\left({\theta }_{x\to y}\right)\left(1\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\left(0\right)\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\left(1\right)+\mathrm{sin}\left({\theta }_{x\to y}\right)\left(0\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)\left(1\right)-\mathrm{cos}\left({\theta }_{x\to y}\right)\left(0\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\left(1\right)\end{array}\right)\\ \overline{)\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}\end{array}$

Then after applying ${\theta }_{x\to y}=\mathrm{arctan}\left(\frac{y}{x}\right)$ and ${\theta }_{x\to z}=\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)$, since $\mathrm{cos}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)=\frac{x}{\sqrt{{x}^{2}+{y}^{2}}}$, $\mathrm{sin}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)=\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}$, $\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)=\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}$, and $\mathrm{sin}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)=\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}$, we have:

$\begin{array}{c}\overline{)\left(\begin{array}{ccc}\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{cos}\left({\theta }_{x\to z}\right)& \mathrm{sin}\left({\theta }_{x\to z}\right)\\ -\mathrm{sin}\left({\theta }_{x\to y}\right)& \mathrm{cos}\left({\theta }_{x\to y}\right)& 0\\ -\mathrm{cos}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)& -\mathrm{sin}\left({\theta }_{x\to y}\right)\mathrm{sin}\left({\theta }_{x\to z}\right)& \mathrm{cos}\left({\theta }_{x\to z}\right)\end{array}\right)}\\ \left(\begin{array}{ccc}\mathrm{cos}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)& \mathrm{sin}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)\mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)& \mathrm{sin}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)\\ -\mathrm{sin}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)& \mathrm{cos}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)& 0\\ -\mathrm{cos}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)\mathrm{sin}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)& -\mathrm{sin}\left(\mathrm{arctan}\left(\frac{y}{x}\right)\right)\mathrm{sin}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)& \mathrm{cos}\left(\mathrm{arctan}\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}}}\right)\right)\end{array}\right)\\ \left(\begin{array}{ccc}\left(\frac{x}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}\right)\left(\frac{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)& \left(\frac{y}{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}\right)\left(\frac{\overline{)\sqrt{{x}^{2}+{y}^{2}}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)& \left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)\\ -\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\right)& \left(\frac{x}{\sqrt{{x}^{2}+{y}^{2}}}\right)& 0\\ -\left(\frac{x}{\sqrt{{x}^{2}+{y}^{2}}}\right)\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)& -\left(\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}\right)\left(\frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)& \left(\frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\right)\end{array}\right)\\ \overline{)\left(\begin{array}{ccc}\frac{x}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& \frac{y}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& \frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\\ -\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}& \frac{x}{\sqrt{{x}^{2}+{y}^{2}}}& 0\\ -\frac{xz}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& -\frac{yz}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& \frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\end{array}\right)}\end{array}$

Therefore, since $r=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}$, we have:

$\begin{array}{rrr}\hfill \left(\begin{array}{ccc}\frac{x}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& \frac{y}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& \frac{z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\\ -\frac{y}{\sqrt{{x}^{2}+{y}^{2}}}& \frac{x}{\sqrt{{x}^{2}+{y}^{2}}}& 0\\ -\frac{xz}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& -\frac{yz}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}& \frac{\sqrt{{x}^{2}+{y}^{2}}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\\ \hfill \left(\begin{array}{c}\frac{{x}^{2}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}+\frac{{y}^{2}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}+\frac{{z}^{2}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\\ -\overline{)\frac{xy}{\sqrt{{x}^{2}+{y}^{2}}}}+\overline{)\frac{xy}{\sqrt{{x}^{2}+{y}^{2}}}}+0\\ -\frac{{x}^{2}z}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}-\frac{{y}^{2}z}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}+\frac{\left(\sqrt{{x}^{2}+{y}^{2}}\right)z}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\\ \hfill \left(\begin{array}{c}\frac{{x}^{2}+{y}^{2}+{z}^{2}}{\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\\ 0\\ \frac{-{x}^{2}z-{y}^{2}z+\left({x}^{2}+{y}^{2}\right)z}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\\ \hfill \left(\begin{array}{c}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\\ 0\\ \frac{-\overline{){x}^{2}z}-\overline{){y}^{2}z}+\overline{){x}^{2}z}+\overline{){y}^{2}z}}{\sqrt{{x}^{2}+{y}^{2}}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}}\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\\ \hfill \left(\begin{array}{c}\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\\ 0\\ 0\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\\ \hfill \left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)& \hfill =& \hfill \left(\begin{array}{c}r\\ 0\\ 0\end{array}\right)\end{array}$

This site uses Akismet to reduce spam. Learn how your comment data is processed.