Do mathematical equations require punctuation?

Mathematicians rarely heed the advice of grammarians. In mathematical writing, one often places equations in a numbered environment outside of the inline text. Consider the following example.

Define f to be the function,  
       f(x) = sin x              (1) 
where x is to take values in [0,pi]. 

Although one rarely finds correct punctuation or consistent grammar in math textbooks or online, I'm inclined to be as anal as physically possible in my Ph.D. thesis and consult the appropriate authorities in the matter.

What is the correct protocol for punctuation in the numbered equation environment?

In particular, should there be a comma after "sin x"?


Donald Knuth seems to agree that mathematical writing deserves good punctuation (see pages 5 and 6 at that link for examples of a period and comma following formulas). It's in Wikipedia's Manual of Style as well, for what it's worth.


Mathematics texts require special care, because many punctuation symbols have special meaning in a mathematical context. It's for that reason that equations are often not included inline, and why you shouldn't try to do fancy things like including punctuation inside parentheses in a mathematical text.

In other words, I see nothing wrong with the text that you quoted, and I think that a mathematical text which avoided this sort of thing would be much harder to use than the usual.