LaTeX Infinity Symbol, Nabla, Partial and Prime Commands
November 11, 2026 · 10 min read
LaTeX Infinity Symbol, Gradient, Partial and Prime: Calculus Notation
The LaTeX infinity symbol is \infty, typed inside math mode with no package. Calculus needs a few more: \nabla for the gradient, \partial for partial derivatives, ' for prime notation and \prod for products. This page shows each one inside the expressions you actually write, plus the look-alikes that trip people up.
How Do You Type the LaTeX Infinity Symbol?
Write \infty between dollar signs. It's part of base LaTeX, so a plain \documentclass{article} file compiles it without loading amsmath or any other package. The same command works in KaTeX, MathJax and the Markdown apps built on them.
$\infty$, $-\infty$, $\pm\infty$
$(-\infty, \infty)$ and $[0, \infty)$
That renders as , and , then two intervals: all real numbers, and every number from 0 upward. Infinity always takes a round bracket in interval notation, because it isn't a real number the interval can include.
Behind the command, the glyph is ∞, Unicode U+221E INFINITY. The LaTeX2e reference on math symbols lists it as an ordinary symbol, which is why it spaces like a letter rather than an operator.
Watch out for \infin. It looks like another way to write the infinity symbol in LaTeX, but base LaTeX doesn't define it. KaTeX accepts it as an alias, so it renders fine in a Markdown preview. Paste the same source into a LaTeX document and pdflatex stops with "Undefined control sequence". Stick to \infty and your math stays portable.
Infinity in Limits, Sums and Improper Bounds
Infinity rarely appears alone. You'll mostly type it as a subscript or superscript on \lim, \sum or an integral.
$$
\lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x = e
\qquad
\sum_{n=0}^{\infty} \frac{x^n}{n!} = e^x
$$
$$
\int_1^{\infty} \frac{1}{x^2}\,dx = 1
$$
In display math, x \to \infty sits under "lim" and the bounds of the series stack above and below the sigma. The integral is improper, since its upper bound is infinite, and the \, before dx keeps the differential from crowding the fraction. One-sided limits put a sign in a superscript, as in \lim_{x \to 0^+}.
Inline math is different. Write $\lim_{x \to \infty} f(x)$ in a sentence and the x \to \infty part drops to the lower right of "lim", so the line height doesn't jump. \lim\limits_{x \to \infty} forces it underneath even inline, but use that sparingly, because a stacked limit mid-paragraph pushes the lines apart. Sums move their limits the same way, as our LaTeX summation guide explains.
For the arrow, \to and \rightarrow print the same →. Most people use \to under a limit because it's shorter, and \searrow or \nearrow exist if you need a direction of approach.
Gradient Symbol in LaTeX: \nabla, Divergence and Curl
The gradient symbol in LaTeX is \nabla, which prints ∇ (U+2207 NABLA). It needs no package, just math mode. "Del" and "nabla" are two names for the same glyph. What changes the meaning is the operator you put after it.
| You want | Type | Renders as |
|---|---|---|
| Gradient | \nabla f | |
| Divergence | \nabla \cdot \mathbf{F} | |
| Curl | \nabla \times \mathbf{F} | |
| Laplacian | \nabla^2 f or \Delta f | or |
| Del with an arrow | \vec{\nabla} | |
| Bold del | \boldsymbol{\nabla} |
In a LaTeX document, \mathbf{\nabla} stays regular weight, because \mathbf only changes letters and digits. KaTeX bolds it anyway, so use \boldsymbol (from amsmath in LaTeX) to get the same result in both. For the Laplacian, \Delta is the Greek capital delta, not a separate operator command. Both notations are standard, so pick one and keep it consistent.
The physics package adds shortcuts: \grad for ∇, \div for ∇· and \curl for ∇×. Its manual notes that loading it renames the ordinary ÷ command to \divisionsymbol, because \div now means divergence. KaTeX has no \grad or \curl, and its \div still prints the ÷ sign.
You'll also see the LaTeX gradient symbol with a subscript. \nabla_x f renders as , the gradient with respect to x only, which is common in machine learning papers. For a gradient field written out in components, see the partial derivative examples next.
What Is the LaTeX Code for Partial Derivatives?
The partial derivative symbol in LaTeX is \partial (∂, U+2202 PARTIAL DIFFERENTIAL). You build the derivative yourself with \frac, putting \partial in both the numerator and the denominator. If \frac is new to you, start with our guide to fractions in LaTeX.
$$
\frac{\partial f}{\partial x}
\qquad
\frac{\partial^2 f}{\partial x^2}
\qquad
\frac{\partial^2 f}{\partial x \, \partial y}
$$
That renders a first partial, a second partial and a mixed partial. The ^2 goes on \partial in the numerator and on the variable in the denominator. The \, in the mixed case keeps "∂x" and "∂y" from running together.
Shorter forms exist when a fraction is too heavy. \partial_x f renders as , and many textbooks just write . To lay a full set of second partials out as a Hessian, wrap them in a bmatrix as our Markdown matrix guide explains.
Three similar-looking letters mean different things:
dis the ordinary derivative:\frac{df}{dx}. Some style guides set it upright as\mathrm{d}.\partialis the partial derivative of a function of several variables.\delta(δ) is the Greek letter, used for variations and small changes.
The physics package's \pdv{f}{x} and the diffcoeff package save typing in LaTeX documents. We prefer writing \frac{\partial f}{\partial x} out in full anyway, because it renders everywhere, KaTeX included.
How Do You Write Prime Notation in LaTeX?
The prime symbol in LaTeX is \prime, but you rarely type it. Put an apostrophe after the function name instead: f'(x). In math mode, ' is shorthand for a superscript \prime, so f' and f^{\prime} produce the same output. Stack them for higher derivatives.
$f'(x)$, $f''(x)$, $f'''(x)$, $f^{\prime}(x)$
That renders the first, second and third derivatives, then the long form of the first. The LaTeX2e reference points out that f''' matches f^{\prime\prime\prime} with far less typing.
Three details catch people out:
\primeon its own isn't raised.f\primeputs a full-size prime beside the f, so wrap it in a superscript.- A prime and a following superscript merge.
f'^2gives the same result asf^{\prime 2}, with the prime and the 2 sharing one superscript. \backprime(‵) needs the amssymb package in LaTeX. KaTeX has it built in.
Prime notation is Lagrange's. Newton's dot notation marks time derivatives: \dot{x} and \ddot{x} work in base LaTeX, while \dddot{x} needs amsmath. KaTeX renders all three. In running text, a typed ' is an apostrophe, not a prime. For feet and minutes such as 5′, math mode gives you a true prime: $5'$.
LaTeX Product Symbol: \prod Versus \Pi
The LaTeX product symbol is \prod (∏, U+220F N-ARY PRODUCT). It's a big operator, like \sum, so it grows in display math and takes its bounds above and below. \Pi looks similar but is the Greek capital letter, a plain symbol with plain subscripts.
$$
\prod_{k=1}^{n} k = n!
\qquad
\Pi_{k=1}^{n}
$$
$$
\prod_{n=1}^{\infty} \left(1 - \frac{1}{(n+1)^2}\right) = \frac{1}{2}
$$
\prod stacks its bounds and scales up, while \Pi keeps its subscript and superscript at the lower and upper right. Adding \limits to \Pi doesn't help either. LaTeX and KaTeX both reject it with "Limit controls must follow a math operator".
The second block is an infinite product that converges to one half. Inline, \prod shrinks and moves its bounds to the side, exactly like \lim. Its upside-down twin \coprod (∐) gives the coproduct. For integral signs and other operators, see our LaTeX symbols reference.
Calculus Symbols in Markdown Math: What KaTeX Accepts
Most Markdown apps render math with KaTeX or MathJax, not a real TeX engine. If you need a refresher on inline and display delimiters, our Markdown equation guide covers them. The table below checks each command from this page against a LaTeX document and the KaTeX supported functions list.
| Command | Renders as | In a LaTeX document | In KaTeX |
|---|---|---|---|
\infty | Base | Yes | |
\infin | Error | Yes | |
\nabla | Base | Yes | |
\partial | Base | Yes | |
\prime, ' | Base | Yes | |
\backprime | amssymb | Yes | |
\dot, \ddot | Base | Yes | |
\dddot | amsmath | Yes | |
\prod, \coprod | Base | Yes | |
\grad, \pdv, \dv | none | physics | No |
We compiled each LaTeX entry with pdflatex and rendered each KaTeX entry with KaTeX 0.16. Jupyter renders Markdown math with MathJax rather than KaTeX, so test unusual commands there separately. Our Jupyter Markdown cheat sheet covers notebook math alongside cells and tables.
Our editor renders math with KaTeX, using $...$ for inline and $$...$$ for display. The \(...\) and \[...\] delimiters aren't supported. KaTeX can't load packages, so physics shortcuts won't render in the preview. That's the main limitation here: write the long forms if your Markdown has to render on the web.
Edit the sample below and the preview updates as you type. It types the ∇ character directly, which KaTeX accepts in math. In a LaTeX file, write \nabla instead, since pdflatex rejects the raw character.
Need a single formula as an image instead? The LaTeX equation editor renders with KaTeX in your browser, has a symbol palette and exports PNG or SVG.
Quick Answers on ∞, Derivative Notation and Text Mode
The LaTeX infinity symbol is the easy part: \infty in math mode, everywhere. The traps sit around it, from \infin and physics shortcuts that break outside one renderer to \Pi posing as \prod. Keep to base commands and long-form fractions and your calculus renders the same in LaTeX and on the web. Paste any expression from this page into the editor to check it in the live preview.