Tenney–Euclidean metrics: Difference between revisions

Write the weighted variables explicitly with subscript W, and get rid of A and b in favor of V and m accordingly
ArrowHead294 (talk | contribs)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{inacc}}
The '''Tenney-Euclidean metrics''' are {{w|metric (mathematics)|metrics}} defined in Tenney-Euclidean space. These consist of the TE norm, which measures the [[complexity]] of an [[interval]] in [[just intonation]], the TE temperamental norm, which measures the complexity of an interval ''as mapped by a temperament'', and the octave-equivalent TE seminorms of both.  
The '''Tenney-Euclidean metrics''' are {{w|metric (mathematics)|metrics}} defined in Tenney-Euclidean space. These consist of the TE norm, which measures the [[complexity]] of an [[interval]] in [[just intonation]], the TE temperamental norm, which measures the complexity of an interval ''as mapped by a temperament'', and the octave-equivalent TE seminorms of both.  


== TE norm ==
== TE norm ==
The '''Tenney–Euclidean norm''' ('''TE norm''') or '''Tenney–Euclidean complexity''' ('''TE complexity''') applies to [[val]]s as well as to [[monzo]]s.  
The '''Tenney–Euclidean norm''' ('''TE norm''') or '''Tenney–Euclidean complexity''' ('''TE complexity''') applies to [[val]]s as well as to [[monzo]]s, and provides the complexity for either of them.  


Let us define the val weighting matrix ''W'' to be the {{w|diagonal matrix}} with values 1, 1/log<sub>2</sub>3, 1/log<sub>2</sub>5 … 1/log<sub>2</sub>''p'' along the diagonal. For the [[harmonic limit|''p''-limit]] prime basis ''Q'' = {{val| 2 3 5 … ''p'' }},  
Let us define the val weighting matrix ''W'' to be the {{w|diagonal matrix}} with values 1, 1/log<sub>2</sub>3, 1/log<sub>2</sub>5 … 1/log<sub>2</sub>''p'' along the diagonal. For the [[harmonic limit|''p''-limit]] prime basis ''Q'' = {{val| 2 3 5 … ''p'' }},  


<math>\displaystyle W = \operatorname {diag} (1/\log_2 (Q))</math>
$$ W = \operatorname {diag} (1/\log_2 (Q)) $$


Left-multiplying a vector by this matrix scales each entry by the corresponding entry of the diagonal matrix.  
Right-multiplying a row vector by this matrix scales each entry by the corresponding entry of the diagonal matrix.  


Given a val ''V'' expressed as a row vector, the corresponding vector in weighted coordinates is {{nowrap| ''V''<sub>''W''</sub> {{=}} ''VW'' }}, with transpose {{nowrap| {{subsup|''V''|''W''|T}} {{=}} ''WV''{{t}} }} where {{t}} denotes the transpose. Then the dot product of weighted vals is {{nowrap| ''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}} {{=}} ''VW''<sup>2</sup>''V''{{t}} }} (the dot product of a vector with itself, or the sum of the squares of its entries), which makes the Euclidean metric on vals<sup>[how?]</sup>, a measure of complexity, to be {{nowrap| ‖''V''<sub>''W''</sub>‖<sub>2</sub> {{=}} sqrt(''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}}) }} {{nowrap| {{=}} sqrt({{subsup|''v''|1|2}} + {{subsup|''v''|2|2}}/(log<sub>2</sub>3)<sup>2</sup> + … + {{subsup|''v''|''n''|2}}/(log<sub>2</sub>''p'')<sup>2</sup>) }}, where {{nowrap|''n'' {{=}} π(''p'')}} is the number of primes to ''p''; dividing this by sqrt(''n'') gives the TE norm of a val.  
Given a val ''V'' expressed as a row vector, the corresponding row vector in weighted coordinates is {{nowrap| ''V''<sub>''W''</sub> {{=}} ''VW'' }} with transpose {{nowrap| {{subsup|''V''|''W''|T}} {{=}} ''WV''{{t}} }} where {{t}} denotes the transpose. The {{w|dot product}} of a weighted val with itself, or the sum of the squares of its entries, is the squared Euclidean metric of the val, {{nowrap| {{subsup|‖''V''<sub>''W''</sub>‖|2|2}} {{=}} ''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}} {{=}} ''VW''<sup>2</sup>''V''{{t}} }}. Thus the Euclidean metric on the val, a measure of complexity, is {{nowrap| ‖''V''<sub>''W''</sub>‖<sub>2</sub> {{=}} sqrt(''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}}) }} {{nowrap| {{=}} sqrt({{subsup|''v''|1|2}} + {{subsup|''v''|2|2}}/(log<sub>2</sub>3)<sup>2</sup> + … + {{subsup|''v''|''n''|2}}/(log<sub>2</sub>''p'')<sup>2</sup>) }}, where {{nowrap|''n'' {{=}} π(''p'')}} is the {{w|prime-counting function}} which records the number of primes to ''p''; dividing this by sqrt(''n'') gives the TE norm of a val.  


