Extended bra–ket notation: Difference between revisions

m Partial undo for less inline math etc. Update the unicode links
Tag: Undo
Since we're discussing the notation itself, it's best to stick to the raw templates Template: Bra and Template: Ket rather than the semantic Template: Map and Template: Vector, which are subject to change
Line 3: Line 3:
Several stylistic variations are possible, and no formal style has yet been established, but it can be safely said that EBK always involves enclosing lists of values in sets of brackets, with pointed brackets used to distinguish different types of lists.  
Several stylistic variations are possible, and no formal style has yet been established, but it can be safely said that EBK always involves enclosing lists of values in sets of brackets, with pointed brackets used to distinguish different types of lists.  


Per the name, EBK extends [[Wikipedia:Bra%E2%80%93ket_notation|bra-ket]] notation, which is used in quantum mechanics. The use of bra-ket notation for RTT was originally proposed by [[Gene Ward Smith]] in February 2002<ref>https://yahootuninggroupsultimatebackup.github.io/tuning-math/topicId_3355#3356</ref>.
Per the name, EBK extends {{w|Bra%E2%80%93ket notation|bra-ket}} notation, which is used in quantum mechanics. The use of bra-ket notation for RTT was originally proposed by [[Gene Ward Smith]] in February 2002<ref>https://yahootuninggroupsultimatebackup.github.io/tuning-math/topicId_3355#3356</ref>.


== Basics ==
== Basics ==
Line 11: Line 11:


=== Common applications ===
=== Common applications ===
In RTT, covectors are used most frequently for [[map]]s and [[tuning map]]s. For example, the map for 7-ET is notated as {{map|7 11 16}}, and a tuning map for it might be {{map|1209.682 1900.930 2764.988}}.
In RTT, covectors are used most frequently for [[map]]s and [[tuning map]]s. For example, the map for 7-ET is notated as {{bra| 7 11 16 }}, and a tuning map for it might be {{bra|1209.682 1900.930 2764.988}}.


The most common types of vectors used in RTT are [[prime-count vector]]s (PC-vectors) and [[generator-count vector]]s (GC-vectors). For example, the PC-vector for 45/32 is {{vector|-5 2 1}}, and the GC-vector for ~45/32 in porcupine temperament is {{vector|2 -11}}.
The most common types of vectors used in RTT are [[prime-count vector]]s (PC-vectors) and [[generator-count vector]]s (GC-vectors). For example, the PC-vector for 45/32 is {{ket| -5 2 1 }}, and the GC-vector for ~45/32 in porcupine temperament is {{ket| 2 -11 }}.


=== Combining ===
=== Combining ===
Line 20: Line 20:
So mapping 45/32 with 7-ET would be notated as {{vmprod| 7 11 16 | -5 2 1 }} = 7·-5 + 11·2 + 16·1 = -35 + 22 + 16 = 3.  
So mapping 45/32 with 7-ET would be notated as {{vmprod| 7 11 16 | -5 2 1 }} = 7·-5 + 11·2 + 16·1 = -35 + 22 + 16 = 3.  


Or mapping the GC-vector for porcupine's ~45/32 with a generator tuning map like {{map|1200 162.737}} would look like {{vmprod| 1200 162.737 | 2 -11 }} = 1200·2 + 162.737·-11 = 2400 + -1790.107 = 609.893.   
Or mapping the GC-vector for porcupine's ~45/32 with a generator tuning map like {{bra| 1200 162.737 }} would look like {{vmprod| 1200 162.737 | 2 -11 }} = 1200·2 + 162.737·-11 = 2400 + -1790.107 = 609.893.   


== Extensions ==
== Extensions ==
Line 28: Line 28:


=== Alternating, for matrices ===
=== Alternating, for matrices ===
Vectors (including covectors) are used to represent musical objects of various dimensionality. For example, the PC-vector {{vector|1 -2 1}} represents the interval 10/9, which would be found as a point in the ''three''-dimensional space of 5-limit JI lattice, while the PC-vector {{vector|0 -1 1 1 -1}} represents the interval 35/33, which would be found as a point in the ''five''-dimensional space of the 11-limit JI lattice. However, regardless of the dimensionality of the musical object represented, a vector itself will always be a ''one''-dimensional structure, in the sense that it is a simple list of numbers. Due to this, vectors are always fairly easy to embed in similarly one-dimensional strings of text or data cells of tables.
Vectors (including covectors) are used to represent musical objects of various dimensionality. For example, the PC-vector {{ket| 1 -2 1 }} represents the interval 10/9, which would be found as a point in the ''three''-dimensional space of 5-limit JI lattice, while the PC-vector {{ket| 0 -1 1 1 -1 }} represents the interval 35/33, which would be found as a point in the ''five''-dimensional space of the 11-limit JI lattice. However, regardless of the dimensionality of the musical object represented, a vector itself will always be a ''one''-dimensional structure, in the sense that it is a simple list of numbers. Due to this, vectors are always fairly easy to embed in similarly one-dimensional strings of text or data cells of tables.


