BOT300 Home Page

Phenetic analysis (measuring similarity) 1 (25-Mar-03)

Matrix conventions:





matrix A =









with elements ahi, for h = 1...m rows, and i = 1...n columns.
The order of A is the number of elements, m n, abbreviated as Amn.

A can be thought of as being made up of component submatrices consisting of individual rows (1 n) or columns (m 1). These submatrices, or vectors, can be abbreviated as follows:

1 = a11, a12, a13, a14

a3 = a23

where stands for all the elements in the corresponding dimension (this usage should not be confused with multiplication, where the will be between two arguments, e.g. ab, meaning a b).

The transpose of A =

  a11 a21 a31
A= a12 a22 a32
  a13 a23 a33
  a14 a24 a34

Note that the first row of A becomes the first column of A, while the first column of A becomes the first row of A.

A is a square matrix if m = n. Elements of A, ahi, such that h = i are the diagonal elements of A. The sum of the diagonal elements of a square matrix is its trace.

Square matrices can be of particular kinds, e.g.

A is a symmetric square matrix if A = A.

A is a diagonal matrix if the off-diagonal elements are all zero,

a11 0 0
e.g. 0 a22 0
0 0 a33

[Back to TOP] 

What do vectors and matrices represent?

A vector is an ordered set of real numbers (scalars) that can be written as

a = a3

or as a = (a1,a2,a3, Geometrically, the elements of a can be thought of as coordinates of a point in n-dimensional space. We will restrict our discussion of vectors to what are called position vectors, in that they represent the direction and distance from the origin of an n-dimensional coordinate system to the point in space defined by the elements of a (see illustration at right). The 12 2-element (x1, x2) position vectors shown below can be thought of as making up a 12 2 matrix A.

[Back to TOP] 


Matrix operations:

Addition (and subtraction)

A + B (or A - B) is allowed if A and B are of the same order.

  a11 a21   b11 b12
For A = a12 a22 and B = b21 b22
  a31 a32   b31 b32


  a11+b11 a12+b12
A + B = a21+b21 a22+b22
  a31+b31 a32+b32

[Back to TOP] 

Matrix multiplication is based on the scalar products of vectors:

  a11   b11   b11  
for a = a21 and b = b21 a b = a11 a21 a31 b21  = a11b11 + a21b21 + a31b31
  a31   b31   b31  

This is a scalar number, equivalent to a matrix of order 1 1, that is, with rows equal to those of the first matrix and columns equal to those of the second matrix.

Why is the square root of aa equal to the length of vector a?

Consider the vector a shown at the right; its length (denoted ||a||) is given by generalizing the Pythagorean theorem to three dimensions (or more, depending on the number of elements in a).

for a = a21

aa = a11a11 + a21a21 + a31a31

and ||a|| = (a11a11 + a21a21 + a31a31)1/2

What is the length of a = (1,2,2)?

Multiplication of entire matrixes is thus defined: for matrices A and B, their product AB can be thought of as containing elements that are the scalar products of the row vectors of A and the column vectors of B. In order for this to be possible, the number of columns in A must equal the number of rows in B. When this is the case, A and B are said to conform. Matrix multiplication is possible if and only if the number of columns of the first matrix equals the number of rows of the second.

Based on this definition, the results of matrix multiplication depend on the order in which matrices are multiplied.

For matrices A and B,

a11 a12 a13 (a11b11+a12b21+a13b31) (a11b12+a12b22+a13b32)
a21 a22 a23 b11 b12 (a21b11+a22b21+a23b31) (a21b12+a22b22+a23b32)
AB = a31 a32 a33 b21 b22 = (a31b11+a32b21+a33b31) (a31b12+a32b22+a33b32)
a41 a42 a43 b31 b32 (a41b11+a42b21+a43b31) (a41b12+a42b22+a43b32)
a51 a52 a53 (a51b11+a52b21+a53b31) (a51b12+a52b22+a53b32)

or, more compactly,

(a1 b.1) (a1 b.2)
(a2 b.1) (a2 b.2)
(a3 b.1) (a3 b.2)
(a4 b.1) (a4 b.2)
(a5 b.1) (a5 b.2)

or (for N=3)

(a1ibi1) (a1ibi2)
(a2ibi1) (a2ibi2)
(a3ibi1) (a3ibi2)
(a4ibi1) (a4ibi2)
(a5ibi1) (a5ibi2)

where signifies summation over i=1...N.

What would be the order of A A? - of AA ?

Some useful geometric properties of matrix multiplication are illustrated HERE (esp. pp. 1-3).

[Back to TOP] 

The basic data matrix, and types of data

The basic data matrix that is used in (numerical) phenetics is one in which one dimension (rows, say) represents the operational taxonomic units (OTUs) while the other dimension (columns) represents the characters for which data have been collected. For example, consider the data in Table 1 (below) as representing a description of 11 races of bean rust, based on their reactions when inoculated onto a suite of differential bean cultivars.

Table 1. Disease reactions for 11 Jamaican rust (Uromyces appendiculatus var. appendiculatus) isolates (J1-J20) inoculated on 10 bean (Phaseolus vulgaris) cultivars (first six, US differential vars.; last four, Jamaican landraces): 1, susceptible (sporulation); 0, immune (no sporulation). Data from M. Shaik (1983).
GGW 814 765 111 643 181 PR RR JR MK
 J1  1 0 0 1 0 1 0 0 1 0
 J3  1 0 0 0 0 1 0 0 1 0
 J20  1 1 0 1 0 1 0 1 1 0
 J11  1 1 1 1 0 1 1 1 1 1
 J12  1 1 1 1 0 1 1 1 1 1
 J13  1 1 1 1 0 1 1 1 1 1
 J5  1 1 1 1 1 1 1 1 1 1
 J6  1 1 1 1 1 1 1 1 1 1
 J10  1 1 1 1 1 1 1 1 1 1
 J14  0 1 1 1 1 1 1 1 1 1
 J15  0 1 1 1 1 1 1 1 1 1


R-mode measures of similarity

Covariance and correlation (page 4 ff.)

Q-mode measures of similary

Euclidean distance (first 2 pages only)

Measures for binary and multi-state data

Measures for mixed data

[Back to TOP] 

Further reading

Legendre, P. & L. Legendre (1998). Numerical Ecology, 2nd ed. New York, Springer-Verlag.

Manly, B. F. J. (1994). Multivariate statistical methods - A primer, 2nd ed. London, Chapman & Hall.

Podani, J. (2000). Introduction to the exploration of Multivariate biological data. Leiden, Backhuys.

|BOT300S Home Page | U of T Botany | University of Toronto |

© 2003 Botany Department, University of Toronto.

Please send your comments to; last updated 25-Mar-2003