!

From Why start at x, y, z


The ! symbol is principally used to represent the factorial operation.

When a factorial appears inside a sentence, it's possible to misinterpret the ! as an exclamation mark[1]:

"How many ways of ordering six objects are there?"

"There are 6!"

Two ! symbols together represent the double factorial, multiplying just the odd or even numbers. So juxtaposition doesn't represent composition here: \(x!! \neq (x!)!\)

A ! symbol on the left represents the number of derangements, or subfactorial. The order of precedence is not clear:

Does \(!n!\ = (!n)!\) or \(!(n!)\)?

Does \(a!b = (a!)b \) or \(a(!b)\)?

Does it make it clearer that a factorial is a present if you add another punctuation symbol after the ! symbol?

"There are 6!."

However, if you want to express surprise with an exclamation mark, it could look like a double factorial:

"There are 6!!"

Maybe ! should only be used for "factorial" in contexts that are unambiguously and clearly delimited mathematical notation, and the word "factorial" should be used in prose:

"There are 6 factorial."

The ! symbol is also widely used in category theory to indicate "the unique morphism making a diagram commute". So, for instance, the unique morphism into a terminal object, the unique morphism out of an initial object, the unique morphism into a product making the diagram commute, etc., are all denoted !.

Product diagram
Z
p ↙ ↓ ! ↘ q
X ←π₁— X × Y —π₂→ Y