Construction of the OSM matrix. (a) A rooted tree with taxa 1 and 2. (b) A transition s1on the left branch e1(the red branch) changes a character into exactly one new character as depicted by the red horizontal stripe cells of the permutation matrix . The matrix has 16 rows and 16 columns representing the possible characters for the alignment of two nucleotide sequences. The permutation matrices generated by s1for the right branch e2(blue) and for the branch leading to the “root” e12(green) are displayed in (c) and (d), respectively. The corresponding Cayley graph for the tree is illustrated in (e). The convex sum of all the weighted (by the relative branch length and the probability of the substitution type) permutation matrices generated by all substitution types for all branches is the OSM matrix of the tree () as shown in (f). Horizontal stripe cells represent the probability of the transition s1; diagonal stripes the transversion s2; and thin reverse diagonal stripes the transversion s3. The colors of these cells indicate the relative branch lengths and follow the colors of the branches as in (a). Thus, these colors also depict the branch origin of the substitutions.