Comma basis: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Cmloegcmluin (talk | contribs)
m Cmloegcmluin moved page Comma-basis to Comma basis: convention is to not hyphenate this term
No edit summary
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This is a basic introduction to this concept. For a more mathematical take, see [[dual list]].  
{{Beginner|Dual list}}
A '''comma basis''' is a list of linearly independent commas that characterizes a temperament.


A '''comma-basis''' is a basis for the [[wikipedia:Kernel_(linear_algebra)|null-space]] (sometimes also called the "kernel") of a [[regular temperament|temperament]]. It consists of <math>n</math> [[Wikipedia:Linear_independence|linearly independent]] vectors, where <math>n</math> is the [[nullity]], each one representing a [[comma]] that is [[tempered out]].  
For example, septimal meantone tempers out [[225/224]], [[126/125]], and [[81/80]], but from any two of these commas can be derived the third ((225/224)*(126/125)=(81/80), for example). This means that if two of these three commas are ever made to vanish (mapped to 0{{c}}), then the third one necessarily is also made to vanish. Thus, we only need to pick two of the three commas; the third is implied. So we may write meantone's comma basis as (81/80, 225/224). This can be written in matrix form using the monzos of the commas as columns: [{{vector|-4 4 -1 0}}, {{vector|-5 2 2 -1}}], or equivalently as a list of monzos. Besides, it is often presented in terms of ratios for convenience. Various [[Normal lists #Normal interval lists|normal forms]] have been developed as identifiers of temperaments.  


Linear independence means that no comma can be found as the sum of any multiples of the other commas. For example, consider the set of three commas 81/80, 126/125, and 225/224. As vectors those are {{vector|-4 4 -1 0}}, {{vector|1 2 -3 1}}, and {{vector|-5 2 2 -1}}. Notice that the third comma is actually the difference between the other two; {{vector|-4 4 -1 0}} - {{vector|1 2 -3 1}} = {{vector|-5 2 2 -1}}, or as cents, 21.51¢ - 13.80¢ = 7.71¢. So, if two of these three commas are ever tempered out (mapped to 0¢), then the third one necessarily is also tempered out. Therefore, we only need to pick two of these commas to put in our comma-basis; the third one would be implied.
Mathematically, it is a [[basis]] for the {{w|Kernel (linear algebra)|nullspace}} (sometimes also called the "kernel") of a [[regular temperament|temperament]]. It consists of ''n'' {{w|linearly independent}} vectors, where ''n'' is the [[nullity]], each one representing one of the commas that is tempered out.  


The comma-basis can be thought of either as a list of vectors or as a matrix formed by putting these vectors (as columns) together.  
== With respect to the mapping ==
The comma basis is considered the dual of the temperament's [[mapping]] matrix, similar to how a val is considered dual to a monzo. Temperaments may be identified by either their mapping or comma basis.
 
