\prime prime (′) in LaTeX

Command\prime
Modemath
Packagenone, part of LaTeX
Unicode′ U+2032
KindMiscellaneous math symbols

\prime typesets the symbol “prime” (′). It is a math symbol.

Try it

f′(x)f^{\prime}(x)

Open this formula in the editor The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

Example

\documentclass{article}
\begin{document}
\( f^{\prime}(x) \)
\end{document}

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023.

How to use it

\prime works only in math mode. In running text, put it between $...$ or \(...\). Outside math mode LaTeX stops with Missing $ inserted. The command is part of LaTeX; you need no package.

An apostrophe does the same with less typing: f'(x) equals f^{\prime}(x).

About miscellaneous math symbols

These symbols behave like a letter or a digit: LaTeX adds no space around them. They include infinity, the derivative signs, dots for omitted terms and a few shapes.

More miscellaneous math symbols

All miscellaneous math symbols