Extended bra–ket notation: Difference between revisions

ArrowHead294 (talk | contribs)
m Formatting
m Partial undo for less inline math etc. Update the unicode links
Tag: Undo
Line 1: Line 1:
{{texmap}}
'''Extended Bra-Ket notation''', or '''EBK''' for short, is a potential name for the notation system for [[regular temperament theory]] (RTT) objects that has gradually developed over time, with contributions from various theoreticians.  
'''Extended Bra-Ket notation''', or '''EBK''' for short, is a potential name for the notation system for [[regular temperament theory]] (RTT) objects that has gradually developed over time, with contributions from various theoreticians.  


Line 19: Line 18:
When a bra and a ket are put together, the dot product is taken, and the result is a scalar (a single number). In order to be compatible in this way, the bra and ket must at least have the same number of entries, so that each of their entries will pair up for a product.
When a bra and a ket are put together, the dot product is taken, and the result is a scalar (a single number). In order to be compatible in this way, the bra and ket must at least have the same number of entries, so that each of their entries will pair up for a product.


So mapping 45/32 with 7-ET would be notated as {{nowrap|{{vmprod|7 11 16|-5 2 1}} {{=}} (−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 {{nowrap|{{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 {{map|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 31: Line 30:
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 {{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.


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.


==== Advantage ====
==== Advantage ====
Line 45: Line 44:


<math>
<math>
\left[ \begin{matrix}
\left[ \begin{array} {rrr}
1 & 0 & -4 \\
1 & 0 & -4 \\
0 & 1 & 4 \\
0 & 1 & 4 \\
\end{matrix} \right]
\end{array} \right]
</math>
</math>




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 = \val{1 & 0 & -4}</math> and <math>𝒎_2 = \val{0 & 1 & 4}</math>. 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: <math>\monzo{𝒎_1 & 𝒎_2}</math>, or fully written out, <math>\monzo{\monzo{1 & 0 & -4}\,\monzo{0 & 1 & 4}}</math>.
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}}}}.


For another example, one possible canonical [[comma basis]] for [[7edo|7-tone equal temperament]] consists of the two intervals [[81/80]] and [[135/128]], with PC-vectors {{vector|-4 4 -1}} 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 {{vector|-11 7}} and {{vector|-7 3 1}}, respectively. As a matrix <math>\mathrm{C}</math>, we'd see this as:




<math>
<math>
\left[ \begin{matrix}
\left[ \begin{array} {rrr}
-4 & -7 \\
-11 & -7 \\
4 & 3 \\
7 & 3 \\
-1 & 1 \\
0 & 1 \\
\end{matrix} \right]
\end{array} \right]
</math>
</math>




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 = \monzo{-4 & 4 & -1}</math> and <math>\textbf{c}_2 = \monzo{-7 & 3 & 1}</math>. 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: <math>\val{\textbf{c}_1 & \textbf{c}_2}</math>, or fully written out, <math>\val{\monzo{-4 & 4 & -1}\,\monzo{-7 & 3 & 1}}</math>.
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}}}}.


==== History ====
==== History ====
Line 75: 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: <math>\left[a, b, c, \ldots\right]</math>. So meantone's mapping would look like <math>\left[\val{1 & 0 & -4}, \val{0 & 1 & 4}\right]</math>, and a comma basis for 7-ET would look like <math>\left[\monzo{-4 & 4 & -1}\, \monzo{-7 & 3 & 1}\right]</math>. This notation is completely sufficient and unambiguous, but&mdash;for better or worse&mdash;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 [{{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.


=== Repetition, for multivectors ===
=== Repetition, for multivectors ===
Line 82: 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 94: Line 93:


{| class="wikitable"
{| class="wikitable"
! Symbol !! Unicode !! description
|+
! Symbol !! Unicode !! Description
|-
|-
| &#x27E8; || [http://unicode-table.com/en/27E8/ U+27E8] || MATHEMATICAL LEFT ANGLE BRACKET
| &#x27E8; || [https://symbl.cc/en/27E8/ U+27E8] || MATHEMATICAL LEFT ANGLE BRACKET
|-
|-
| &#x27E9; || [http://unicode-table.com/en/27E9/ U+27E9] || MATHEMATICAL RIGHT ANGLE BRACKET
| &#x27E9; || [https://symbl.cc/en/27E9/ U+27E9] || MATHEMATICAL RIGHT ANGLE BRACKET
|}
|}


Line 116: Line 116:
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 {{vector|-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 {{nowrap|A, B, C, D, E, F, G,}} along with sharps and flats).
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).


=== Variant including curly and square brackets ===
=== Variant including curly and square brackets ===
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 {{map|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 [{{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.


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.  


We also considered using curved angle brackets <span style="font-family: 'Cambria Math', 'STIX Two Math', serif;">⧼</span>...] [...<span style="font-family: 'Cambria Math', 'STIX Two Math', serif">⧽</span>, (Unicode U+29FC and U+29FD), however in some fonts these are almost indistinguishable from ordinary angle brackets. If you see distinctly-curved angle brackets in the preceding sentence, it is only because we specified that they be shown in the font 'Cambria Math' (Windows) or 'STIX Two Math' (Mac). Here's an ordinary angle bracket followed by a curved angle bracket without special treatment: ⟩⧽. If this situation should change in future, a mnemonic for the curved angle brackets is that they can also be called "rounded" angle brackets, and a rounded number is an approximate number in the same way that a tempered interval is an approximation of a just interval. Curly brackets would still be used as a substitute in ASCII-only environments.
We also considered using curved angle brackets <span style="font-family: 'Cambria Math', 'STIX Two Math', serif">⧼</span>] [<span style="font-family: 'Cambria Math', 'STIX Two Math', serif">⧽</span>, (Unicode U+29FC and U+29FD), however in some fonts these are almost indistinguishable from ordinary angle brackets. If you see distinctly-curved angle brackets in the preceding sentence, it is only because we specified that they be shown in the font 'Cambria Math' (Windows) or 'STIX Two Math' (Mac). Here's an ordinary angle bracket followed by a curved angle bracket without special treatment: ⟩⧽. If this situation should change in future, a mnemonic for the curved angle brackets is that they can also be called "rounded" angle brackets, and a rounded number is an approximate number in the same way that a tempered interval is an approximation of a just interval. Curly brackets would still be used as a substitute in ASCII-only environments.


== Notes ==
== Notes ==