Extended bra–ket notation: Difference between revisions

No edit summary
Naren (talk | contribs)
m and -> or
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:


== Basics ==
== Basics ==
The name ''bra–ket notation'' refers to its two basic structures: the '''bra''' and the '''ket'''. A bra is a list which has a pointed bracket on its ''left'' side, and a ket is a list which has a pointed bracket on its ''right'' side. Bras are used for covectors (such as [[Val|vals]]), and kets are used for vectors (such as [[monzos]]). In a basic sense, vectors can be thought of as tangible objects (like intervals), and covectors are used for things you do to those objects (like temperaments).  
The name ''bra–ket notation'' refers to its two basic structures: the '''bra''' and the '''ket'''. A bra is a list which has a pointed bracket on its ''left'' side, and a ket is a list which has a pointed bracket on its ''right'' side. Bras are used for covectors (such as [[val]]s), and kets are used for vectors (such as [[monzo]]s). In a basic sense, vectors can be thought of as tangible objects (like intervals), and covectors are used for things you do to those objects (like temperaments).  


The usage patterns described in this section are the same as the standard usage of bra–ket notation in quantum mechanics.
The usage patterns described in this section are the same as the standard usage of bra–ket notation in quantum mechanics.


=== Common applications ===
=== Common applications ===
In RTT, covectors are used most frequently for [[Val|vals]] (including [[tuning map]]s). For example, the val for 7-ET is notated as {{bra| 7 11 16 }}, and a (tempered-prime) tuning map for it might be {{bra|1209.682 1900.930 2764.988}}.
In RTT, covectors are used most frequently for vals (including [[tuning map]]s). For example, the val 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 type of vectors used in RTT is the [[Monzos|monzo]] (both [[Prime-count vector|prime-count vectors]] and [[Generator-count vector|generator-count vectors]]). For example, the monzo for 45/32 is {{ket| -5 2 1 }}, and the monzo for ~45/32 in porcupine temperament is {{ket| 2 -11 }} (for the generators ~2/1 and ~11/10).
The most common type of vectors used in RTT is the monzo (both [[prime-count vector]]s and [[generator-count vector]]s). For example, the monzo for 45/32 is {{ket| -5 2 1 }}, and the tempered monzo for ~45/32 in porcupine temperament is {{ket| 2 -11 }} (for the generators ~2/1 and ~11/10).


=== Combining ===
=== Combining ===
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. The dot product corresponds to "applying" the covector to the vector.
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. The {{w|dot product}} corresponds to "applying" the covector to the vector.


Mapping 45/32 with 7-ET would be notated as {{nowrap|{{vmp| 7 11 16 | -5 2 1 }} {{=}} {{nowrap|7 ⋅ −5}} + {{nowrap|11 ⋅ 2}} + {{nowrap|16 ⋅ 1}}}} {{nowrap|{{=}} −35 + 22 + 16}} = 3. This means that 45/32 can be found at 3 steps of 7-ET.  
Mapping 45/32 with 7-ET would be notated as {{nowrap|{{vmp| 7 11 16 | -5 2 1 }} {{=}} {{nowrap|7 ⋅ −5}} + {{nowrap|11 ⋅ 2}} + {{nowrap|16 ⋅ 1}}}} {{nowrap|{{=}} −35 + 22 + 16}} = 3. This means that 45/32 can be found at 3 steps of 7-ET.  
Line 28: Line 28:
Vectors (including covectors) are used to represent tuning theory objects of various dimensionality. For example, the monzo {{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 monzo {{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.
Vectors (including covectors) are used to represent tuning theory objects of various dimensionality. For example, the monzo {{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 monzo {{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.


==== Advantage ====
==== Advantage ====
Line 68: Line 68:


==== 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 [{{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.
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 123: Line 123:
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 monzo representing 5/4 in just intonation would be written {{vector| -2 0 1 }}, the mapped version of this in meantone could be written {{rket| -2 4 }}. And while the tempered-prime 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 }}.  
For example, while the monzo representing 5/4 in just intonation would be written {{vector| -2 0 1 }}, the mapped version of this in meantone could be written {{rket| -2 4 }}. And while the ordinary 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 }}.  


They 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.
They 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.
Line 130: Line 130:


They also considered using curved angle brackets <span style="font-family: STIXGeneral, 'Cambria Math', 'STIX Two Math', serif">⧼</span>…] […<span style="font-family: STIXGeneral, '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 may only be because they have been specified to be shown in one of the fonts 'STIXGeneral', '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.
They also considered using curved angle brackets <span style="font-family: STIXGeneral, 'Cambria Math', 'STIX Two Math', serif">⧼</span>…] […<span style="font-family: STIXGeneral, '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 may only be because they have been specified to be shown in one of the fonts 'STIXGeneral', '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.
== Equivalent in matrix notation ==
In ordinary matrix notation, a matrix can be written in terms of its rows or columns using horizontal or vertical bars.<ref>L.N. Trefethen and D. Bau, III, [https://www.stat.uchicago.edu/~lekheng/courses/309/books/Trefethen-Bau.pdf Numerical linear algebra]. Society for industrial and applied mathematics, 1997.</ref>
For example, the meantone mapping above can be written in terms of its rows as
<math>
\begin{bmatrix}
1 & 0 & -4 \\
0 & 1 & 4 \\
\end{bmatrix}
=
\begin{bmatrix}
1 & 0 & -4 \\
\hline
0 & 1 & 4 \\
\end{bmatrix}
</math>
or symbolically, following the notation above, as
<math>
\begin{bmatrix}
\hspace{1.45em} 𝒎_1 \hspace{1.45em} \\
\hline
𝒎_2
\end{bmatrix}
</math>
Likewise, the comma basis above can be written in terms of its columns as
<math>
\left[
\begin{array}{cc}
-11 & -7 \\
7 & 3 \\
0 & 1
\end{array}
\right]
=
\left[
\begin{array}{c|c}
-11 & -7 \\
7 & 3 \\
0 & 1
\end{array}
\right]
</math>
or symbolically as
<math>
\left[
\begin{array}{c|c}
& \\
\textbf{c}_1 & \textbf{c}_2 \\
& \\
\end{array}
\right]
</math>
This notation is widely understood and can also express matrices with block structure by combining horizontal and vertical bars.


== Notes ==
== Notes ==