For a vector
x, the corresponding
extended vector is
. For an affine
transformation
R
R
given by
x
x
b, the corresponding extended matrix is the
matrix
.
As you see, contains all the information
needed for
. A key observation is that if you use
extended vectors and matrices, affine transformations can be
computed with just a single matrix multiplication:
x
b
.
Application 2.1 . If you have a matrix multiplication
routine, you can use it directly to compute affine
transformations. For example, for as in Example
,
can be found by computing
, so
.
Application 2.2 . If and
are composed as in Example
, then
gives the extended matrix
for
. (Here
is the extended matrix for
and
for
.)
Application 2.3 . If has extended matrix
then
the inverse transformation
has extended matrix
(if
is invertible).
Example. Find the extended matrix for the rotation by
about the center
.
Solution. Use the three-step method of moving to
an easy location (moving the center to the origin), rotating
by , and then moving back. The middle step is a
homogeneous linear transformation, so its extended matrix
has a zero translation part. The first and third steps are
translations, so their homogeneous part is
. Thus the
answer is
.
(Notice that in the three-step method it is most natural to find the third matrix first, the one that takes the easy position to the harder position. The first matrix is the inverse of the third. Here, where the first and third are translations, the inverse is obvious.)