But RTT uses a number of ''two''-dimensional structures as well — i.e. numbers arranged in a grid of rows and columns — which are called matrices. Having the ability to present these objects one-dimensionally can be quite helpful too, and so the first way in which EBK extends bra-ket notation is designed to provide that.
But RTT uses a number of ''two''-dimensional structures as well — i.e. numbers arranged in a grid of rows and columns — which are called matrices. Having the ability to present these objects one-dimensionally can be quite helpful too, and so the first way in which EBK extends bra-ket notation is designed to provide that.
Line 51: Line 51:




RTT mappings are typically thought of in terms of their ''rows''. This mapping <math>M</math> has two rows; following mathematical conventions, let's call them <math>𝒎_1</math> and <math>𝒎_2</math>. And so to notate this mapping in EBK, we can first imagine capturing the rows as bras like we would normally: <math>𝒎_1</math> = {{map|1 0 -4}} and <math>𝒎_2</math> = {{map|0 1 4}}. Then, to put them together, we can think of this matrix as a single column containing these two rows, or in other words, a ket containing the two bras: {{ket|<math>𝒎_1</math> <math>𝒎_2</math>}}, or fully written out, {{ket|{{map|1 0 -4}} {{map|0 1 4}}}}.
RTT mappings are typically thought of in terms of their ''rows''. This mapping <math>M</math> has two rows; following mathematical conventions, let's call them <math>𝒎_1</math> and <math>𝒎_2</math>. And so to notate this mapping in EBK, we can first imagine capturing the rows as bras like we would normally: <math>𝒎_1</math> = {{bra| 1 0 -4 }} and <math>𝒎_2</math> = {{bra| 0 1 4 }}. Then, to put them together, we can think of this matrix as a single column containing these two rows, or in other words, a ket containing the two bras: {{ket| <math>𝒎_1</math> <math>𝒎_2</math> }}, or fully written out, {{ket| {{bra|1 0 -4}} {{bra|0 1 4}} }}.


For another example, the canonical [[comma basis]] for 7-ET consists of the two commas 2187/2048 and 135/128, with PC-vectors {{vector|-11 7}} and {{vector|-7 3 1}}, respectively. As a matrix <math>\mathrm{C}</math>, we'd see this as:
For another example, the canonical [[comma basis]] for 7-ET consists of the two commas 2187/2048 and 135/128, with PC-vectors {{ket|-11 7}} and {{ket| -7 3 1 }}, respectively. As a matrix <math>\mathrm{C}</math>, we'd see this as:




Line 65: Line 65:




RTT comma bases, as opposed to mappings, are more naturally thought of in terms of their ''columns''. This comma basis has two columns; let's call them <math>\textbf{c}_1</math> and <math>\textbf{c}_2</math> (in this case, that conveniently works out as both 'c' for "column" and 'c' for "comma"!). And so to notate this comma basis in EBK, we can first imagine capturing the columns as kets like we would normally: <math>\textbf{c}_1</math> = {{ket|-11 7 0}} and <math>\textbf{c}_2</math> = {{ket|-7 3 1}}. Then, to put them together, we can think of this matrix as a single row containing these two columns, or in other words, a bra containing the two kets: {{map|<math>\textbf{c}_1</math> <math>\textbf{c}_2</math>}}, or fully written out, {{map|{{ket|-11 7 0}} {{ket|-7 3 1}}}}.
RTT comma bases, as opposed to mappings, are more naturally thought of in terms of their ''columns''. This comma basis has two columns; let's call them <math>\textbf{c}_1</math> and <math>\textbf{c}_2</math> (in this case, that conveniently works out as both 'c' for "column" and 'c' for "comma"!). And so to notate this comma basis in EBK, we can first imagine capturing the columns as kets like we would normally: <math>\textbf{c}_1</math> = {{ket| -11 7 0 }} and <math>\textbf{c}_2</math> = {{ket| -7 3 1 }}. Then, to put them together, we can think of this matrix as a single row containing these two columns, or in other words, a bra containing the two kets: {{bra| <math>\textbf{c}_1</math> <math>\textbf{c}_2</math> }}, or fully written out, {{bra| {{ket| -11 7 0 }} {{ket| -7 3 1 }} }}.


