11
$\begingroup$

I'd like to have some numerically simple examples of $3 \times 3$ rotation matrices that are easy to handle in hand calculations (using only your brain and a pencil). Matrices that contain too many zeros and ones are boring, and ones with square roots are undesirable. A good example is something like $$ M = \frac19 \begin{bmatrix} 1 & -4 & 8 \\ 8 & 4 & 1 \\ -4 & 7 & 4 \end{bmatrix} $$ Does anyone have any other examples, or a process for generating them?

One general formula for a rotation matrix is given here. So one possible approach would be to choose $u_x$, $u_y$, $u_z$ and $\theta$ so that you get something simple. Simple enough for hand calculations, but not trivial. Like the example given above.

$\endgroup$
2
  • 1
    $\begingroup$ rotation matrix you meant?ok there is examples en.wikipedia.org/wiki/Rotation_matrix $\endgroup$ Dec 15 '13 at 8:06
  • 1
    $\begingroup$ Yes, that's what I meant. The Wikipedia page has one example that's not too bad -- the one that begins with $Q = (0.64 \quad 0.36 \quad \ldots)$. But, still, how would you like to multiply this matrix by its transpose, by hand ?? Nasty, right?$. $\endgroup$
    – bubba
    Dec 15 '13 at 8:14
11
$\begingroup$

Whenever I get a chance to teach Linear algebra I do things like the following to produce "nice" rotation matrices. The basic idea is that a composition of two reflections is always a rotation. Restricting myself to 3D in what follows.

The reason why I think this fits the bill here is that reflections usually have nice matrices. If we reflect $\Bbb{R}^3$ w.r.t. to the plane with normal $\vec{n}=(n_1,n_2,n_3)$, then that reflection $s$ is given by the recipe $$ s(\vec{x})=\vec{x}-2\,\frac{\vec{x}\cdot\vec{n}}{\Vert\vec{n}\Vert^2}\vec{n}. $$ If $\vec{n}$ has rational components, then the matrix of $s$ w.r.t. the standard basis will have rational entries. As we need two reflection to get a rotation, we can either multiply two such matrices, or may be use a very easy choice of $\vec{n}$ for the other.

For example, the reflection w.r.t. the plane $3x+2y+z=0$ with $\vec{n}=(3,2,1)$ sends $$ \begin{aligned} (1,0,0)&\mapsto(1,0,0)-\frac37(3,2,1)=\frac17(-2,-6,-3),\\ (0,1,0)&\mapsto(0,1,0)-\frac27(3,2,1)=\frac17(-6,3,-2),\\ (0,0,1)&\mapsto(0,0,1)-\frac17(3,2,1)=\frac17(-3,-2,6). \end{aligned} $$ If we (post)compose this with the reflection $(x,y,z)\mapsto(-x,y,z)$, we get the rotation represented by the matrix $$ R=\frac17\left( \begin{array}{rrr} 2&6&3\\ -6&3&-2\\ -3&-2&6 \end{array}\right). $$ The axis of rotation here has to be a vector that is perpendicular to both $\vec{n}$ and $(1,0,0)$ (the normal of the second plane of reflection). The cross product $\vec{w}=(0,-1,2)$ is one such vector, and you can easily verify that $R(0,-1,2)^T=(0,-1,2)^T$.

$\endgroup$
5
  • $\begingroup$ An excellent approach - this will generally produce even 'smaller' matrices than my method. This is the way to go, for sure. $\endgroup$ Dec 15 '13 at 9:15
  • $\begingroup$ A reflection maps an orthonormal system of vectors to another orthonormal system, but reverses the handedness. To correct the handedness either permute the set of vectors, replace one with its negative, or do another reflection. Your pick! $\endgroup$ Dec 15 '13 at 9:32
  • 1
    $\begingroup$ I think both ideas are very good. Jyrki's method gives us some good matrices, and then multiplying them together (Steven's idea) lets us generate new matrices from old. $\endgroup$
    – bubba
    Dec 15 '13 at 9:39
  • $\begingroup$ This brings up an interesting point -- how many "small" rotation matrices are there (say ones where all numerators and denominators consist of a single digit, or two digits)? I'll ask another question. $\endgroup$
    – bubba
    Dec 15 '13 at 9:41
  • $\begingroup$ @bubba: Some answers may come from the papers linked to by Will Jagy here. $\endgroup$ Aug 30 '17 at 18:18
5
$\begingroup$

Here are some:

$$\left[ \begin {array}{ccc} 1/3&2/3&2/3\\ 2/3&-2/3&1/3\\ 2/3&1/3&-2/3\end {array} \right] $$ $$\left[ \begin {array}{ccc} 2/7&3/7&6/7\\ 3/7&-6/7&2/7\\ 6/7&2/7&-3/7\end {array} \right] $$ $$ \left[ \begin {array}{ccc} \frac{2}{11}&{\frac {6}{11}}&{\frac {9}{11}}\\ -{\frac {6}{11}}&-{\frac {7}{11}}&{\frac {6}{11}} \\ {\frac {9}{11}}&-{\frac {6}{11}}&\frac{2}{11}\end {array} \right] $$

