# Three-dimensional rotation operator

Last updated

## Contents

The three Euler rotations are one way to bring a rigid body to any desired orientation by sequentially making rotations about axis' fixed relative to the object. However, this can also be achieved with one single rotation (Euler's rotation theorem). Using the concepts of linear algebra it is shown how this single rotation can be performed.

## Mathematical formulation

Let (ê1, ê2, ê3) be a coordinate system fixed in the body that through a change in orientation A is brought to the new directions

$\mathbf {A} {\hat {e}}_{1},\mathbf {A} {\hat {e}}_{2},\mathbf {A} {\hat {e}}_{3}.$ Any vector

${\bar {x}}=x_{1}{\hat {e}}_{1}+x_{2}{\hat {e}}_{2}+x_{3}{\hat {e}}_{3}$ rotating with the body is then brought to the new direction

$\mathbf {A} {\bar {x}}=x_{1}\mathbf {A} {\hat {e}}_{1}+x_{2}\mathbf {A} {\hat {e}}_{2}+x_{3}\mathbf {A} {\hat {e}}_{3},$ that is to say, this is a linear operator

The matrix of this operator relative to the coordinate system (ê1, ê2, ê3) is

${\begin{bmatrix}A_{11}&A_{12}&A_{13}\\A_{21}&A_{22}&A_{23}\\A_{31}&A_{32}&A_{33}\end{bmatrix}}={\begin{bmatrix}\langle {\hat {e}}_{1}|\mathbf {A} {\hat {e}}_{1}\rangle &\langle {\hat {e}}_{1}|\mathbf {A} {\hat {e}}_{2}\rangle &\langle {\hat {e}}_{1}|\mathbf {A} {\hat {e}}_{3}\rangle \\\langle {\hat {e}}_{2}|\mathbf {A} {\hat {e}}_{1}\rangle &\langle {\hat {e}}_{2}|\mathbf {A} {\hat {e}}_{2}\rangle &\langle {\hat {e}}_{2}|\mathbf {A} {\hat {e}}_{3}\rangle \\\langle {\hat {e}}_{3}|\mathbf {A} {\hat {e}}_{1}\rangle &\langle {\hat {e}}_{3}|\mathbf {A} {\hat {e}}_{2}\rangle &\langle {\hat {e}}_{3}|\mathbf {A} {\hat {e}}_{3}\rangle \end{bmatrix}}.$ As

$\sum _{k=1}^{3}A_{ki}A_{kj}=\langle \mathbf {A} {\hat {e}}_{i}|\mathbf {A} {\hat {e}}_{j}\rangle ={\begin{cases}0,&i\neq j,\\1,&i=j,\end{cases}}$ or equivalently in matrix notation

${\begin{bmatrix}A_{11}&A_{12}&A_{13}\\A_{21}&A_{22}&A_{23}\\A_{31}&A_{32}&A_{33}\end{bmatrix}}^{\mathsf {T}}{\begin{bmatrix}A_{11}&A_{12}&A_{13}\\A_{21}&A_{22}&A_{23}\\A_{31}&A_{32}&A_{33}\end{bmatrix}}={\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}},$ the matrix is orthogonal and as a right-handed base vector system is reorientated into another right-handed system the determinant of this matrix has the value 1.

### Rotation around an axis

Let (ê1, ê2, ê3) be an orthogonal positively oriented base vector system in R3. The linear operator "rotation by angle θ around the axis defined by ê3" has the matrix representation

${\begin{bmatrix}Y_{1}\\Y_{2}\\Y_{3}\end{bmatrix}}={\begin{bmatrix}\cos \theta &-\sin \theta &0\\\sin \theta &\cos \theta &0\\0&0&1\end{bmatrix}}{\begin{bmatrix}X_{1}\\X_{2}\\X_{3}\end{bmatrix}}$ relative to this basevector system. This then means that a vector

${\bar {x}}={\begin{bmatrix}{\hat {e}}_{1}&{\hat {e}}_{2}&{\hat {e}}_{3}\end{bmatrix}}{\begin{bmatrix}X_{1}\\X_{2}\\X_{3}\end{bmatrix}}$ is rotated to the vector

