In music, especially folk and popular music, a matrix is an element of variations which does not change. The term was derived from use in musical writings and from Arthur Koestler's The Act of Creation, who defines creativity as the bisociation of two sets of ideas or matrices. Musical matrices may be combined in any number, usually more than two, and may be — and must be for analysis — broken down into smaller ones. They may be intended by the composer and perceived by the listener, or they may not, and they may be purposefully ambiguous.
The simplest examples given by van der Merwe are fixed notes, definite intervals, and regular beats, while the most complex given are the Baroque fugue, Classical tonality, and Romantic chromaticism. The following examples are some matrices which are part of "Pop Goes the Weasel":
- major mode
- 6/8 time
- four-bar phrasing
- regular beat
- rhyming tune structure
- ending both halves of the tune with the same figure
- melodic climax
- perfect cadence
- three primary triads implied
Co-ordinated matrices may possess "bound-upness" or "at-oddness", depending on the degree to which they are connected to each other or go their separate ways, respectively, and are more or less easy to reconcile. The matrices of the larger matrix known as sonata rondo form are more bound up than the matrices of rondo form, while African and Indian music feature more rhythmic at-oddness than European music's coinciding beats, and European harmony features more at-oddness (between the melody and bass) than the preceding organum. At-oddness is a matter of degree, and almost all at odd matrices are partially bound up.
Mathematical matrices in music 
See also 
- van der Merwe, Peter (1989). Origins of the Popular Style: The Antecedents of Twentieth-Century Popular Music. Oxford. pp. 94–96. ISBN 0-19-316121-4.
- Koestler, Arthur. The Act of Creation. Cited in van der Merwe (1989).
- Morris, R.O. Contrapuntal Technique in the Sixteenth Century. Cited in van der Merwe (1989).