# What do you do when a sentence ends with a factorial?

Consider the following sentences which utilizes the mathematical factorial operation:

The answer is 5!.

or

The equation is given by

f(x) = (x+4)!.

Typically in mathematical writing, an expression in a sentence is treated as a word and is therefore punctuated accordingly. But in this case, a period following an exclamation point looks awkward. Would a period still be used here to indicate the end of the sentence?

• What do the other articles in the journal do? Feb 6, 2019 at 2:16
• Yes. ---------- Feb 6, 2019 at 4:53
• Enclose the whole item in parentheses of some sort, e.g. The answer is {5!}. or The equation is given by {f(x) = (x+4)!}. [Or if that particular kind of symbol has a special meaning, choose another - even quotation marks will do.] Note also that some style guides say not to put punctuation at the end of an indented quote, so maybe your second example doesn't need a period at all! :-) Feb 6, 2019 at 6:48
• Look up the relevant style manual and let us know. Good Luck.
– Kris
Feb 6, 2019 at 7:25
• I can't find any examples of this case. Feb 6, 2019 at 19:14

The manual of style of the AMS advises:

Each mathematics equation reads as a clause or sentence and is punctuated accordingly. Authors, however, sometimes leave displayed math unpunctuated. Insert commas and periods as needed so that the equation(s), the preceding text, and the following text together read grammatically. Follow CMS, sections 12.18–12.20, for punctuating mathematical expressions and elided lists, operators, and relations.

This implies that you can choose.

I never punctuate displayed math. The capitalization, or lack of it, of the next line, the vertical spacing, and the indentation are punctuation enough. I would use a period after an inline equation, specially after a factorial, otherwise it is ambiguous if the sentence is an exclamation or an equation involving factorial.

If every sentence is required to end with a punctuation mark (which is reasonable), then IMO it's better to punctuate to avoid ambiguity.

With this convention, the sentence

The answer is 5!

is exclamatory.

Note that the above convention is especially important when posing a question involving a factorial expression:

Is the answer 5!?

The only potential headache is something like:

The answer is 5!!

But, with the above convention in mind, the meaning is clear: the writer is excited that the answer is 5!.

• Clever thinking for in-line equations! May 7, 2020 at 1:34

The accepted answer is wrong in that "This implies that you can choose". That is only true if you have an editor that corrects your choice of not punctuating your displayed equations. This is what the AMS Style Guide means with its formulation. It states in Section 12.1 that "Many authors do not punctuate series of equations even if their text punctuation is acceptable. We edit to include this punctuation."

Mathematical expressions, including displayed equations, are treated as phrases or sentences and are punctuated accordingly. (See for example Section 12.7 of the AMS Style Guide.)