Vector (nonhomogeneous) methods are still being recommended to effect rotations and other linear transformations. Homogeneous matrices have the following advantages:

- simple explicit expressions exist for many familiar transformations including rotation
- these expressions are n-dimensional
- there is no need for auxiliary transformations, as in vector methods for rotation
- more general transformations can be represented (e.g. projections, translations)
- directions (ideal points) can be used as parameters of the transformation, or as inputs
- if nonsingular matrix T transforms
point P by PT, then hyperplane h is transformed by T
^{-1}h - the columns of T (as hyperplanes)
generate the null space of T by intersections

- many homogeneous transformation matrices
display the duality between invariant axes and centers.

The expressions below use reduction to echelon form and
Gram-Schmidt orthonormalization, both with slight modifications. They
can be easily coded in any higher level language so that the same procedures
generate transformations for any dimension. This article is at an undergraduate
level, but the reader should have had some exposure to linear algebra
and analytic projective geometry. This material is based on: Daniel VanArsdale,
Homogeneous Transformation Matrices for Computer Graphics, *Computers
& Graphics*, vol. 18, no. 2, pp. 177-191, 1994. Some references are given at the end; authors' names within
the text are clickable to these. A few annotated links to projective
geometry sites are also listed.

The intent of this document is to provide "cook book" information to understand, code or use the homogeneous transformation matrices presented. Derivations, proofs, and additional results appear elsewhere in a companion site: "Homogeneous Coordinates: Methods." Before reading Methods one should first browse through the conventions and procedures of sections I and II below.

I. **Definitions and Notation**

A. General B. Points C. Hyperplanes
D. Flats E. Point Matrices F. Hyperplane matrices

G. Projective transformations

II. **Three Procedures**

A. Normal B. Oriented hyperplane representation
C. Orthonormalization

III. **Transformation Matrices**

A. Projection B. General Collineation C. Affinity D. Isometry
E. Translation F. Dilation & Reflection
G. Strain & Shear H. Rotation

IV. **Longer Examples**

A. An oriented hyperplane
representation B. Projection
from a point to a line C. Rotation
in four dimensions D. Composition
of central dilations

V. **References**
and **Links**

*R ^{n} = *the

n = the

I = the n x n identity matrix. I_{s }=
the s x s identity matrix.

0 = a matrix of all zeros of appropriate size.

M^{-1 }= the inverse of square matrix M. det M
= the determinant of M.

rank(A) = the rank of a matrix A.

A **semicolon** between elements of a matrix designates
vertical stacking - begin the following element on the next line. Thus
[a,b,c; d,e,f] is the 2 x 3 matrix with first row [a,b,c] and second
row [d,e,f].

/= means not equal. <= means less than or equal

S_{1 }__c__ S_{2} means set S_{1}
is contained in, or equal to, set S_{2}.

P = [X_{1}, X_{2}, . . ., X_{n}]
= the homogeneous coordinates of **point** P, a 1 x n row matrix,
P / = 0.

For any nonzero constant c, both P and cP = [cX_{1},
cX_{2}, . . ., cX_{n}] represent the same point.

The "point" is the class of all such representations, but for
convenience we may identify a particular representation as the
point.

X_{1 }is the **homogeneous coordinate** of
point P. Often in the literature the homogeneous coordinate of a point
is placed last (X_{n}) instead.

If X_{1 }/= 0, P is **ordinary** and
corresponds to the Cartesian point (X_{2}/X_{1}, . . .,
X_{n}/X_{1}).

P (ordinary) is **normalized **if X_{1 }= 1.

If X_{1 }= 0, P is **ideal** and may
represent the direction of the Cartesian vector (X_{2}, . .
., X_{n}). In a projective context P is the same ideal point as -P
= (0, -X_{2}, . . ., -X_{n}), but in practice we
often distinguish these directions.

P (ideal) is normalized if (X_{2})^{2}
+ . . . + (X_{n})^{2} = 1.

Example: In *R ^{3}* homogeneous coordinates
[3, 2, 1] represent the same ordinary point P as coordinates [1, 2/3,
1/3], the normalized form of P. P corresponds to the point in the
plane with Cartesian coordinates (2/3, 1/3). In

