# What does the exclamation mark do?

I've seen this but never knew what it does. Can any one let me in on the details? Thanks.

-
One of my students: "What is $7!$... is it like SEVEN?!?!" – The Chaz 2.0 Sep 27 '11 at 2:27
@TheChaz: in a high squeaky voice? ;) – J. M. Sep 28 '11 at 18:15
@J. M. - Not exactly! He was actually one of the bigger college students that I've worked with... I used to run into Thomas at the gym every so often. – The Chaz 2.0 Sep 28 '11 at 19:52
"Among the worst of barabarisms is that of introducing symbols which are quite new in mathematical, but perfectly understood in common, language. Writers have borrowed from the Germans the abbreviation n! to signify 1.2.3.(n - 1).n, which gives their pages the appearance of expressing surprise and admiration that 2, 3, 4, &c. should be found in mathematical results." - Augustus de Morgan, 1842. – Michael Lugo Nov 10 '11 at 15:51

Probably you're thinking about the symbol for the factorial function: $$n! = 1\times 2 \times 3\times \cdots \times (n-1) \times n$$

-

An exclamation mark can also be shorthand for "unique". For example, the statement $$\forall y\in f(A), \exists!x\in A \text{ s.t. } y=f(x)$$ would be read as "for all $y$ in the range of $f$, there exits a unique $x$ in the domain such that $y=f(x)$". In other words, $f$ is one-to-one.

-

...or possibly double factorial $n!! = n \times (n-2) \times (n-4) \times \cdots$, or maybe subfactorial, $!n$, also known as derangement number.

Added ... and superfactorial for desert.

-
the superfactorial has little rainfall? :-) – robjohn Sep 27 '11 at 1:28
...and there's even a hyperfactorial, too. :) – J. M. Sep 28 '11 at 18:14

For completeness:

Although in mathematics the $!$ almost always refers to the factorial function, you often see it in quasi-mathematical contexts with a different meaning.

For example, in many programming languages it is used to mean negation, for example in Java the expression !true evaluates to false. It is also commonly used to express inequality, for example in the expression 1 != 2, read as '1 is not equal to 2'.

It is also used in some functional languages to denote a function that modifies its input, as in the function set! in Scheme, which sets its first argument to the value of its second argument.

-

I just wanted to add a common usage for it as well since that may be of more interest to you.

A common usage for the factorial is in permutations.

For example: If there were 3 people in a race, how many possible ways could there be to arrange the ranking.

The answer would be 3! (3 factorial) or 3 x 2 x 1 or 6 ways.

Listing them the brute force way: 1) A,B,C

2)A,C,B

3)B,A,C

4)B,C,A

5)C,A,B

6)C,B,A

This extends into a lot of other things but most commonly associated with statistics, I believe.

-