Ma · Mathematics

How to Find the Inverse of a Rigid Transformation

Published By the 9to5Science editorial team

At a glance

  1. 1. Write the transformation

    Express a Euclidean rigid transformation as T(x) = Qx + b, where Q is orthogonal and b is a translation.

  2. 2. Undo the translation

    Subtract b from the transformed point.

  3. 3. Undo the rotation or reflection

    Apply Q transpose, which is the inverse of an orthogonal matrix.

  4. 4. Reverse compositions

    For a sequence of transformations, invert each one in reverse order.

A rigid transformation moves points without changing distances. To find its inverse, undo the operations in reverse order. In Euclidean coordinates, this is especially simple: a rigid transformation consists of an orthogonal linear map (a rotation, reflection, or combination) and a translation.

The inverse formula

Write a rigid transformation of Rn\mathbb{R}^n as

T(x)=Qx+b,T(x)=Qx+b,

where QQ is an orthogonal matrix and bb is a fixed vector. Orthogonality means QTQ=IQ^TQ=I, so Q−1=QTQ^{-1}=Q^T. Given the transformed point y=T(x)y=T(x), first subtract the translation and then undo the orthogonal map:

T−1(y)=QT(y−b).T^{-1}(y)=Q^T(y-b).

Equivalently, the inverse is the affine map

T−1(y)=QTy−QTb.T^{-1}(y)=Q^Ty-Q^Tb.

The order matters. The original map applies QQ first and then adds bb; its inverse subtracts bb first and then applies QTQ^T.

Worked example in the plane

Consider a counterclockwise rotation by 90∘90^\circ followed by a translation by (2,−1)(2,-1). The rotation matrix and translation vector are

Q=(0−110),b=(2−1).Q=\begin{pmatrix}0&-1\\1&0\end{pmatrix}, \qquad b=\begin{pmatrix}2\\-1\end{pmatrix}.

For a point (x,y)(x,y), the transformation is

T(xy)=Q(xy)+b=(−y+2x−1).T\begin{pmatrix}x\\y\end{pmatrix} =Q\begin{pmatrix}x\\y\end{pmatrix}+b =\begin{pmatrix}-y+2\\x-1\end{pmatrix}.

To invert it, transpose QQ and subtract bb from the output point (u,v)(u,v):

T−1(uv)=QT((uv)−(2−1))=(01−10)(u−2v+1)=(v+12−u).\begin{aligned} T^{-1}\begin{pmatrix}u\\v\end{pmatrix} &=Q^T\left(\begin{pmatrix}u\\v\end{pmatrix}-\begin{pmatrix}2\\-1\end{pmatrix}\right)\\ &=\begin{pmatrix}0&1\\-1&0\end{pmatrix} \begin{pmatrix}u-2\\v+1\end{pmatrix}\\ &=\begin{pmatrix}v+1\\2-u\end{pmatrix}. \end{aligned}

For a check, T(3,4)=(−2,2)T(3,4)=(-2,2). Applying the inverse gives T−1(−2,2)=(3,4)T^{-1}(-2,2)=(3,4), as required.

Why the inverse is also rigid

A rigid transformation preserves distances: for any points x1x_1 and x2x_2,

∥T(x1)−T(x2)∥=∥x1−x2∥.\|T(x_1)-T(x_2)\|=\|x_1-x_2\|.

Let y1=T(x1)y_1=T(x_1) and y2=T(x2)y_2=T(x_2). Then

∥T−1(y1)−T−1(y2)∥=∥x1−x2∥=∥y1−y2∥.\|T^{-1}(y_1)-T^{-1}(y_2)\| =\|x_1-x_2\| =\|y_1-y_2\|.

Thus the inverse preserves distances too. Since a rigid transformation is bijective, its inverse is defined on the whole space. In matrix terms, the inverse has orthogonal part QTQ^T and translation part −QTb-Q^Tb, so it has the same rigid-transformation form.

Inverting a sequence of transformations

If a transformation is a composition, reverse the order when taking its inverse. For example, if T=T2∘T1T=T_2\circ T_1 (apply T1T_1 first, then T2T_2), then

T−1=T1−1∘T2−1.T^{-1}=T_1^{-1}\circ T_2^{-1}.

You can see this by undoing the last operation first: T2−1T_2^{-1} removes T2T_2, and then T1−1T_1^{-1} removes T1T_1. This rule applies whether the individual steps are translations, rotations, or reflections.

Common mistakes

  • Negating the translation without accounting for the rotation. The inverse translation is −QTb-Q^Tb, not generally −b-b. It is −b-b only when QTb=bQ^Tb=b.
  • Using QQ instead of QTQ^T. A rotation is undone by the inverse rotation; for an orthogonal matrix, that inverse is its transpose.
  • Keeping the original operation order. For a composition, the last operation performed must be the first one undone.
  • Confusing a rigid transformation with a distance-preserving map into a smaller subset. The formula above assumes the usual Euclidean rigid transformation, which is a bijection from the space to itself. A distance-preserving map that is not onto has an inverse only on its image.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.