Twin squares
Twin squares [idiosyncratic term ] (term proposed by Kite Giedraitis) is a format for presenting a regular temperament. The gencom matrix is shown side by side with its inverse, the mapping matrix, which has rows for not only each generator but also each comma. Here's 5-limit meantone temperament, with period 2/1, generator 3/2 and comma 81/80:
[math] \begin{array} {rrr} period \\ generator \\ comma \\ \end{array} \left[ \begin{array} {rrr} 1 & 0 & 0 \\ -1 & 1 & 0 \\ \hline -4 & 4 & -1 \\ \end{array} \right] \longleftrightarrow \left[ \begin{array} {rrr} 1 & 1 & 0 \\ 0 & 1 & 4 \\ \hline 0 & 0 & -1 \\ \end{array} \right] [/math]
Pedagogical value
These two matrices can be thought of as a simple basis change from 2.3.5 to 2.3/2.81/80. Thus any temperament can be thought of as a basis change, with one or more of the new basis members vanishing. The lefthand matrix expresses the new basis in terms of the old basis, and the righthand matrix expresses the old in terms of the new. Thus creating a temperament consists of 3 steps:
- perform a basis change with some of the new generators being comma-sized
- temper out those commas
- discard the rows in the mapping matrix that corresponds to those commas
The two matrices follow a simple rule: the dot product of any row in one with any row in another is 1 if the two rows are opposite each other (e.g. 2nd row of each matrix), and 0 if not (e.g. 1st row of one and 3rd row of the other). Thus one can easily verify that one is the inverse of the other. In fact, it's not too difficult to derive both matrices from either the comma list or the mapping. One proceeds step by step, checking as one goes, similar to solving a sudoku puzzle.