==== History ====
==== History ====
Line 74: Line 74:


==== Alternatives ====
==== Alternatives ====
In many wiki writings, mappings and comma bases are provided as ''lists'' of vectors, notated using square brackets on both sides and commas between entries, like this: [a, b, c, …]. So meantone's mapping would look like [{{map|1 0 -4}}, {{map|0 1 4}}], and a comma basis for 7-ET would look like [{{ket|-11 7 0}}, {{ket|-7 3 1}}]. This notation is completely sufficient and unambiguous, but — for better or worse — does not emphasize the matrix-like structure of the data quite as strongly.
In many wiki writings, mappings and comma bases are provided as ''lists'' of vectors, notated using square brackets on both sides and commas between entries, like this: [a, b, c, …]. So meantone's mapping would look like [{{bra| 1 0 -4 }}, {{bra| 0 1 4 }}], and a comma basis for 7-ET would look like [{{ket| -11 7 0 }}, {{ket| -7 3 1 }}]. This notation is completely sufficient and unambiguous, but — for better or worse — does not emphasize the matrix-like structure of the data quite as strongly.


=== Repetition, for multivectors ===
=== Repetition, for multivectors ===
Line 81: Line 81:
Some advanced practitioners of RTT use multivectors, such as [[wedgie]]s, as an alternative way to represent temperaments (besides mappings and comma bases). These multivectors come in various grades, such as 2-vectors and 3-vectors. In fact, ordinary vectors are simply 1-vectors. In order to distinguish a <math>g</math>-vector from a 1-vector, the brackets that would normally be used can be repeated <math>g</math> times, where <math>g</math> is the grade.  
Some advanced practitioners of RTT use multivectors, such as [[wedgie]]s, as an alternative way to represent temperaments (besides mappings and comma bases). These multivectors come in various grades, such as 2-vectors and 3-vectors. In fact, ordinary vectors are simply 1-vectors. In order to distinguish a <math>g</math>-vector from a 1-vector, the brackets that would normally be used can be repeated <math>g</math> times, where <math>g</math> is the grade.  


For example, the 2-vector (bivector) representing meantone temperament uses two sets of brackets: {{multivector|1 4 4}}. The 3-covector representing 7-limit 31-ET {{multicovector|rank=3|-87 72 -49 31}}.
For example, the 2-vector (bivector) representing meantone temperament uses two sets of brackets: {{multivector| 1 4 4 }}. The 3-covector representing 7-limit 31-ET {{multicovector|rank=3| -87 72 -49 31 }}.


The repetition-for-multivectors extension was developed in November of 2003 by Dave Keenan<ref>https://yahootuninggroupsultimatebackup.github.io/tuning-math/topicId_7525#7749</ref>.  
The repetition-for-multivectors extension was developed in November of 2003 by Dave Keenan<ref>https://yahootuninggroupsultimatebackup.github.io/tuning-math/topicId_7525#7749</ref>.  
Line 109: Line 109:


=== Commas ===
=== Commas ===
Originally, it was common for entries of bras and kets to be separated by (punctuation) commas, like {{vector|-4, 4, 1}}. Nowadays, this is almost never seen.
Originally, it was common for entries of bras and kets to be separated by (punctuation) commas, like {{ket| -4, 4, 1 }}. Nowadays, this is almost never seen.


=== Separated sections ===
=== Separated sections ===
A method for visually breaking up the entries of longer bras and kets was proposed by [[George Secor]] in November of 2003<ref>https://yahootuninggroupsultimatebackup.github.io/tuning-math/topicId_7286.html#7429 The original proposal was made back when separating every entry by a (punctuation) comma was popular, and so the semicolon was used as the special separator; the modern interpretation of this proposal is given in the main text, where the comma is used as the special separator.</ref>. The proposal was for a comma to be placed after the entry for prime 3, and thereafter a comma is placed after every third prime. So for example, 13/8 would be given as {{vector|-3 0, 0 0 0, 1}}.
A method for visually breaking up the entries of longer bras and kets was proposed by [[George Secor]] in November of 2003<ref>https://yahootuninggroupsultimatebackup.github.io/tuning-math/topicId_7286.html#7429 The original proposal was made back when separating every entry by a (punctuation) comma was popular, and so the semicolon was used as the special separator; the modern interpretation of this proposal is given in the main text, where the comma is used as the special separator.</ref>. The proposal was for a comma to be placed after the entry for prime 3, and thereafter a comma is placed after every third prime. So for example, 13/8 would be given as {{ket| -3 0, 0 0 0, 1 }}.