${\bar {y}}={\begin{bmatrix}{\hat {e}}_{1}&{\hat {e}}_{2}&{\hat {e}}_{3}\end{bmatrix}}{\begin{bmatrix}Y_{1}\\Y_{2}\\Y_{3}\end{bmatrix}}$ by the linear operator. The determinant of this matrix is

$\det {\begin{bmatrix}\cos \theta &-\sin \theta &0\\\sin \theta &\cos \theta &0\\0&0&1\end{bmatrix}}=1,$ and the characteristic polynomial is

{\begin{aligned}{\begin{vmatrix}\cos \theta -\lambda &-\sin \theta &0\\\sin \theta &\cos \theta -\lambda &0\\0&0&1-\lambda \end{vmatrix}}&=\left(\left(\cos \theta -\lambda \right)^{2}+\sin ^{2}\theta \right)(1-\lambda )\\&=-\lambda ^{3}+(2\cos \theta +1)\lambda ^{2}-(2\cos \theta +1)\lambda +1.\end{aligned}} The matrix is symmetric if and only if sin θ = 0, that is, for θ = 0 and θ = π. The case θ = 0 is the trivial case of an identity operator. For the case θ = π the characteristic polynomial is

$-(\lambda -1)\left(\lambda +1\right)^{2},$ so the rotation operator has the eigenvalues

$\lambda =1,\quad \lambda =-1.$ The eigenspace corresponding to λ = 1 is all vectors on the rotation axis, namely all vectors

${\bar {x}}=\alpha {\hat {e}}_{3},\quad -\infty <\alpha <\infty .$ The eigenspace corresponding to λ = −1 consists of all vectors orthogonal to the rotation axis, namely all vectors

${\bar {x}}=\alpha {\hat {e}}_{1}+\beta {\hat {e}}_{2},\quad -\infty <\alpha <\infty ,\quad -\infty <\beta <\infty .$ For all other values of θ the matrix is not symmetric and as sin2θ > 0 there is only the eigenvalue λ = 1 with the one-dimensional eigenspace of the vectors on the rotation axis:

${\bar {x}}=\alpha {\hat {e}}_{3},\quad -\infty <\alpha <\infty .$ The rotation matrix by angle θ around a general axis of rotation k is given by Rodrigues' rotation formula.

$\mathbf {R} =\mathbf {I} \cos \theta +[\mathbf {k} ]_{\times }\sin \theta +(1-\cos \theta )\mathbf {k} \mathbf {k} ^{\mathsf {T}},$ where I is the identity matrix and [k]× is the dual 2-form of k or cross product matrix,

$[\mathbf {k} ]_{\times }={\begin{bmatrix}0&-k_{3}&k_{2}\\k_{3}&0&-k_{1}\\-k_{2}&k_{1}&0\end{bmatrix}}.$ Note that [k]× satisfies [k]×v = k × v for all vectors v.

### The general case

The operator "rotation by angle θ around a specified axis" discussed above is an orthogonal mapping and its matrix relative to any base vector system is therefore an orthogonal matrix. Furthermore its determinant has the value 1. A non-trivial fact is the opposite, that for any orthogonal linear mapping in R3 with determinant 1 there exist base vectors ê1, ê2, ê3 such that the matrix takes the "canonical form"

${\begin{bmatrix}\cos \theta &-\sin \theta &0\\\sin \theta &\cos \theta &0\\0&0&1\end{bmatrix}}$ for some value of θ. In fact, if a linear operator has the orthogonal matrix

${\begin{bmatrix}A_{11}&A_{12}&A_{13}\\A_{21}&A_{22}&A_{23}\\A_{31}&A_{32}&A_{33}\end{bmatrix}}$ relative to some base vector system (1, 2, 3) and this matrix is symmetric, the "symmetric operator theorem" valid in Rn (any dimension) applies saying that it has n orthogonal eigenvectors. This means for the 3-dimensional case that there exists a coordinate system ê1, ê2, ê3 such that the matrix takes the form