EDIT: here are the small positive integer solutions of $a^2 + b^2 + c^2 = d^2$ with $a \le b \le c$ and $\gcd(a,b,c,d)=1$, in order of increasing $b^2 + c^2$:

$$\eqalign{1^2 + 2^2 + 2^2 &= 3^2\cr 2^2 + 3^2 + 6^2 &= 7^2\cr 4^2 + 4^2 + 7^2 &= 9^2\cr 1^2 + 4^2 + 8^2 &= 9^2\cr 6^2 + 6^2 + 7^2 &= 11^2\cr 2^2 + 6^2 + 9^2 &= 11^2\cr 3^2 + 4^2 + 12^2 &= 13^2\cr 2^2 + 10^2 + 11^2 &= 15^2\cr 2^2 + 5^2 + 14^2 &= 15^2\cr 8^2 + 9^2 + 12^2 &= 17^2\cr 1^2 + 12^2 + 12^2 &= 17^2\cr }$$

$\endgroup$
3
  • $\begingroup$ Very nice. Especially the first one. How did you generate these? $\endgroup$
    – bubba
    Dec 15 '13 at 9:18
  • $\begingroup$ @bubba: You get the first (up to sign chances) from the general recipe of my answer with the choice $\vec{n}=(1,1,1)$. +1, of course! $\endgroup$ Dec 15 '13 at 9:23
  • $\begingroup$ It seems like the key is to find a unit vector with rational components. Or, equivalently, find small integers $a$, $b$, $c$, $d$ with $a^2 + b^2 + c^2 = d^2$. There can't be very many of these. $\endgroup$
    – bubba
    Dec 15 '13 at 9:23
4
$\begingroup$

Keep in mind that the product of two rational matrices is going to be a rational matrix too. This allows you to build plenty of rational rotaton matrices by composing them. For instance: $$ \frac15 \begin{pmatrix} 3 & 4 & 0 \\ -4 & 3 & 0 \\ 0 & 0 & 5 \end{pmatrix} \cdot \frac1{13} \begin{pmatrix} 5 & 0 & -12 \\ 0 & 13 & 0 \\ 12 & 0 & 5 \end{pmatrix} = \frac1{65} \begin{pmatrix} 15 & 52 & -36 \\ -20 & 39 & 48 \\ 60 & 0 & 25 \end{pmatrix} $$ and so the latter is also a rational rotation matrix.

$\endgroup$
1
  • $\begingroup$ Good idea. Thanks. $\endgroup$
    – bubba
    Dec 15 '13 at 9:12
2
$\begingroup$

Some entries of the rotation matrix, whether $2 \times 2$ or $3 \times 3$, are the trigonometric functions; to ensure that entries of the matrix are simple numbers that are less computationally expensive, pick integer multiples of $\pi$ on which the trigonometric functions are either $1, -1$ or $0$.

Is that what you meant?

$\endgroup$
5
  • $\begingroup$ Rotation matrices with lots of zeros and ones in them typically correspond to rotations around one of the axes where the angle of rotation is a multiple of $\pi/2$. Boring (as I wrote in the question). $\endgroup$
    – bubba
    Dec 15 '13 at 8:44
  • $\begingroup$ Also, the entries of the matrix depend on the axis of rotation, too, not just on the angle. So, you have to choose the axis judiciously, too. $\endgroup$
    – bubba
    Dec 15 '13 at 8:49
  • $\begingroup$ Yes, thank you for pointing that out. You can consider all other rotations in the Cartesian plane rather than those specific multiples of pi and truncate these results to a reasonable amount of decimal points or significant figures; however, this could lead to losing accuracy if you carry out many rotations based on your first one. Or you could also consider sequences of rotations of a point or collection of points about the origin but this just gives rise to more matrix algebra which you probably don't want. $\endgroup$
    – user115834
    Dec 15 '13 at 8:55
  • $\begingroup$ And yes I understand how rotations differ based on the axis you choose to rotate about- but these matrices just have entries switched around because the angle of a right triangle that we were to construct changes as well $\endgroup$
    – user115834
    Dec 15 '13 at 8:57
  • $\begingroup$ "but these matrices just have entries switched around". This is only true if you rotate around the the principal axes (the $x$-axis, $y$-axis, or $z$-axis). To get interesting rotation matrices, the axis of rotation has to be something different from these three. The formula is here: en.wikipedia.org/wiki/… $\endgroup$
    – bubba
    Dec 15 '13 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.