LMFDB / lmfdb

L-Functions and Modular Forms Database
Other
246 stars 199 forks source link

Visualisations of Dirichlet characters #3996

Open alexjbest opened 4 years ago

alexjbest commented 4 years ago

At yesterdays LMFDB friday we discussed adding pictures to the homepages of Dirichlet characters in the same way as elliptic curve and cmf plots. As dirichlet characters can be specified completely by just a few roots of unity (values of the generators) we could just plot those, but thats a little boring, and doesn't let you "see" any properties of the character. We discussed a few ideas but one we quite liked was based on the idea of plotting partial sums of exponential sums, Gauss sums in this case (I think I was sortof inspired by https://www.johndcook.com/expsum/).

The different partial gauss sums for different values of the parameter $a$ are plotted in different colours, getting brighter as more terms are included. We also put a dot of the same colour for the final value.

One mathematically significant fact about Gauss sums is that for a primitive character all of the complete gauss sums have absolute value $\sqrt{modulus}$ so we additionally plot a circle of that radius, allowing us to "see" the primitivity of the character. One can also see the order of the character in many cases as the order of rotational symmetry of the picture. One can instantly recognise trivial characters by the presence of red horizontal spike for instance. Probably there is more we can see from them (real character iff symmetry in the real axis?)

I've but together a demo of some of these at https://alexjbest.github.io/dirich/ you should be able to zoom in/out to see more at once and click the label for the lmfdb page.

Let me know what you think, the goal is to be mathematically correct and somewhat meaningful but also visually pleasing, so feedback on both aspects is appreciated. The sage code I've been using to make these is at https://alexjbest.github.io/dirich/code.sage if you want to play with more

27.8

AndrewVSutherland commented 4 years ago

I think these do a great job of achieving both of your goals. Would it be reasonable to compute these for modulus up to 1000 (which would about 300,000 characters), and maybe for characters of small order (up to 20, say) for modulus up to 10000, or do the pictures get ridiculous or hard to compute at some point?

It might be interesting to see a few examples at 100,200,...,1000,2000,...,9000.

davidfarmer commented 4 years ago

The dots are hard to see. Maybe make then a lot bigger? The primitivity is visible by those dots landing on the circle, and that should be instantly obvious.

I'm talking really big! Those dots are at least as important as the lines and the circle.

Experiment a bit and make them way too big, and then reduce back down again until it looks more reasonable. This is a useful technique in general. If you are trying to hang a picture at the right height, keep moving it up until it looks good. Then go up way too high and move it down until it looks good. Then compare the two answers (which usually are not the same.)

See subsection "Anchoring as adjustment" in Chapter 11 "Anchors" of Thinking Fast and Slow.

What values of "a" are you using, and how many different values? Is it all possible "a"s?

I this is idea is on a good track.

On Sat, 22 Aug 2020, Alex J Best wrote:

At yesterdays LMFDB friday we discussed adding pictures to the homepages of Dirichlet characters in the same way as elliptic curve and cmf plots. As dirichlet characters can be specified completely by just a few roots of unity (values of the generators) we could just plot those, but thats a little boring, and doesn't let you "see" any properties of the character. We discussed a few ideas but one we quite liked was based on the idea of plotting partial sums of exponential sums, Gauss sums in this case (I think I was sortof inspired by https://www.johndcook.com/expsum/).

The different partial gauss sums for different values of the parameter $a$ are plotted in different colours, getting brighter as more terms are included. We also put a dot of the same colour for the final value.

One mathematically significant fact about Gauss sums is that for a primitive character all of the complete gauss sums have absolute value $\sqrt{modulus}$ so we additionally plot a circle of that radius, allowing us to "see" the primitivity of the character. One can also see the order of the character in many cases as the order of rotational symmetry of the picture. One can instantly recognise trivial characters by the presence of red horizontal spike for instance. Probably there is more we can see from them (real character iff symmetry in the real axis?)

I've but together a demo of some of these at https://alexjbest.github.io/dirich/ you should be able to zoom in/out to see more at once and click the label for the lmfdb page.

Let me know what you think, the goal is to be mathematically correct and somewhat meaningful but also visually pleasing, so feedback on both aspects is appreciated.

27.8

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, orunsubscribe.[AABTULGFAXGEJCYDQG7ADLLSCAQMNA5CNFSM4QIIK2F2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4K GF5WWQ.gif]

alexjbest commented 4 years ago

Thanks both for the comments, I keep coming back to this occasionally but haven't been able to spend a lot of time on it unfortuately. I've made the dots bigger and regenerated the page but not produced any more extremal examples yet. It does take quite a while for large examples, sage's plotting functionality seems to be the slow bit, so I envisage it should be possible to improve this (perhaps by coding the graphics part at a lower level). I also stumbled upon https://archive.bridgesmathart.org/2020/bridges2020-243.html which seems quite related but I haven't unpacked exactly what they're doing there yet.

davidfarmer commented 4 years ago

The dots are easier to see, but they still don't look to me like a feature. For certain moduli (59 for example), the dots can't get much bigger, because there are a lot of them and they will start to overlap. But for moduli where there are not so many, it might catch people's attention to make them bigger.

Are you a fan of mid-century modern? This clock was my inspiration for suggesting bigger dots:

https://i.pinimg.com/originals/ce/a0/98/cea098021f2ca6b883a71380f4f50675.jpg

On Mon, 14 Sep 2020, Alex J Best wrote:

Thanks both for the comments, I keep coming back to this occasionally but haven't been able to spend a lot of time on it unfortuately. I've made the dots bigger and regenerated the page but not produced any more extremal examples yet. It does take quite a while for large examples, sage's plotting functionality seems to be the slow bit, so I envisage it should be possible to improve this (perhaps by coding the graphics part at a lower level). I also stumbled upon https://archive.bridgesmathart.org/2020/bridges2020-243.html which seems quite related but I haven't unpacked exactly what they're doing there yet.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, orunsubscribe.[AABTULABNWSDDBQSMPSKBGLSF2HMHA5CNFSM4QIIK2F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORP WSZGOFFCD3BQ.gif]