${\begin{bmatrix}B_{11}&0&0\\0&B_{22}&0\\0&0&B_{33}\end{bmatrix}}.$ As it is an orthogonal matrix these diagonal elements Bii are either 1 or −1. As the determinant is 1 these elements are either all 1 or one of the elements is 1 and the other two are −1. In the first case it is the trivial identity operator corresponding to θ = 0. In the second case it has the form

${\begin{bmatrix}-1&0&0\\0&-1&0\\0&0&1\end{bmatrix}}$ if the basevectors are numbered such that the one with eigenvalue 1 has index 3. This matrix is then of the desired form for θ = π.

If the matrix is asymmetric, the vector

${\bar {E}}=\alpha _{1}{\hat {f}}_{1}+\alpha _{2}{\hat {f}}_{2}+\alpha _{3}{\hat {f}}_{3},$ where

$\alpha _{1}={\frac {A_{32}-A_{23}}{2}},\quad \alpha _{2}={\frac {A_{13}-A_{31}}{2}},\quad \alpha _{3}={\frac {A_{21}-A_{12}}{2}}$ is nonzero. This vector is an eigenvector with eigenvalue λ = 1. Setting

${\hat {e}}_{3}={\frac {\bar {E}}{|{\bar {E}}|}}$ and selecting any two orthogonal unit vectors ê1 and ê2 in the plane orthogonal to ê3 such that ê1, ê2, ê3 form a positively oriented triple, the operator takes the desired form with

{\begin{aligned}\cos \theta &={\frac {A_{11}+A_{22}+A_{33}-1}{2}},\\\sin \theta &=|{\bar {E}}|.\end{aligned}} The expressions above are in fact valid also for the case of a symmetric rotation operator corresponding to a rotation with θ = 0 or θ = π. But the difference is that for θ = π the vector

${\bar {E}}=\alpha _{1}{\hat {f}}_{1}+\alpha _{2}{\hat {f}}_{2}+\alpha _{3}{\hat {f}}_{3}$ is zero and of no use for finding the eigenspace of eigenvalue 1, and thence the rotation axis.

Defining E4 as cos θ the matrix for the rotation operator is

${\frac {1-E_{4}}{E_{1}^{2}+E_{2}^{2}+E_{3}^{2}}}{\begin{bmatrix}E_{1}E_{1}&E_{1}E_{2}&E_{1}E_{3}\\E_{2}E_{1}&E_{2}E_{2}&E_{2}E_{3}\\E_{3}E_{1}&E_{3}E_{2}&E_{3}E_{3}\end{bmatrix}}+{\begin{bmatrix}E_{4}&-E_{3}&E_{2}\\E_{3}&E_{4}&-E_{1}\\-E_{2}&E_{1}&E_{4}\end{bmatrix}},$ provided that

$E_{1}^{2}+E_{2}^{2}+E_{3}^{2}>0.$ That is, except for the cases θ = 0 (the identity operator) and θ = π.

## Quaternions

Quaternions are defined similar to E1, E2, E3, E4 with the difference that the half angle θ/2 is used instead of the full angle θ. This means that the first 3 components q1, q2, q3 components of a vector defined from

$q_{1}{\hat {f}}_{1}+q_{2}{\hat {f}}_{2}+q_{3}{\hat {f}}_{1}=\sin {\frac {\theta }{2}},\quad {\hat {e}}_{3}={\frac {\sin {\frac {\theta }{2}}}{\sin \theta }},\quad {\bar {E}},$ and that the fourth component is the scalar

$q_{4}=\cos {\frac {\theta }{2}}.$ As the angle θ defined from the canonical form is in the interval

