chap-12 4/6/2004 17: 27 page 310
310 GEOMETRIC MORPHOMETRICS FOR BIOLOGISTS
That the angle can exceed 90
◦
becomes apparent when we consider two planes embed-
ded in a four-dimensional space. That means we have measured four variables in each of
two groups, and are comparing the subspaces defined by the first two PCs of each group.
The dimensionality of the subspace is two, and that of the space in which they are embed-
ded is four. Now there are three possibilities: (1) the two planes are identical; (2) the two
planes share a common line; or (3) the two planes are completely independent, intersecting
only at the origin. The latter case may be difficult to imagine, because it can only arise in
a space higher than three dimensions. If the two planes are identical, the angle between
them is 0
◦
. If they share a common line, then a single rotation around that line, which can
range from 0
◦
to 90
◦
, will align them. However, if the two planes are entirely disjunct,
then we need to rotate them around two distinct axes, and each rotation ranges from 0
◦
to
90
◦
– although that does not mean that the maximal angle is 180
◦
. We need to think of the
rotations as vectors along orthogonal axes. To add the two rotations, we add the lengths
of the vectors. Therefore, expressing the rotations in radians, the total (net) rotation is the
square root of the sum of the squared rotations around each axis. That can be calculated
just like we compute net displacements along perpendicular axes – as the square root of
the summed squared rotations around each axis. Because the maximal rotation about any
axis is π/2 radians (90
◦
), the maximum possible angle of rotation is
(
π/2
)
2
+
(
π/2
)
2
=
π/
√
2 radians (∼127
◦
).
The maximal angle of rotation depends on two things: (1) the number of dimensions
of the hyperplanes (the number of PCs defining each subspace), and (2) the number of
perpendicular vectors shared by the two spaces. The maximum number of distinct axes
is equal to the difference between these numbers (the number of hyperplane dimensions
minus the number of shared perpendicular axes). Because the maximal angle of rotation
around a single axis is π/2, if there are Y distinct (unshared) axes in each hyperplane, the
maximal angle between them is
Y
(
π/2
)
2
=
√
Y
(
π/2
)
. If we are comparing pairs of two-
dimensional subspaces embedded in a high dimensional space, Y would still be 0, 1 or 2
because there cannot be more than two perpendicular (unshared) axes in two-dimensional
spaces. As the dimensionality of the subspaces under comparison increases, the maximal
value of Y increases.
Calculating the angle between two subspaces Using an algorithm generously provided by
Jason Mezey, we begin the calculation of an angle between two subspaces by calculating M
PCs for two groups, A and B. Our objective is to determine the angle between subspaces
defined by the first K PCs of each group (within the total shape space of all PCs). To
compute that angle, we construct the matrix V
A
such that its N columns are the PCs
(eigenvectors) of the variance–covariance matrix for group A. Next we compute a similar
matrix, V
B
, based on the data set B. We will extract the first K vectors from the M ×M
matrices, V
A
and V
B
, creating the M ×M matrix P, such that:
P =
I 0
00
(12.13)
where I is a K ×K identity matrix (i.e. a K ×K matrix with ones on the diagonal and zeros
everywhere else). The zeros in Equation 12.13 indicate that all other elements in P are
zeros (these other elements are necessary to make P an M ×M matrix).