Blog of Matthew Daws

Visualising primes

Visiting a high school with my son, in the Maths classroom there was a poster on the wall, which visualised primes numbers. I only half remember what it said (taking a photo might have been a little bit weird, in the circumstances) but I think the little write-up at the bottom said that the calculations had been performed in Python, using trial division, and had taken half an hour. This immediately made me think of a prime sieve, so later I had a play with a sieve I had written in Python 3. I now think I must be misremembering, as I cannot see how even trial division could take half an hour in Python (even some years ago).

Read More →

Multiplicative Domains

Reading Ng, Viselter, Amenability of locally compact quantum groups and their unitary co-representations Arxiv I was reminded by a result/technique that I often forget: that of the multiplicative domain of a completely positive map. The following result is due to M.D. Choi (though I like the presentation in Paulsen's book).

Let \( \phi:A\rightarrow B \) be a unital completely positive (UCP) map between unital \( C^\ast \)-algebras. If \( a\in A \) with \( \phi(a)^\ast\phi(a) = \phi(a^\ast a) \) then already \( \phi(ba) = \phi(b)\phi(a) \) for any \( b \). If this is the "right hand version" then there is a left hand version, and a bimodule version.

Read More →


My little Python project TileMapBase automates the process of downloading (and caching locally) map tiles from OpenStreetMap (and similar) and assembling these into the background for a matplotkib plot. I wrote this when working in Geographic Data Science and wanting to show longitude latitude locations on a map, inside of a Jupyter Notebook.

Anyway, recently OpenStreetMap started to enforce User Agents in HTTP requests, which broke my package. A pull request later and we're back on the road.

I have spent the last 12 months concentrating on Mathematics, and so am very rusty. It took me a couple of hours to update my Python distribution, get the tests fixed, get Travis building again, and remembering how to upload to PyPi. And this is for a trivial change to a small package. I now understand how Open Source Software becomes unmaintained...

Read More →

British Mathematics Colloquium

I spent much of the last week at the British Mathematics Colloquium on the sunny campus of Lancaster university. These are some notes to myself about interesting things I saw. The one downside to Lancaster hosting the event was their use of their (I guess central IT) fancy seminar announcement system. This means titles and abstracts have disappeared from the internet, and I have to work from my incomplete notes and memory.

Read More →

In Our Time: Random and Pseudorandom

On my commute, I listen to In Our Time, and I have recently gotten back to the delightful episode on Random and Pseudorandom.

The end of discussion touched upon Kolmogorov Complexity which I wish I knew more about. There was also a discussion about visual randomness, and how humans are terribly bad at judging random arrangements of dots (we think that patterns which are made by inhibiting close points are actually more random than a homogeneous Poisson point process). Peter Coles was name checked in regards to this, and as luck would have it, he has a wonderful blog post all about it.

Read More →

Surveys and sampling

At work, we have recently had a "staff survey" performed, and yesterday we got some feedback on the results. I don't want to say anything about the content, but rather to speak about some basic statistics. It was stated that a change of about 2% (upon last year) was "statistically significant". The person giving the presentation then muttered about "standard deviation". I couldn't see what a standard deviation had to do with it.

Let us think how to model this problem. What was performed was a survey of \( N \) people, of whom \( n \) responded. Let us think about two possible ways to model how someone responds:

Read More →

Polar decomposition of functionals

A well-known fact from the basic theory of von Neumann algebras is the polar decomposition of normal functionals: given \( \newcommand{\ip}[2]{\langle #1, #2 \rangle} \) \( \varphi\in M_{*} \) there is \( \omega\in M_{*}^+ \) and a partial isometry \( v\in M \) with \( \varphi = v\omega \). If \( v^* v \) is equal to the support of \( \omega \), then this decomposition is unique, and we write \( |\varphi| \) for \( \omega \).

I am mostly following Takesaki's book here; but the material is also nicely presented in a the MSc thesis of Zwarich. Neither of these sources quite gives a correct proof (IMHO) so I thought I would record here the main steps in proving existence.

Read More →

Neighbourhood bases, continued.

We saw before that on a set \( X \) we can specify a (unique) topology by, for each \( x\in X \), specifying a collection of sets \( U_x \) which will satisfy that:

  • Each \( V\in U_x \) contains \( x \) and will be open;
  • Every open \( C \ni x \) will be such that there is \( V\in U_x \) with \( V\subseteq C \),

if and only if we have the conditions that:

  • Given \( A_1,\cdots,A_n\in U_x \), there is \( A\in U_x \) with \( A\subseteq A_1\cap\cdots\cap A_n \);
  • Given \( B\in U_y \) with \( x\in B \), there is \( A\in U_x \) with \( A\subseteq B \).

However, we might ask: what is the advantage of specifying the "basic open sets" about each point, rather than just specifying a base for the topology?

Read More →
Profile image; rendered glass discs
Recent posts