h = [Y_{1};Y_{2}; . . .; Y_{n}]
= the coordinates of a **hyperplane **h, an n x 1 column matrix,
h /= 0.

For any nonzero constant c, both h and ch = [cY_{1};
cY_{2}; . . .; cY_{n}] represent the same hyperplane.
The "hyperplane" is the class of all such representations, but for
convenience we may identify a particular representation as the hyperplane.

Hyperplane h **contains** the points Q for which Qh = 0.
These points are the **null space **of h, and may be designated as
null(h) or h^{P}.

For h as above, let C = Y_{2}^{2}+. .
. + Y_{n}^{2}:

If C = 0 h is **ideal**, the unique
**hyperplane at infinity** represented by w = [1; 0; . . .; 0].

If C /= 0 h is **ordinary**, and
**normalized** if C = 1. **Normalize** any ordinary hyperplane
h by

dividing its coordinates by the positive
square root of C.

Example: In *R ^{4}* (three dimensional space)
the 4 x 1 column matrix h = [1; -1: -1; -1] represents the ordinary
plane through the points X = [1,1,0,0], Y=[1,0,1,0] and Z = [1,0,0,1]
since Xh = Yh = Zh = 0. Hyperplane h can be normalized by dividing each
component by the square root of 3.

S = a **flat of rank r** = the set of all points of
the form c_{1}P_{1} + . . .+ c_{r}P_{r},
the c_{i} any constants (not all zero), the P_{i }some
r <= n fixed independent points. As in linear algebra, the
P_{i } are called a **basis **of the flat S.
The rank of S is designated rank(S).

Flats need not contain the origin [1,0, . . ., 0].

The null set of points is considered a flat of rank zero.
*R ^{n}* is a flat of rank n. These two flats are improper, all others are proper.

Flat S is

S_{1 }^ S_{2} = the intersection (meet)
of flats S_{1} and S_{2 }, also a flat.

S_{1}v S_{2} = the union (join) of flats S_{1}
and S_{2 }, also a flat.

rank(S_{1}) + rank(S_{2}) = rank(S_{1}v
S_{2}) + rank(S_{1 }^ S_{2})
(Ayres, p. 87)

In *R ^{n}* flats S

P = a **point matrix** = any r x n matrix, P = [P_{1};
P_{2}; . . .; P_{r}], r >= 1. The 1 x n matrices
P_{i} are the rows of P, and if nonzero represent points in *R ^{n}*.
Point matrices are represented by upper case letters, or by upper
case superscripts.

P **represents **the flat spanned by its rows
P_{1}, P_{2}, . . ., P_{r}. This flat is also
called the **row space** of P, or the **union** of P_{1},
P_{2}, . . ., P_{r}. It may be designated as range(P),
or in some contexts simply by the matrix P itself.

P is **ordinary** if range(P)_{ }is ordinary.

P is **independent** if its rows P_{1}, P_{2},
. . . , P_{r} are independent.