Similarly, if '''m''' is a monzo, then in weighted coordinates the monzo becomes {{nowrap| '''m'''<sub>''W''</sub> {{=}} ''W''{{inv}}'''m''' }}, and the dot product is {{nowrap| {{subsup|'''m'''|''W''|T}}'''m'''<sub>''W''</sub> {{=}} '''m'''{{t}}''W''<sup>-2</sup>'''m''' }}, leading to {{nowrap| sqrt({{subsup|'''m'''|''W''|T}}'''m'''<sub>''W''</sub>) {{=}} sqrt({{subsup|''m''|1|2}} + (log<sub>2</sub>3)<sup>2</sup>{{subsup|''m''|2|2}} + … + (log<sub>2</sub>''p'')<sup>2</sup>{{subsup|''m''|''n''|2}}) }}; multiplying this by sqrt(''n'') gives the dual RMS norm on monzos which serves as a measure of complexity.  
Geometrically, this means you divide each of the val's entries by the logarithm base 2 of the prime that it corresponds to, then treat the resulting vector as a point in Euclidean space. The norm is the distance from the origin to that point, scaled by the square root of the dimensionality of the space.
 
For example, for 31et, you get {{val| 31 49/log<sub>2</sub>3 72/log<sub>2</sub>5 87/log<sub>2</sub>7 }}, or roughly {{val| 31 30.92 31.01 30.99 }}. Each of these entries individually tells you how sharp or flat each tuning is relative to the octave. The distance from the origin to this point is ~61.96, which is divided by {{nowrap| sqrt(4) {{=}} 2 }} to receive the norm, 30.98.
 
Similarly, if '''m''' is a monzo, then in weighted coordinates the monzo becomes {{nowrap| '''m'''<sub>''W''</sub> {{=}} ''W''{{inv}}'''m''' }}, and the dot product is {{nowrap| {{subsup|'''m'''|''W''|T}}'''m'''<sub>''W''</sub> {{=}} '''m'''{{t}}''W''<sup>−2</sup>'''m''' }}, leading to {{nowrap| sqrt({{subsup|'''m'''|''W''|T}}'''m'''<sub>''W''</sub>) {{=}} sqrt({{subsup|''m''|1|2}} + (log<sub>2</sub>3)<sup>2</sup>{{subsup|''m''|2|2}} + … + (log<sub>2</sub>''p'')<sup>2</sup>{{subsup|''m''|''n''|2}}) }}; multiplying this by sqrt(''n'') gives the dual RMS norm on monzos which serves as a measure of complexity.
 
This is a similar method, but instead of dividing by the logarithm of each prime, you multiply, which can be thought of as scaling the lattice of intervals so that larger primes represent greater distances along their respective axes. Again, this results in a vector that can be treated as a point in Euclidean space. Then, as with vals, the TE norm is the distance from the origin to that point, but this time it is multiplied by the square root of the dimensionality rather than divided.
 
For example, the TE complexity of 5/3 is the distance from the origin to {{monzo| 0 -1.585 2.322 }}, the scaled version of the monzo {{monzo| 0 -1 1 }}, multiplied by sqrt(3). That value is 2.939.


