# Do Givens matrices commute?

Suppose I have Givens matrices (as defined here), $$G_1,...G_k$$, and some permutation $$P$$ which mapping $$\{1,..., k\}$$ to $$\{1,..., k\}$$. Is it true that:

$$G_1G_2... G_k = G_{p(1)}G_{p(2)}...G_{p(k)}$$

The reason I think this true is that I heard they represent rotations and rotations can be applied in any order. If this is not true then what is the flaw in my logic here?

• I do not understand the equation you gave, there is a comma separated list on the left hand side and a multiplication on the right? – Vinyl_cape_jawa Feb 23 at 12:05
• Here is the link for such matrices. Let us consider $k=2$. Why do we have $G_1G_2=G_2G_1$? Did you see this post? – Dietrich Burde Feb 23 at 12:09
• You might want to put the link to Givens matrices in your question (or add some basic background). This really confused me when I read it as "given matrices $G_1,\dots,G_k$, ..." the first time. – YiFan Feb 23 at 12:24
• @Bernard your edit is wrong, I'm afraid. It appears that Givens matrices are a special type of matrices; the statement is obviously not true for any "given" matrices. (See the link posted by Dietrich Burde.) – YiFan Feb 23 at 12:34
• @YiFan: Sorry for that misinterpretation. I've reverted to the original state. Thank you for informing me! – Bernard Feb 23 at 12:39

Doubt should be eliminated through experimentation. Here we examine two Given's rotations given by $$G_{13} = \begin{bmatrix} 0 & 0 & -1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix}, \quad G_{23} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{bmatrix}.$$ Let $$x = \begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix}^T$$. It is clear that $$G_{13} x = \begin{bmatrix} -x_3 \\ x_2 \\ x_1 \end{bmatrix}, \quad G_{23} G_{13} x = \begin{bmatrix} -x_3 \\ -x_1 \\ x_2 \end{bmatrix},$$ whereas $$G_{23} x = \begin{bmatrix} x_1\\ -x_3 \\ x_2 \end{bmatrix}, \quad G_{13} G_{23} x = \begin{bmatrix} -x_2 \\ -x_3 \\ x_1 \end{bmatrix}.$$ We conclude that $$G_{23}G_{13}x = G_{13} G_{23} x$$ if and only $$x_1 = x_2 = x_3$$ or equivalently $$x_j = \lambda \in \mathbb{R}$$ for $$j=1,2,3$$. It follows that Given's rotations do not commute in general.
Rotations around a common axis commute. In the example given above $$G_{13}$$ rotates around the $$x_2$$ axis, whereas $$G_{23}$$ rotates around the $$x_1$$ axis.
• Shortcut to the same answer: If rotations in $\mathbb{R}^3$ would always commute, then gimbal lock would appear at every set of Euler angles rather than at some :) – darij grinberg Feb 24 at 4:47