Say P_{1}, . . ., P_{n} are n ordered
independent points in *R ^{n}* and let P = [P

h = a **hyperplane matrix** = any n x s matrix, h =
[h_{1}, h_{2}, . . . , h_{s}], s <= n. The
n x 1 matrices h_{i} are the columns of h, and if nonzero represent
hyperplanes. Hyperplane matrices are represented by lower case letters,
or by lower case superscripts.

h **represents **the **null space** of h, all points
P for which Ph = 0. This flat is the **intersection** (**meet**)
of the hyperplanes h_{1}, . . ., h_{s }and may
be designated by null(h) or h^{P}.

h is **ordinary **if h^{P} is ordinary.

h is **independent** if its columns h_{1}, h_{2},
. . ., h_{s} are independent.

If the rank of independent hyperplane matrix h in R^{n}
is s, the rank of the flat
it represents by intersections is n - s.

Example: In *R ^{4}* the x-axis can be represented
by the point matrix P = [1, 0, 0, 0; 1, 1, 0, 0] or

by the hyperplane matrix h = [h

A projective transformation
f on *R ^{n}* (real projective space of dimension n-1)
is a mapping of a set of points of R

(1) for all points P in the domain of f, Pf is represented by PT,

(2) for all points P not in the domain of f, PT = 0.

Matrix T then

For convenience we will often identify a projective transformation with a matrix that represents it.

Alternatively, if PT = 0 we can regard P as mapped to the null flat by T. Then any projective transformation maps flats to flats.

For collineation T, hyperplane h is mapped to hyperplane T

Collineations map straight lines to straight lines.

For a projective transformation f on *R ^{n}*
represented by matrix T:

The

Range(T) is a flat with rank equal to rank(T).

The

For any T, rank[T] + rank[null(T)] = n

A. The **NORMAL**, **h ^{N}**,
of a hyperplane matrix h.

In three dimensional vector space points (x, y, z) on
a plane satisfy an equation of the form Ax + By + Cz + D = 0,
(A, B, C, D constants not all zero). A normal (perpendicular) vector to
this plane is (A, B, C). Using homogeneous coordinates the plane
is represented by the column matrix h = [D; A; B; C] and points P = [k,
x, y, z] on the plane satisfy Ph = 0. The **normal **to plane h is the
ideal point represented by the row matrix [0, A, B, C], which we designate
h^{N}. For a hyperplane matrix g with more than one column,
say g = [h_{1}, h_{2}], we define g^{N} = [ h_{1}^{N};
h_{2}^{N }], an ideal point matrix with two rows. When
g is "orthonormalized" (see Procedure
C) then g^{N }g = I_{2}. Normals are used in several
of the transformation matrices below.

Procedure A: Find the normal, h^{N}, of a hyperplane matrix h.

Step 1. Transpose h.

Step 2. Set the first (homogeneous) column of the transpose to zero.

It can be shown that for any hyperplane matrix h, h and
h^{N} have the same rank if and only if h is ordinary. The normal
of the hyperplane at infinity, w, is undefined. A "normal" is an
ideal point or flat, whereas "normalization" is the unit scaling of homogenous
coordinate representations of points, hyperplanes, and matrices.

B. The **ORIENTED
HYPERPLANE REPRESENTATION**, **P ^{h}**.

A flat S in *R ^{n}* may be designated by
r independent points that generate S by their union, or by n - r independent
hyperplanes that form S by their intersection. Usually it is easier
to visualize a flat as the union of points. For example, in three dimensional
space, the axis line of a rotation could be designated by two points
it contains, and the invariant plane of a reflection may be designated
by three points on the plane. But a hyperplane representation of a
flat is very useful, and appears in most of the transformation matrices
below. Thus we need a procedure to convert from a point matrix representation
P to a hyperplane representation g, written g = P

An additional condition may be imposed on g. If the axis
of a rotation is designated as the line through points P_{1}
and P_{2} this implies a sense of rotation opposite that if the
two points are taken in the order P_{2 }and P_{1}. In converting this line
to a hyperplane representation h = [h_{1}, h_{2}] we
need to assure that the orientation of the four points P_{1},
P_{2},_{ }h_{1}^{N}, and h_{2}^{N},
in that order, is positive. This can be done by tallying a parity during
the elementary column operations ( VanArsdale
).

Procedure B: Given an r x n independent point matrix P representing flat S by unions, find an independent hyperplane matrix g = P^{h}such that: (1) g represents S by intersections, and (2) if P is ordinary, det [P; g^{N}] > 0.

Step 1. Form the (r+n) x n compound matrix [P; I]. Set variable sgn to 1.

Step 2. Reduce [P; I] by elementary column operations to matrix [Q; E] so that (i) the first r columns of Q form a lower triangular matrix with ones on the diagonal, (ii) the remaining n - r columns of Q contain all zeroes. In this reduction, whenever two columns are interchanged or a column is multiplied by a negative number, set sgn = - sgn.

Step 3. Set g = P^{h}to the last n - r columns of E. Multiply the first column of g by sgn.

With two easy modifications Procedure B can be used to
find general intersections (see Methods). An example using
Procedure B appears below (IV- A).

C. **ORTHONORMALIZATION
**of an ordinary hyperplane matrix.

In vector analysis the independent vectors v_{1},
v_{2}, . . ., v_{s} span an s-dimensional subspace,
S, by linear combinations. The familiar Gram-Schmidt orthogonalization
process uses linear combinations of the v_{i} to produce vectors
V_{1}, V_{2}, . . ., V_{s} which also span subspace
S, but are mutually orthogonal (i.e., the dot product V_{i} .
V_{j} = 0 for i /= j). (Halmos, p.
127)

With homogeneous coordinates, ordinary hyperplanes g and
h are orthogonal if g^{N} h = 0. Here g^{N}h
can be regarded as the dot product of the last n - 1 components of g
and h, since the first component of g^{N} is zero. The independent
ordinary hyperplane matrix h = [h_{1}, h_{2}, . . ., h_{s}]
represents an ordinary flat S by intersections, and each of the h_{i}
has a normal h_{i}^{N}. By applying the Gram-Schmidt orthogonalization
process to the h_{i} they will be modified so h_{i}^{N}h_{j}
= 0, i /= j. Thus, geometrically, we have constructed s
mutually orthogonal hyperplanes that intersect in S.

If we also normalize the hyperplanes h_{i} then
h_{i}^{N} h_{i} = 1 for all i. Then it follows
that h^{N} h = I_{s}. This is required for some
of our matrix formulas below. In the procedure it is convenient to retain
the same name for the original matrix and its orthonormalized output form.

Procedure C: Orthonormalize the columns of an ordinary independent hyperplane matrix g = (g_{1}, g_{2}, . . ., g_{s}) so g^{N}g = I_{s}, while preserving the null space and orientation of g.

Step 1. For i = 1 to s do steps 2 and 3

Step 2. If i > 1, for j = 1 to i - 1:

Let d = g_{j}^{N}g_{i}

_{ }Assign g_{i}= g_{i}- dg_{j}

Step 3. Normalize g_{i}

The following numbered formulas (M1, . . ., M16) give homogeneous transformation matrices T that effect familiar geometric transformations in a space of any dimension. If P is the homogeneous coordinates of a point, its transform P' is found by P' = PT.

We presume the transformations are originally designated
by one or more of the following: (1) flats that are point-wise invariant
under the transformation (e.g. an axis of a reflection), (2) scalar
parameters (e.g. a dilation factor or angle), (3) one or more points and
their known or desired transforms (e.g. for translation, the origin and
its transform). Flats are designated by independent points (arranged
as a point matrix) that generate the flat, or by independent hyperplanes
(arranged as a hyperplane matrix) that intersect in the flat. If a formula
requires a hyperplane matrix, Procedure
B can be used to convert a point matrix representation of a flat to
a hyperplane representation. If a formula requires an orthonormalized
hyperplane matrix, Procedure C can be used
to convert an ordinary hyperplane matrix to this form.

A. **PROJECTION** in
*R ^{n }*with null space the proper flat S

Represent flat S_{1} by the independent point
matrix C, and flat S_{2} (the "axis") by independent hyperplane
matrix h. Then:

**M1. T = I - h(Ch) ^{-1}C
**(VanArsdale)

The projection of points in C is not defined. For ANY
matrices C and h that can be multiplied: rank[Ch] = rank[C] - rank[range(C)^null(h)]
(Methods). Thus the square
matrix (Ch) in M1 is nonsingular since S_{1} and S_{2 }are
disjoint. For a discussion of projection and a derivation of M1 see Methods. A "projection" is just
one type of "projective transformation" - the latter including transformations
such as translation that are unrelated to projection.

When h is a hyperplane and C is a single point not on h, M1 gives

**M2. T = I - hC/Ch
**(VanArsdale)

More complicated coordinate expressions for projection appear in Hodge & Pedoe (p. 309) and other sources.

For an alternative representation of a projection from
center S_{1} to the complementary axis S_{2 }represent
S_{1} by the r x n point matrix C and S_{2} by the (n
- r) x n point matrix A. Then

**M3. T = [C; A] ^{-1}
[0; A] **(Stolfi,
p. 101)

Here "0" is the r x n matrix of all zeroes.

B. The **GENERAL COLLINEATION**
mapping the n + 1 points P_{1}, . . ., P_{n+1 }, no n
of them dependent, to the n + 1 points Q_{1}, . . . , Q_{n+1},
no n of them dependent.

Let P = [P_{1}; . . . ; P_{n}] and Q = [Q_{1};
. . . ;Q_{n}], and set c_{i} = q_{i} /
p_{i} where p_{i} is the i^{th} coordinate of
P_{n+1 }P^{-1} and q_{i} is the i^{th}
coordinate of Q_{n+1} Q^{-1}. Then

**M4. T = P ^{-1}
[c_{1}Q_{1}**;

An equivalent matrix appears in Semple
& Kneebone (p. 399) and other sources.

C. The **AFFINE **collineation
mapping ordinary independent points P_{1}, . . ., P_{n}
to ordinary independent points Q_{1}, . . . , Q_{n}.

Normalize the points P_{i} and Q_{i}, and let
P = [P_{1}; . . . ; P_{n}] and Q = [Q_{1}; .
. . ;Q_{n}]. Then

**M5. T = P ^{-1}Q**

Affine transformations map ideal points to ideal points.
Some of the pairs of points (P_{j}, Q_{j}) may be ideal
if their representations are chosen correctly (Methods). This matrix, restricted to
ordinary points and in an oriented context, appears in Stolfi (p. 158). Compare M5 to Snapper
& Troyer (p. 97), where a nonhomogeneous approach requires,
for n = 4, solving a system of 9 linear equations in 9 unknowns. M5 provides
a matrix for other affine transformations presented below, though the
resulting homogeneous transformation matrix is generally not as useful
as those developed by the "axis-center" method.

D. The **ISOMETRY **mapping
ordinary points P_{1}, . . . P_{m}, m = n -1,
to congruent (superposable) points Q_{1}, . . . , Q_{m}.

Normalize the points P_{i} and Q_{i} and let
P = [P_{1}; . . . ; P_{m}] and Q = [Q_{1 };
. . .; Q_{m}]. Calculate f = P^{h} and g = Q^{h},
f and g oriented, using procedure B. Normalize f and g. Then

**M6. T = [P; f ^{N}]^{-1
}[Q; g^{N}] **(VanArsdale)

With m = n-1 as above there are two isometries that effect
the mapping, one direct and one indirect. Matrix M6 gives the direct
isometry. For this case compare M6 to the complications of a nonhomogeneous
method for three dimensions (only) in Laub & Shiflett.
The above method can be easily adapted for m < n-1, there now being
more than one normal to P and Q. For m = n use the method above for affinities,
T = P^{-1}Q.

E. The **TRANSLATION **mapping
ordinary point P to ordinary point Q.

Let P and Q be normalized and w = [1; 0; . . .; 0] be the hyperplane
at infinity.

This matrix is obvious in coordinate form (Roberts).

F. **DILATION **by factor
d about ordinary flat S (of any rank < n).

Say S is represented by the point matrix P. Calculate g = P^{h},
a hyperplane representation of S, using Procedure B. Orthonormalize
g using Procedure C. Then

**M8. T = I + (d-1)
gg ^{N} **(VanArsdale)

This is the transformation that leaves points P on S invariant
and maps points P + V to P + dV, where V is any representation of a
point on g^{N}, the normal flat to S. The familiar examples
of dilation are central dilation (S a point), and reflection in a plane
(n = 4, S a plane, d = -1). The following matrix for dilation does
not require orthonormalization of g and depends on the fact that T is
an affinity.

**M9. T = [P; g ^{N}]
^{-1 }[P; dg^{N}]
**(VanArsdale)

**CENTRAL DILATION **by factor d about the single ordinary
point C (normalized) also has the representation

Example IV-D below shows how M10 can be used to analyze the composition of two central dilations. This matrix is obvious in coordinate form.

For **REFLECTION **in
ordinary flat S (of any rank < n) use d = -1 in M8 to get

**M11. T = I - 2gg ^{N}.**

M11, at least for a hyperplane, has appeared in several
sources.

G. The **STRAIN** or **SHEAR**
which leaves ordinary hyperplane h point-wise invariant and maps point
P to point Q, P and Q ordinary and distinct.

Normalize P and Q, then,

**M12. T = I + h(Q-P)/Ph
**(VanArsdale)

Since P and Q are distinct neither is on h, so Ph /= 0 and Qh /= 0. Strain and shear are affine, and determined by h, P and Q. For a shear, the line through P and Q must be parallel to h.

The **SHEAR** which leaves ordinary hyperplane h point-wise
invariant and maps ideal point U to ideal point V.

**M13. T = I + h(V/Vh
- U/Uh) **(VanArsdale)

Since strain and shear are both affine, homogeneous transformation
matrices based on M5 can be written for the above two transformations.

H. **ROTATION** about ordinary
flat (axis) S of rank n - 2 by angle b.

Say S is represented by the point matrix P = [P_{1};
. . . ;P_{n-2 }]. Calculate an n x 2 hyperplane representation
of S, g = P^{h}, g oriented, using procedure B. Then orthonormalize
g using procedure C so g^{N}g = I_{2} = [1, 0; 0, 1].
Calculate R = [cos b, sin b; -sin b, cos b]. Then

**M14.
T = I + g(R - I _{2})g^{N}**
(VanArsdale)

A four dimensional example of the use of M14 appears below (IV-C).

Since rotation is affine we also have:

**M15. T = [P; g ^{N}]^{-1}
[P; Rg^{N}] **(VanArsdale)

Some authors define a rotation on *R ^{n}*
as a direct isometry with an invariant point. When n > 4 such an isometry
may require a composition of rotations as defined above. For n = 3 (the
Euclidean plane) and n = 4, every rotation can be constructed as a composition
of two reflections. For any dimension, such a rotation can be characterized
as a mapping of hyperplanes.

The **ROTATION** that maps oriented hyperplane g to
oriented hyperplane h, g and h ordinary and not parallel.

Normalize g and h. Let f = g + h (add components) and normalize
f. Then,

**M16. T = [I - 2gg ^{N}]
[I - 2ff`^{N}] **(VanArsdale)

By an "oriented" hyperplane g we mean that the homogeneous
coordinates of g are chosen so that if G is any ordinary point on g, G
+ g^{N} lies in the "positive" side of g. T above maps the positive
side of g to the positive side of h. The addition of the normalized hyperplane
coordinates, f = g + h, gives a hyperplane f that bisects one of the two
dihedral angles between g and h.

**A**. **AN
ORIENTED HYPERPLANE REPRESENTATION**

Consider two points in two dimensional space (rank n =
3) with homogeneous coordinates P_{1 }= [1,2,0] and P_{2
}= [2,0,1]. These correspond to Cartesian coordinates (2,0) and (0,1/2)
respectively. The point matrix P = [P_{1}; P_{2}], a 2
x 3 matrix, represents range(P), the line through P_{1 }and P_{2}.
To find an oriented hyperplane (line) representation of range(P) use procedure
B as follows.

(1) Form the 5 x 3 matrix [P; I] where I is the 3 x 3 identity matrix. Set the variable sgn = +1.

(2) Use elementary column operations on [P; I] to reduce P to an upper triangular matrix Q with ones on the diagonal, thereby changing [P; I] to [Q: E]. This can be done by (i) interchanging the second and third columns, (ii) subtracting twice the first column from the third, and (iii) adding four times the second column to the third. The interchange operation (i) requires we reverse the sign of sgn to -1.

(3) These operations give [Q; E] with Q= [1,0,0;
2,1,0] and E = [1,0,-2; 0,0,1; 0,1,4]. Now the third column of E (under
the zero column of Q) is a 3 x 1 matrix h = [-2; 1; 4] that represents
a hyperplane (line) containing P_{1 }and P_{2}, that is,
P_{1}h = P_{2}h = 0. But to complete the third step in
the procedure we must multiply h by sgn = -1 giving **h = [2; -1; -4]**.
Then h^{N} = [0, -1, -4] and the points P_{1}, P_{2
}and h^{N} have positive orientation, i.e. det [P_{1};
P_{2}; h^{N}] = 17 > 0. Such orientation is used to
get the sense correct in formulas M6 and M14 - M16.

**B. PROJECTION
FROM A POINT TO A LINE**

In the above example we found the hyperplane representation
h = [2; -1; -4] (a 3 x 1 matrix) for the line through points P_{1
}= [1,2,0] and P_{2 }= [2,0,1]. We now seek a homogeneous
matrix that will effect projection from the point C = [1, 1, 1] onto this
line. This is given by formula M2: T = I - hC/Ch. Here Ch = -3 and hC =
[2, 2, 2; -1, -1, -1; -4, -4, -4], a 3 x 3 matrix given row by row. Then
**T = 1/3 * [5,2,2; -1,2,-1; -4,-4,-1]**. We can drop the initial factor
of 1/3 since any nonzero multiple of matrix T does not change the projective
transformation it represents. To find the projection of, for example, the
origin O = [1, 0, 0] calculate OT = [5,2,2], which corresponds to Cartesian
coordinates (2/5, 2/5).

**C. ROTATION IN FOUR
DIMENSIONS**

We find a homogeneous matrix T that will effect a rotation
in four dimensional space (n = 5), the point-wise invariant axis then
being of rank n - 2 = 3, a plane. For this example we take the axis that
contains the unit points on the x, y and z axes - a plane that does not
pass through the origin. These three points have homogeneous coordinates
P_{1} = [1,1,0,0,0], P_{2} = [1,0,1,0,0], and P_{3}
= [1,0,0,1,0], and we take them in that order to fix a sense for measuring
angles. Let P = [P_{1}; P_{2}; P_{3}]. For the
angle of rotation take b = 90 degrees.

First find an oriented hyperplane representation of the
axis, g = P^{h}, using procedure B, to get g = [g_{1},
g_{2}], where g_{1 }= [-1;1;1;1;0] and g_{2}
= [0;0;0;0;1], both 5 x 1 column matrices. By the orientation feature
of procedure B, det [P; g^{N}] > 0. Orthonormalizing g (keeping
the same variable name) using procedure C gives g = [g_{1}, g_{2}],
where now g_{1} = [-r; r; r; r; 0], r = 3^{-1/2}_{2}
= [0;0;0;0;1] as before. Calculating: R = [cos b, sin b; -sin b, cos
b] = [0, 1; -1, 0]. Then substituting in T = I + g(R - I_{2})g^{N}
(matrix M14) gives:

**T = 1/3 * [3,1,1,1,-s; 0,2,-1,-1,s;
0,-1,2,-1,s; 0,-1,-1,2,s; 0,-s,-s,-s,0]**

where the successive groups of five components are the
rows of T and **s = 3 ^{1/2}**. The origin, O = (1,0,0,0,0),
is rotated to OT = (3,1,1,1,-s).

**D. THE COMPOSITION
OF TWO CENTRAL DILATIONS**

A projective transformation T may have a hyperplane h as an axis. Then we know it also has a center C of rank n - (n-1) = 1 (Methods). It is important for the classification of T whether this center point C lies on h or not. For example, say the axis h is the hyperplane at infinity, w. If C is on w then T is a translation; if C is not on w then T is a central dilation. The matrix representation of a central dilation about ordinary center point C by dilation factor d is T = dI + (1-d)wC; with scalar d /= 0 and d /= 1 and C normalized (M10). For two dilations their composition leaves w point-wise invariant and hence must be another central dilation or a translation. We can analyze this composition simply by multiplying homogeneous matrix representations.

Let T_{1} = d_{1}I
+ (1 - d_{1})wC_{1} (dilation about C_{1}
by factor d_{1} )

and_{ }T_{2}
= d_{2}I + (1 - d_{2})wC_{2 }(dilation
about C_{2} by factor d_{2} ).

Then T_{1} * T_{2}
= [d_{1}I + (1 - d_{1})wC_{1}] * [ d_{2}I
+ (1 - d_{2})wC_{2}]

= d_{1}d_{2}I + d_{1}(1-d_{2})wC_{2}
+ d_{2}(1-d_{1})wC_{1} + (1-d_{1})(1-d_{2})wC_{1}wC_{2}
.

The points C_{1} and C_{2} are both ordinary
and normalized and so their first (homogeneous) coordinates are equal
to 1. Thus in the last term above, the product C_{1}w = 1. This
gives:

**(A) **
T_{1} * T_{2} = d_{1}d_{2}I
+ d_{2}(1-d_{1})wC_{1} + (1-d_{2})wC_{2}

If d_{1}d_{2} /= 1 then (A) can be written
in the form

T_{1} * T_{2 }= d_{1}d_{2}I
+ (1-d_{1}d_{2}) C

where C = [d_{2}(1- d_{1})
/ (1-d_{1}d_{2})] C_{1} + [(1- d_{2})
/ (1-d_{1}d_{2})] C_{2}. This represents
the central dilation with center C and dilation factor d_{1}d_{2},_{
}provided C is normalized. But this is the case since the homogeneous
coordinate of C is d_{2}(1- d_{1}) / (1-d_{1}d_{2})
+ (1- d_{2}) / (1-d_{1}d_{2}) =
1.

If d_{1}d_{2} = 1 then (A) can be
written in the form

T_{1} * T_{2 }= I +
w ( C' - C_{1})

where C' = d_{2}C_{1} + (1
- d_{2} )C_{2}. This represents the translation
that maps point C_{1} to point C' (M7). Note C' is normalized
since d_{2} + (1 - d_{2} ) = 1. The center of this
translation is the ideal point C' - C_{1}= (1 - d_{2})
[C_{2} - C_{1}]. This could have been anticipated
since it is clear the composition of the dilations leaves the line through
C_{1} and C_{2} invariant, and the invariant center
is the intersection of this line with the invariant hyperplane at infinity,
w.

.

Ayres, F. Jr., *Matrices*, Schaum's
Outline Series, New York, 1962.

Coxeter, H.S.M., *The Real Projective
Plane* (2nd ed.), Cambridge, 1961.

Fishback, W.T., *Projective and
Euclidean Geometry* (2nd ed.), John Wiley & Sons, New York,
1969.

Halmos, P.R., *Finite-Dimensional
Vector Spaces*, (2nd ed.), Van Nostrand, New York, 1958.

Hodge, W.V.D & Pedoe, D.,
*Methods of Algebraic Geometry* (Vol. 1), Cambridge Univ. Press,
1968.

Laub, A.J. & Shiflett, G.R., A
linear algebra approach to the analysis of rigid body displacement from
initial and final position data. *J. Appl. Mech*. 49, 213-216, 1982.

Pedoe, D., *Geometry*, Dover,
New York, 1988.

Roberts, L.G., *Homogeneous Matrix
Representation and Manipulation of N-dimensional Constructs*. MIT
Lincoln Laboratory, MS 1405, May 1965.

Semple, J.G. & Kneebone, G.T.,
*Algebraic Projective Geometry*, Clarendon Press, Oxford, 1952.

Shilov, G.E., *Linear Algebra*,
Dover Publications, New York, 1977.

Snapper, E. & Troyer, R.J.,
*Metric Affine Geometry. *Academic Press, 1971.

Stolfi, J., *Oriented Projective
Geometry*, Academic Press, 1991.

VanArsdale, D., Homogeneous Transformation
Matrices for Computer Graphics, *Computers & Graphics*, vol.
18, no. 2, 177-191, 1994.

Theorems and methods utilizing homogeneous coordinates - many unpublished. Companion to this site.

Transformation
of Coordinates

Uses coordinates to prove some classical theorems in plane projective
geometry.

Britannica.com

Some history of projective geometry, both synthetic and analytic
methods, basics of homogeneous coordinates.

Math
Forum - Projective geometry

Internal links to articles on projective geometry at various
levels. Useful online resource.

Geometric
transformations

Elementary 2D and 3D transformations, including affine, shear,
and rotation.

Go to top of this document

Go to Index Page for Daniel W. VanArsdale

Corrections, references, comments or questions on this
article are appreciated, but please no unrelated homework requests.

email Daniel W. VanArsdale: barnowl@silcom.com

First uploaded 2/4/98, examples added 3/25/98 and 5/29/2000. Revised 10/02/2000.

Counter added 8/25/2000

In memory of Raymond Van Zuyle.

Chain Letter Evolution - a history of paper chain letters.

The Paper Chain Letter Archive - content

Eat No Dynamite - a collection of college graffiti, 1979-80.

Index page - Daniel W. VanArsdale

email Daniel W. VanArsdale