== TE temperamental norm ==
== TE temperamental norm ==
{{Todo|Rewrite|inline=1|text=Pretty sure a lot of this is just sorta assuming we don't already have the generator tuning map.}}
Suppose now ''V'' is a matrix whose rows are vals defining a ''p''-limit regular temperament. Then the corresponding weighted matrix is {{nowrap| ''V''<sub>''W''</sub> {{=}} ''VW'' }}. The [[Tenney–Euclidean tuning|TE tuning]] [[projection matrix]] is then {{nowrap| ''P''<sub>''W''</sub> {{=}} {{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> }}, where {{+}} denotes the {{w|Moore–Penrose pseudoinverse}}. If the rows of ''V''<sub>''W''</sub> (or equivalently, ''V'') are linearly independent, then we have {{nowrap| {{subsup|''V''|''W''|+}} {{=}} {{subsup|''V''|''W''|T}}(''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}}){{inv}} }}. In terms of vals, the tuning projection matrix is {{nowrap| {{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> {{=}} {{subsup|''V''|''W''|T}}(''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}}){{inv}}''V''<sub>''W''</sub> }} {{nowrap| {{=}} ''WV''{{t}}(''VW''<sup>2</sup>''V''{{t}}){{inv}}''VW'' }}. ''P''<sub>''W''</sub> is a {{w|positive-definite matrix|positive semidefinite matrix}}, so it defines a {{w|definite bilinear form|positive semidefinite bilinear form}}. In terms of weighted monzos ('''m'''<sub>''W''</sub>)<sub>1</sub> and ('''m'''<sub>''W''</sub>)<sub>2</sub>, {{subsup|('''m'''<sub>''W''</sub>)|1|T}}''P''<sub>''W''</sub>('''m'''<sub>''W''</sub>)<sub>2</sub> defines the semidefinite form on weighted monzos, and hence {{subsup|'''m'''|1|T}}''W''{{inv}}''P''<sub>''W''</sub>''W''{{inv}}'''m'''<sub>2</sub> defines a semidefinite form on unweighted monzos, in terms of the matrix {{nowrap| ''P'' {{=}} ''W''{{inv}}''P''<sub>''W''</sub>''W''{{inv}} }} {{nowrap| {{=}} ''V''{{t}}(''VW''<sup>2</sup>''V''{{t}}){{inv}}''V''}}. From the semidefinite form we obtain an associated {{w|definite quadratic form|semidefinite quadratic form}} '''m'''{{t}}''P'''''m''' and from this the {{w|norm (mathematics)|seminorm}} sqrt('''m'''{{t}}''P'''''m''').
Suppose now ''V'' is a matrix whose rows are vals defining a ''p''-limit regular temperament. Then the corresponding weighted matrix is {{nowrap| ''V''<sub>''W''</sub> {{=}} ''VW'' }}. The [[Tenney–Euclidean tuning|TE tuning]] [[projection matrix]] is then {{nowrap| ''P''<sub>''W''</sub> {{=}} {{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> }}, where {{+}} denotes the {{w|Moore–Penrose pseudoinverse}}. If the rows of ''V''<sub>''W''</sub> (or equivalently, ''V'') are linearly independent, then we have {{nowrap| {{subsup|''V''|''W''|+}} {{=}} {{subsup|''V''|''W''|T}}(''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}}){{inv}} }}. In terms of vals, the tuning projection matrix is {{nowrap| {{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> {{=}} {{subsup|''V''|''W''|T}}(''V''<sub>''W''</sub>{{subsup|''V''|''W''|T}}){{inv}}''V''<sub>''W''</sub> }} {{nowrap| {{=}} ''WV''{{t}}(''VW''<sup>2</sup>''V''{{t}}){{inv}}''VW'' }}. ''P''<sub>''W''</sub> is a {{w|positive-definite matrix|positive semidefinite matrix}}, so it defines a {{w|definite bilinear form|positive semidefinite bilinear form}}. In terms of weighted monzos ('''m'''<sub>''W''</sub>)<sub>1</sub> and ('''m'''<sub>''W''</sub>)<sub>2</sub>, {{subsup|('''m'''<sub>''W''</sub>)|1|T}}''P''<sub>''W''</sub>('''m'''<sub>''W''</sub>)<sub>2</sub> defines the semidefinite form on weighted monzos, and hence {{subsup|'''m'''|1|T}}''W''{{inv}}''P''<sub>''W''</sub>''W''{{inv}}'''m'''<sub>2</sub> defines a semidefinite form on unweighted monzos, in terms of the matrix {{nowrap| ''P'' {{=}} ''W''{{inv}}''P''<sub>''W''</sub>''W''{{inv}} }} {{nowrap| {{=}} ''V''{{t}}(''VW''<sup>2</sup>''V''{{t}}){{inv}}''V''}}. From the semidefinite form we obtain an associated {{w|definite quadratic form|semidefinite quadratic form}} '''m'''{{t}}''P'''''m''' and from this the {{w|norm (mathematics)|seminorm}} sqrt('''m'''{{t}}''P'''''m''').