Factorial spacing inside equation

It's incorrect to detach the ! meaning “factorial” from the symbol preceding it, because it's a modifier similar to a prime or a subscript and is not a punctuation symbol.

In case you have a factorial followed by an ordinary symbol (not a relation or operation symbol), it's good practice to add a thin space after it:

\documentclass{report}

\begin{document}

\[
\makebox[4em]{Good:}
\hat{d}=\frac{(d+n)!}{n!\,d!}
\]
\[
\makebox[4em]{Bad:}
\hat{d}=\frac{(d+n)\,!}{n\,!d\,!}
\]
\end{document}

I've also shown what would happen when detaching the factorial symbol, in order to demonstrate it would be wrong.

enter image description here

Tags:

Math Mode