$0\leq \theta \leq \pi ,$ one would normally have that q4 ≥ 0. But a "dual" representation of a rotation with quaternions is used, that is to say (q1, q2, q3, q4)}} and (−q1, −q2, −'q3, −q4) are two alternative representations of one and the same rotation.

The entities Ek are defined from the quaternions by

{\begin{aligned}E_{1}&=2q_{4}q_{1},\quad E_{2}=2q_{4}q_{2},\quad E_{3}=2q_{4}q_{3},\\[8px]E_{4}&=q_{4}^{2}-\left(q_{1}^{2}+q_{2}^{2}+q_{3}^{2}\right).\end{aligned}} Using quaternions the matrix of the rotation operator is

${\begin{bmatrix}2\left(q_{1}^{2}+q_{4}^{2}\right)-1&2\left(q_{1}q_{2}-q_{3}q_{4}\right)&2\left(q_{1}q_{3}+q_{2}q_{4}\right)\\2\left(q_{1}q_{2}+q_{3}q_{4}\right)&2\left(q_{2}^{2}+q_{4}^{2}\right)-1&2\left(q_{2}q_{3}-q_{1}q_{4}\right)\\2\left(q_{1}q_{3}-q_{2}q_{4}\right)&2\left(q_{2}q_{3}+q_{1}q_{4}\right)&2\left(q_{3}^{2}+q_{4}^{2}\right)-1\end{bmatrix}}.$ ## Numerical example

Consider the reorientation corresponding to the Euler angles α = 10°, β = 20°, γ = 30° relative to a given base vector system (1, 2, 3). The corresponding matrix relative to this base vector system is (see Euler angles#Matrix orientation)

${\begin{bmatrix}0.771281&-0.633718&0.059391\\0.613092&0.714610&-0.336824\\0.171010&0.296198&0.939693\end{bmatrix}},$ and the quaternion is

$(0.171010,-0.030154,0.336824,0.925417).$ The canonical form of this operator

${\begin{bmatrix}\cos \theta &-\sin \theta &0\\\sin \theta &\cos \theta &0\\0&0&1\end{bmatrix}}$ with θ = 44.537° is obtained with

${\hat {e}}_{3}=(0.451272,-0.079571,0.888832).$ The quaternion relative to this new system is then

$(0,0,0.378951,0.925417)=\left(0,0,\sin {\frac {\theta }{2}},\cos {\frac {\theta }{2}}\right).$ Instead of making the three Euler rotations 10°, 20°, 30° the same orientation can be reached with one single rotation of size 44.537° around ê3.

## Related Research Articles In mathematical physics and mathematics, the Pauli matrices are a set of three 2 × 2 complex matrices which are Hermitian and unitary. Usually indicated by the Greek letter sigma, they are occasionally denoted by tau when used in connection with isospin symmetries.

Kinematics is a subfield of physics, developed in classical mechanics, that describes the motion of points, bodies (objects), and systems of bodies without considering the forces that cause them to move. Kinematics, as a field of study, is often referred to as the "geometry of motion" and is occasionally seen as a branch of mathematics. A kinematics problem begins by describing the geometry of the system and declaring the initial conditions of any known values of position, velocity and/or acceleration of points within the system. Then, using arguments from geometry, the position, velocity and acceleration of any unknown parts of the system can be determined. The study of how forces act on bodies falls within kinetics, not kinematics. For further details, see analytical dynamics.

In linear algebra, an orthogonal matrix, or orthonormal matrix, is a real square matrix whose columns and rows are orthonormal vectors. An ellipsoid is a surface that may be obtained from a sphere by deforming it by means of directional scalings, or more generally, of an affine transformation. In mathematics, a unit vector in a normed vector space is a vector of length 1. A unit vector is often denoted by a lowercase letter with a circumflex, or "hat", as in .

Ray transfer matrix analysis is a mathematical form for performing ray tracing calculations in sufficiently simple problems which can be solved considering only paraxial rays. Each optical element is described by a 2×2 ray transfer matrix which operates on a vector describing an incoming light ray to calculate the outgoing ray. Multiplication of the successive matrices thus yields a concise ray transfer matrix describing the entire optical system. The same mathematics is also used in accelerator physics to track particles through the magnet installations of a particle accelerator, see electron optics.

In mechanics and geometry, the 3D rotation group, often denoted SO(3), is the group of all rotations about the origin of three-dimensional Euclidean space under the operation of composition. By definition, a rotation about the origin is a transformation that preserves the origin, Euclidean distance, and orientation. Every non-trivial rotation is determined by its axis of rotation and its angle of rotation. Composing two rotations results in another rotation; every rotation has a unique inverse rotation; and the identity map satisfies the definition of a rotation. Owing to the above properties, the set of all rotations is a group under composition. Rotations are not commutative, making it a nonabelian group. Moreover, the rotation group has a natural structure as a manifold for which the group operations are smoothly differentiable; so it is in fact a Lie group. It is compact and has dimension 3.

In mathematics, particularly in linear algebra, a skew-symmetricmatrix is a square matrix whose transpose equals its negative. That is, it satisfies the condition In physics and mathematics, the Lorentz group is the group of all Lorentz transformations of Minkowski spacetime, the classical and quantum setting for all (non-gravitational) physical phenomena. The Lorentz group is named for the Dutch physicist Hendrik Lorentz.

In linear algebra, a QR decomposition, also known as a QR factorization or QU factorization, is a decomposition of a matrix A into a product A = QR of an orthogonal matrix Q and an upper triangular matrix R. QR decomposition is often used to solve the linear least squares problem and is the basis for a particular eigenvalue algorithm, the QR algorithm. Rotation in mathematics is a concept originating in geometry. Any rotation is a motion of a certain space that preserves at least one point. It can describe, for example, the motion of a rigid body around a fixed point. Rotation can have sign : a clockwise rotation is a negative magnitude so a counterclockwise turn has a positive magnitude. A rotation is different from other types of motions: translations, which have no fixed points, and (hyperplane) reflections, each of them having an entire (n − 1)-dimensional flat of fixed points in a n-dimensional space.

In linear algebra, linear transformations can be represented by matrices. If is a linear transformation mapping to and is a column vector with entries, then

In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix In geometry, Euler's rotation theorem states that, in three-dimensional space, any displacement of a rigid body such that a point on the rigid body remains fixed, is equivalent to a single rotation about some axis that runs through the fixed point. It also means that the composition of two rotations is also a rotation. Therefore the set of rotations has a group structure, known as a rotation group.

In the theory of three-dimensional rotation, Rodrigues' rotation formula, named after Olinde Rodrigues, is an efficient algorithm for rotating a vector in space, given an axis and angle of rotation. By extension, this can be used to transform all three basis vectors to compute a rotation matrix in SO(3), the group of all rotation matrices, from an axis–angle representation. In other words, the Rodrigues' formula provides an algorithm to compute the exponential map from so(3), the Lie algebra of SO(3), to SO(3) without actually computing the full matrix exponential.

Spatial rotations in three dimensions can be parametrized using both Euler angles and unit quaternions. This article explains how to convert between the two representations. Actually this simple use of "quaternions" was first presented by Euler some seventy years earlier than Hamilton to solve the problem of magic squares. For this reason the dynamics community commonly refers to quaternions in this application as "Euler parameters".

In linear algebra, an idempotent matrix is a matrix which, when multiplied by itself, yields itself. That is, the matrix is idempotent if and only if . For this product to be defined, must necessarily be a square matrix. Viewed this way, idempotent matrices are idempotent elements of matrix rings.

In geometry, various formalisms exist to express a rotation in three dimensions as a mathematical transformation. In physics, this concept is applied to classical mechanics where rotational kinematics is the science of quantitative description of a purely rotational motion. The orientation of an object at a given instant is described with the same tools, as it is defined as an imaginary rotation from a reference placement in space, rather than an actually observed rotation from a previous placement in space. In mathematics, the axis–angle representation of a rotation parameterizes a rotation in a three-dimensional Euclidean space by two quantities: a unit vector e indicating the direction of an axis of rotation, and an angle θ describing the magnitude of the rotation about the axis. Only two numbers, not three, are needed to define the direction of a unit vector e rooted at the origin because the magnitude of e is constrained. For example, the elevation and azimuth angles of e suffice to locate it in any particular Cartesian coordinate frame.

Common integrals in quantum field theory are all variations and generalizations of Gaussian integrals to the complex plane and to multiple dimensions. Other integrals can be approximated by versions of the Gaussian integral. Fourier integrals are also considered.

• Shilov, Georgi (1961), An Introduction to the Theory of Linear Spaces, Prentice-Hall, Library of Congress 61-13845.