TITLE: Should I put commas after my matrices in a paper?
QUESTION [6 upvotes]: When I need to put a matrix in my paper, I usually use $$  to center it on my page, and I usually describe something about the matrix immediately after, e.g., "which has real entries..."
should I put a comma after the matrix?  Is that the standard thing to do when writing a paper?
There's a bit of spacing between the matrix and the comma, so it looks a bit weird, but I also want to be grammatically correct, too.
What do you think?
Thanks,

REPLY [2 votes]: Well, from a grammatical point of view, it seems that a comma is mandatory. But let us make some practical experiments...
Version 1: no comma. 
Consider the matrix
$$
\pmatrix{d_1&0&0&0\\0&d_2&0&0\\0&0&d_3&0\\0&0&0&d_4}
$$
which has real entries on the diagonal.
Version 2: with a comma. 
Consider the matrix
$$
\pmatrix{d_1&0&0&0\\0&d_2&0&0\\0&0&d_3&0\\0&0&0&d_4},
$$
which has real entries on the diagonal.
Version 3: with a comma and an extra space.
Consider the matrix
$$
\pmatrix{d_1&0&0&0\\0&d_2&0&0\\0&0&d_3&0\\0&0&0&d_4}\ ,
$$
which has real entries on the diagonal.
Version 4: with a comma and an extra space, matrix in scriptsize.
Consider the matrix
$$
{\scriptsize\pmatrix{d_1&0&0&0\\0&d_2&0&0\\0&0&d_3&0\\0&0&0&d_4}}\ ,
$$
which has real entries on the diagonal.
Conclusion. This is definitely opinion based, but I have a slight preference for version 3. Version 4 could be occasionally used, for instance for a very large matrix.