Comma basis: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{Beginner|Dual list}}
{{Beginner|Dual list}}
A '''comma basis''' is a [[basis]] for the [[wikipedia: Kernel (linear algebra)|nullspace]] (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 made to [[vanish]].  
A '''comma basis''' is a [[basis]] for the [[wikipedia: Kernel (linear algebra)|nullspace]] (sometimes also called the "kernel") of a [[regular temperament|temperament]]. It consists of ''n'' {{|linearly independent}} vectors, where ''n'' is the [[nullity]], each one representing a [[comma]] that is made to [[vanish]].  


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 made to vanish (mapped to ), then the third one necessarily is also made to vanish. Therefore, we only need to pick two of these commas to put in our comma basis; the third one would be implied.
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; {{nowrap|{{vector|-4 4 -1 0}} {{vector|1 2 -3 1}} {{=}} {{vector|-5 2 2 -1}}}}, or as cents, {{nowrap|21.51{{c}} − 13.80{{c}} {{=}} 7.71{{c}}}}. So, 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. Therefore, we only need to pick two of these commas to put in our comma basis; the third one would be implied.


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. 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.  
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. 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.  
Line 15: Line 15:
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.  
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 [[wikipedia: Transpose|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.  
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.  


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).  
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).