A further variation is to drop sequences of three zeros thus enclosed by commas, so that 13/8 would appear as {{vector|-3 0, , 1}}.
A further variation is to drop sequences of three zeros thus enclosed by commas, so that 13/8 would appear as {{ket| -3 0, , 1 }}.


The stylistic reasoning is that it resembles the use of commas in large numbers to separate every third digit (e.g. 1,000,000). The first comma being after prime 3 rather than after the third prime (prime 5) is due to the notational specialness of primes 2 and 3, those being the primes capable of being encoded by standard sheet music (prime 2 by clefs and staff positions and prime 3 by Pythagorean nominals A, B, C, D, E, F, G and sharp and flat symbols).
The stylistic reasoning is that it resembles the use of commas in large numbers to separate every third digit (e.g. 1,000,000). The first comma being after prime 3 rather than after the third prime (prime 5) is due to the notational specialness of primes 2 and 3, those being the primes capable of being encoded by standard sheet music (prime 2 by clefs and staff positions and prime 3 by Pythagorean nominals A, B, C, D, E, F, G and sharp and flat symbols).
Line 121: Line 121:
Dave Keenan and Douglas Blumeyer propose that it may be helpful to distinguish objects with distinctive shapes, such as [[generator tuning map]]s and generator-count vectors, by using curly brackets {…] […} in place of angle brackets ⟨…] […⟩, wherever the height or width of a vector or matrix is equal to the [[rank]] of the temperament, <math>r</math>. A mnemonic for the curly bracket is that it resembles the tilde (~) which is commonly used to mark approximated or tempered intervals, e.g. ~3/2 is an approximation of 3/2.
Dave Keenan and Douglas Blumeyer propose that it may be helpful to distinguish objects with distinctive shapes, such as [[generator tuning map]]s and generator-count vectors, by using curly brackets {…] […} in place of angle brackets ⟨…] […⟩, wherever the height or width of a vector or matrix is equal to the [[rank]] of the temperament, <math>r</math>. A mnemonic for the curly bracket is that it resembles the tilde (~) which is commonly used to mark approximated or tempered intervals, e.g. ~3/2 is an approximation of 3/2.


For example, while the PC-vector representing 5/4 would be written {{vector|-2 0 1}}, the mapped version of this in meantone could be written {{rket|-2 4}}. And while the tuning map for quarter-comma meantone might be written {{map|1200.000 1896.578 2786.314}}, the generator tuning map could be written {{rbra|1200.000 696.578}}.  
For example, while the PC-vector representing 5/4 would be written {{vector|-2 0 1}}, the mapped version of this in meantone could be written {{rket| -2 4 }}. And while the tuning map for quarter-comma meantone might be written {{bra| 1200.000 1896.578 2786.314 }}, the generator tuning map could be written {{rbra| 1200.000 696.578 }}.  


We further propose that the use of the normal angle bracket could be restricted to matrix widths and heights equal only to the [[dimensionality]] of the temperament, <math>d</math>, and any other width or height besides <math>d</math> and <math>r</math> would be given with plain square brackets […]. So, for example, a comma basis could be written [{{vector|4 -4 1}} {{vector|7 0 -3}}] because its width is equal to the [[nullity]] of the temperament, <math>n</math>. This is consistent with the fact that it is common for linear algebra texts to treat a nullspace basis not as a matrix but as a mere list of vectors.
We further propose that the use of the normal angle bracket could be restricted to matrix widths and heights equal only to the [[dimensionality]] of the temperament, <math>d</math>, and any other width or height besides <math>d</math> and <math>r</math> would be given with plain square brackets […]. So, for example, a comma basis could be written [{{ket| 4 -4 1 }} {{ket| 7 0 -3 }}] because its width is equal to the [[nullity]] of the temperament, <math>n</math>. This is consistent with the fact that it is common for linear algebra texts to treat a nullspace basis not as a matrix but as a mere list of vectors.


Instead of curly brackets, we considered using round brackets (parentheses), (…] […), however it is sometimes necessary to include parenthesized expressions as entries in the bra or ket, which would be difficult to parse if we had round bra or ket brackets.  
Instead of curly brackets, we considered using round brackets (parentheses), (…] […), however it is sometimes necessary to include parenthesized expressions as entries in the bra or ket, which would be difficult to parse if we had round bra or ket brackets.