First, consider the standard triangle in
R whose vertices are
,
,
,
which we can call
e
e
0. Let
be any triangle.
Problem 0.1 . Find the extended matrix of an affine
transformation that takes the standard triangle to the
triangle
(with
e
, etc.). (See Figure
.)
Solution. Let the triangle
0 be the
result of translating the triangle
so that
goes to the origin, by subtracting
from all three
vertices. Thus
and
. The desired
affine transformation consists of (1) a homogeneous linear
transformation taking
e
to
and
e
to
, followed by (2) translation by
.
Because
e
and
e
are the standard
basis vectors, the rows of the desired
matrix
for (1) are just their images. Putting (1) and (2)
together, we see that the desired transformation has
extended matrix
(to
use an obvious shorthand notation). (See Figure
.)
For example, to map the standard triangle to the
triangle with vertices
, the
extended matrix is
.
(To check that this matrix works, try multiplying the
extended vertices ,
,
by
it.)
Problem 0.2 . Find how to calculate the extended matrix of
an affine transformation that takes the triangle
to the triangle
(with
,
etc.). (See Figure
.)
Solution. Use the standard triangle as an
intermediate stage. You know how to find taking the
standard triangle to
and
taking the standard
triangle to
.
takes
back to
the standard triangle. Therefore
, so that
has extended matrix
.
(For a specific example you could put in numbers and
multiply out. If are noncollinear, so that
is a genuine triangle, then the left matrix will be
invertible as required. Computationally, one way to
calculate a product
is to write down an
extended matrix
and row-reduce it to get a
matrix
; here
will be
.)
Note. In
R, you can use the same sort of
method to move a tetrahedron to a tetrahedron.