Functions for finding the nullspace of a matrix are readily available in many math libraries. All you need to do to get a comma basis for a mapping is to find the nullspace. To learn about finding the nullspace by hand, see [[Dave Keenan & Douglas Blumeyer's guide to RTT/Exploring temperaments #Nullspace]].
 
To reverse the nullspace operation, that is, to find a mapping from a comma basis, you can also use the nullspace operation; the relationship between a matrix and its nullspace essentially works both ways.
 
When applied to convert between [[wedgies]] and "multimonzos" (the wedgie version of a comma basis), the equivalent operation is the [[Hodge dual|Hodge star]].  


== With respect to the mapping ==
Some math libraries, such as [https://www.sagemath.org/ Sage], provide functions for both directions; in Sage, to go from a mapping to a comma basis, use <code>left_kernel()</code>, and to go from a comma basis to a mapping, use <code>right_kernel()</code>. In other math libraries, such as [https://www.wolfram.com/language/ Wolfram Language], the nullspace operation <code>NullSpace[]</code> is primarily designed to work for mappings, and so if you want correct results, you must transform the basis for the nullspace into a mapping-like form, perform the nullspace operation, and then undo the initial transformation.
 
This transformation that relates the two directions of nullspace operations is called the {{w|transpose}}. It works by reflecting a matrix's values across its ''main'' diagonal, i.e. either the diagonal running from the top-left corner toward the bottom-right, or the diagonal running from the bottom-right corner toward the top-left.


The comma-basis is considered the dual of the temperament's [[mapping]] matrix. Temperaments may be identified by the [[canonical form]] of either their mapping or comma-basis.
However, transposing a comma basis, using a mapping-style nullspace function, then transposing again, will return a mapping in a strange form, with all of its zeros in the top-right corner, rather than the bottom-left as is preferred. The solution for this problem is to use the anti-transpose instead of the transpose. This is the same you reflect the matrix's entries across its ''anti-''diagonal (starting from either the top-right or bottom-left corner).  


Functions for finding the null-space of a matrix are readily available in many math libraries. All you need to do to get a comma-basis for a mapping is to find the null-space.
You can remember this because most mappings and comma bases have zeroes in the bottom-left corner, and you want to keep them there; some kind of transpose is necessary to convert the constituent comma vectors columns of the comma basis into rows as if they were constituent generator maps (rows) of a mapping, but a normal transpose of the comma basis would flip its zeroes into the top-right corner instead.


To reverse the null-space operation, that is, to find a mapping from a comma-basis, you can also use the null-space operation; the relationship between a matrix and its null-space essentially works both ways. However, math libraries' null-space operation is designed to work for mappings, and so if you want correct results, you must transform the basis for the null-space into a mapping-like form, perform the null-space operation, and then undo the initial transformation. This initial transformation you must do and undo is called the anti-transpose, which is just like the typical transpose of a matrix, except instead of reflecting the matrix's values across the main diagonal (starting from either the top-left or bottom-right corner), you reflect them across the anti-diagonal (starting from either the top-right or bottom-left corner). You can remember this because most mappings and comma-bases have zeroes in the bottom-left corner, and you want to keep them there; some kind of transpose is necessary to convert the constituent comma vectors columns of the comma basis into rows as if they were constituent generator mapping rows of a mapping, but a normal transpose of the comma basis would flip its zeroes into the top-right corner instead.
[[Category:Regular temperament theory]]
[[Category:Terms]]
[[Category:Math]]
[[Category:Monzo]]

Latest revision as of 21:22, 22 August 2025

This is a beginner page. It is written to allow new readers to learn about the basics of the topic easily.
The corresponding expert page for this topic is Dual list.

A comma basis is a list of linearly independent commas that characterizes a temperament.

For example, septimal meantone tempers out 225/224, 126/125, and 81/80, but from any two of these commas can be derived the third ((225/224)*(126/125)=(81/80), for example). This means that if two of these three commas are ever made to vanish (mapped to 0 ¢), then the third one necessarily is also made to vanish. Thus, we only need to pick two of the three commas; the third is implied. So we may write meantone's comma basis as (81/80, 225/224). This can be written in matrix form using the monzos of the commas as columns: [[-4 4 -1 0, [-5 2 2 -1], or equivalently as a list of monzos. Besides, it is often presented in terms of ratios for convenience. Various normal forms have been developed as identifiers of temperaments.

Mathematically, it is a basis for the nullspace (sometimes also called the "kernel") of a temperament. It consists of n linearly independent vectors, where n is the nullity, each one representing one of the commas that is tempered out.

With respect to the mapping

The comma basis is considered the dual of the temperament's mapping matrix, similar to how a val is considered dual to a monzo. Temperaments may be identified by either their mapping or comma basis.

Functions for finding the nullspace of a matrix are readily available in many math libraries. All you need to do to get a comma basis for a mapping is to find the nullspace. To learn about finding the nullspace by hand, see Dave Keenan & Douglas Blumeyer's guide to RTT/Exploring temperaments #Nullspace.

To reverse the nullspace operation, that is, to find a mapping from a comma basis, you can also use the nullspace operation; the relationship between a matrix and its nullspace essentially works both ways.

When applied to convert between wedgies and "multimonzos" (the wedgie version of a comma basis), the equivalent operation is the Hodge star.

Some math libraries, such as Sage, provide functions for both directions; in Sage, to go from a mapping to a comma basis, use left_kernel(), and to go from a comma basis to a mapping, use right_kernel(). In other math libraries, such as Wolfram Language, the nullspace operation NullSpace[] is primarily designed to work for mappings, and so if you want correct results, you must transform the basis for the nullspace into a mapping-like form, perform the nullspace operation, and then undo the initial transformation.

This transformation that relates the two directions of nullspace operations is called the transpose. It works by reflecting a matrix's values across its main diagonal, i.e. either the diagonal running from the top-left corner toward the bottom-right, or the diagonal running from the bottom-right corner toward the top-left.

However, transposing a comma basis, using a mapping-style nullspace function, then transposing again, will return a mapping in a strange form, with all of its zeros in the top-right corner, rather than the bottom-left as is preferred. The solution for this problem is to use the anti-transpose instead of the transpose. This is the same you reflect the matrix's entries across its anti-diagonal (starting from either the top-right or bottom-left corner).

You can remember this because most mappings and comma bases have zeroes in the bottom-left corner, and you want to keep them there; some kind of transpose is necessary to convert the constituent comma vectors columns of the comma basis into rows as if they were constituent generator maps (rows) of a mapping, but a normal transpose of the comma basis would flip its zeroes into the top-right corner instead.