How to Type Math Symbols in LaTeX (π, √, ∑, ≤)

Igor R.

June 27, 2026

Short answer: in LaTeX, math symbols are commands typed inside math mode. Wrap inline math in $ ... $ and use \pi for π, \sqrt{x} for √x, \frac{a}{b} for a fraction, \sum for ∑, and \leq \geq \neq for ≤ ≥ ≠. Outside math mode, those commands error or print as plain text.

If you only need the character itself, tap to copy it below.

Tap to copyCopied!

These are plain Unicode characters. They paste into Word, Google Docs, Slack or a web page — but pasting them into a LaTeX source file is a different question, and the answer is usually no. See Can I paste π directly into LaTeX? below.

Rule #1: everything happens in math mode

A LaTeX symbol command only becomes a symbol inside math mode. There are three ways in:

ModeSyntaxUse it for
Inline$E = mc^2$ or \( E = mc^2 \)Math inside a sentence
Display (unnumbered)\[ E = mc^2 \]A centred equation on its own line
Display (numbered)\begin{equation} ... \end{equation}Equations you want to reference

Type \pi in ordinary text and you get an error or a literal \pi. Wrap it — $\pi$ — and you get π.

Two more essentials you’ll use in almost every formula:

  • Superscript: ^x^{2} gives x²
  • Subscript: _a_{i} gives aᵢ
  • Both: x_{i}^{2}

The braces are optional for a single character (x^2 works), but always use braces for two or more characters. x^12 renders as x¹2, not x¹². This trips up beginners constantly.

Greek letters in LaTeX

A LaTeX command rendering a summation symbol
SymbolCommandUnicodeHTML entity
α\alphaU+03B1α
β\betaU+03B2β
γ\gammaU+03B3γ
δ\deltaU+03B4δ
θ\thetaU+03B8θ
λ\lambdaU+03BBλ
μ\muU+03BCμ
π\piU+03C0π
σ\sigmaU+03C3σ
ϕ\phiU+03D5ϕ
φ\varphiU+03C6φ
ω\omegaU+03C9ω
Δ\DeltaU+0394Δ
Σ\SigmaU+03A3Σ
Ω\OmegaU+03A9Ω
Π\PiU+03A0Π

Note the phi rows. LaTeX’s \phi is the closed-loop ϕ; the curly φ that most people picture is \varphi. They are different characters, and swapping them is the single most common Greek-letter mix-up.

The uppercase Greek rule (this catches everyone)

You may have read that you simply capitalise the first letter to get the uppercase form. That’s only half true. LaTeX provides commands for exactly eleven uppercase Greek letters:

\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega

There is no \Alpha, no \Beta, no \Mu, no \Chi — because uppercase alpha is just A, uppercase beta is B, uppercase mu is M. Those letters are visually identical to Latin capitals, so you type the Latin letter:

latex

$A$   % uppercase Alpha
$B$   % uppercase Beta
$M$   % uppercase Mu
$X$   % uppercase Chi

Typing $\Alpha$ gives you an Undefined control sequence error.

Variant shapes

Several Greek letters have a second, curlier form. Both are valid — journals and fields differ on which they prefer:

StandardVariant
\epsilon (ϵ)\varepsilon (ε)
\theta (θ)\vartheta (ϑ)
\phi (ϕ)\varphi (φ)
\rho (ρ)\varrho (ϱ)
\sigma (σ)\varsigma (ς)
\pi (π)\varpi (ϖ)

If your equation “looks wrong” next to a textbook, a variant is usually the reason.

Operators and relations

SymbolCommandUnicodeHTML entity
×\timesU+00D7×
÷\divU+00F7÷
±\pmU+00B1±
\mpU+2213∓
·\cdotU+22C5⋅
\astU+2217∗
\leq (or \le)U+2264≤
\geq (or \ge)U+2265≥
\neq (or \ne)U+2260≠
\approxU+2248≈
\equivU+2261≡
\proptoU+221D∝

Need these symbols outside LaTeX? See our full guide to the comparison symbols ≈ ≤ ≥ ≠.

× vs · — which multiplication sign?

  • \times (×) — cross products, dimensions (a 3 × 4 matrix), elementary arithmetic.
  • \cdot (·) — the standard choice for scalar multiplication in algebra: a \cdot b.
  • Nothing at all — in most mathematical writing, ab already means a times b. Don’t add an operator unless it earns its place.

Slanted relations

If you prefer the slanted ⩽ ⩾ used in French and some European typography, load amssymb and use \leqslant and \geqslant.

Fractions, roots and powers

What you wantCommandPackage
Fraction\frac{a}{b}base
Inline-sized fraction\tfrac{a}{b}amsmath
Display-sized fraction (full size even inline)\dfrac{a}{b}amsmath
Square root\sqrt{x}base
nth root\sqrt[n]{x}base
Powerx^{2}base
Subscripta_{i}base
Bothx_{i}^{2}base
Binomial coefficient\binom{n}{k}amsmath

Package note: \frac and \sqrt are built into base LaTeX and need nothing. But \binom, \tfrac and \dfrac all come from amsmath — without it you get an undefined control sequence error. (Base LaTeX’s binomial is the older {n \choose k} syntax, which still works but is discouraged.)

Nested fractions get cramped fast. If \frac{\frac{a}{b}}{c} looks unreadable, use \dfrac for the outer one, or rewrite it as \frac{a}{bc}.

Big operators and calculus

SymbolCommandUnicodeHTML entityPackage
\sumU+2211∑base
\prodU+220F∏base
\intU+222B∫base
\iintU+222C∬amsmath
\ointU+222E∮base
\inftyU+221E∞base
\partialU+2202∂base
\nablaU+2207∇base
\rightarrow or \toU+2192→base
\RightarrowU+21D2⇒base
\leftrightarrowU+2194↔base

Add limits with the subscript and superscript characters:

latex

\sum_{i=1}^{n} i
\int_{0}^{1} x^{2} \, dx
\lim_{x \to 0} \frac{\sin x}{x}
\prod_{k=1}^{n} k

Why do my limits appear beside the ∑ instead of above it?

Because you’re inline. LaTeX deliberately puts limits to the side in inline math so it doesn’t wreck your line spacing, and above and below in display math:

  • $\sum_{i=1}^{n}$ → limits sit to the right of the sigma
  • \[ \sum_{i=1}^{n} \] → limits sit above and below

To force the stacked look inline, use \sum\limits_{i=1}^{n} or \displaystyle\sum_{i=1}^{n}. It will increase the height of that line of text — that’s the trade you’re making.

Sets and logic

SymbolCommandUnicodeHTML entityPackage
\inU+2208∈base
\notinU+2209∉base
\subsetU+2282⊂base
\subseteqU+2286⊆base
\cupU+222A∪base
\capU+2229∩base
\emptysetU+2205∅base
∅ (round)\varnothingU+2205∅amssymb
\forallU+2200∀base
\existsU+2203∃base
\thereforeU+2234∴amssymb
\mathbb{R}U+211Dℝamssymb

A correction worth knowing: \emptyset is base LaTeX and produces the slashed-zero shape. \varnothing — the rounder ∅ most people actually want — is the one that needs amssymb. They are not interchangeable in appearance, only in meaning.

For blackboard-bold number sets (ℝ ℕ ℤ ℚ ℂ), add \usepackage{amssymb} to your preamble, then use $\mathbb{R}$, $\mathbb{N}$, $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{C}$.

Math fonts: bold, blackboard, calligraphic, upright

CommandLooks likeTypical use
\mathbf{v}vVectors, matrices
\mathbb{R}Number sets (amssymb)
\mathcal{L}script LLagrangians, sigma-algebras
\mathrm{d}xupright dDifferentials, unit names
\mathit{x}xEmphasis inside math
\text{if } x > 0if x > 0Words inside an equation (amsmath)

\text{} is the one people miss most. Type `ifx>0if x > 0ifx>0` and LaTeX treats “if” as two italic variables i and f multiplied together, with mangled spacing. Use `if x>0\text{if } x > 0if x>0`.

Accents, vectors and hats

CommandResultCommon in
\hat{x}Estimators, unit vectors
\bar{x}Sample means
\vec{v}v⃗Vectors
\dot{x}Time derivatives
\ddot{x}Second derivatives
\tilde{a}ãApproximations
\overline{AB}line over ABLine segments, conjugates
\widehat{ABC}wide hatAngles, multi-letter terms
\widetilde{xy}wide tildeMulti-letter approximations

The short forms (\hat, \tilde) sit over one character. The wide forms (\widehat, \widetilde) stretch across several. \overline stretches to any length.

Brackets, matrices and aligned equations

Auto-sizing brackets

Plain ( and ) stay small even around a tall fraction. Wrap them in \left and \right and they grow to fit:

latex

\left( \frac{a}{b} \right)
\left[ \sum_{i=1}^{n} x_i \right]
\left\{ x : x > 0 \right\}

Every \left needs a matching \right. For a bracket on one side only, use \right. (with the dot) as an invisible partner.

Matrices

These environments come from amsmath:

latex

\begin{pmatrix} a & b \\ c & d \end{pmatrix}   % parentheses
\begin{bmatrix} a & b \\ c & d \end{bmatrix}   % square brackets
\begin{vmatrix} a & b \\ c & d \end{vmatrix}   % vertical bars (determinant)

& separates columns, \\ starts a new row.

Aligned equations

To line several equations up on their equals signs:

latex

\begin{align}
  f(x) &= x^2 + 2x + 1 \\
  &= (x+1)^2
\end{align}

Use align* (with the asterisk) to drop the equation numbers. Also amsmath.

Spacing inside math mode

LaTeX handles spacing automatically, and it’s usually right. When it isn’t:

CommandWidthTypical use
\,thin spaceBefore dx in an integral: \int f(x) \, dx
\:medium spaceFine-tuning
\;thick spaceFine-tuning
\quad1 emSeparating an equation from a condition
\qquad2 emWider separation
\!negative thin spacePulling symbols closer

Pressing the spacebar inside math mode does nothing. $a b$ and $ab$ render identically. If you want visible space, you need one of the commands above.

The degree symbol in LaTeX

There is no \degree command in base LaTeX. Three working options:

MethodCodeRequires
Superscript circle$90^{\circ}$Nothing — works everywhere
Dedicated command\usepackage{gensymb} then 90\degreegensymb package
Units package\usepackage{siunitx} then \ang{90}siunitx package

The superscript circle (^{\circ}) is the safest choice: it needs no package and works in KaTeX and MathJax too. If you’re writing a science paper full of units, siunitx is worth learning properly — it handles the spacing between number and unit for you.

Outside LaTeX, the degree sign has its own shortcuts on every platform — see how to type the degree symbol °.

Can I paste Unicode symbols directly into LaTeX?

This is the question the copy buttons above always raise, and the answer depends on your engine:

EnginePasting π into your .tex file
pdfLaTeX (the default)❌ Fails. You get Package inputenc Error: Unicode char \u8:π not set up for use with LaTeX
XeLaTeX / LuaLaTeX + unicode-math✅ Works — you can type π, ∑, ≤ directly in the source
KaTeX / MathJax⚠️ Depends on the fonts loaded. Commands are safer

The pdfLaTeX behaviour surprises people because accented letters work fine. Type é or ü in body text and pdfLaTeX handles it without complaint. Math symbols are the exception: inputenc only maps a small subset of Unicode, and π, ∑ and ℝ aren’t in it. You can force it by declaring each character yourself — \DeclareUnicodeCharacter{03C0}{\ensuremath{\pi}} — but that’s a line of preamble per symbol.

(A related detail if you use Overleaf: it can’t store characters outside Unicode’s Basic Multilingual Plane at all, which rules out the italic math letters like 𝛼 that you sometimes get when copying from a PDF. Use \alpha.)

Practical advice: use the commands. \pi compiles in every engine, every editor, every journal template. Pasted Unicode is a portability problem waiting for the moment you send your .tex file to a co-author or a publisher.

Where you can write LaTeX math

LaTeX isn’t tied to one operating system — it’s a language. What varies is the editor you write it in.

Overleaf (any device with a browser)

The fastest way to start, and where the examples in this article were compiled. Nothing to install. Works on Windows, macOS, Chromebook, Linux, and a tablet browser. Create a document, add \usepackage{amsmath, amssymb} to the preamble, and compile. This is the route we recommend for Chromebook and mobile users, where a full local TeX install isn’t practical. (For everything else on ChromeOS, see typing symbols on a Chromebook.)

Windows

Install MiKTeX or TeX Live, then write in TeXstudio, TeXworks (bundled with MiKTeX), or VS Code with the LaTeX Workshop extension. MiKTeX is the friendlier start — it downloads missing packages on demand instead of making you install everything up front. It targets Windows 10 and 11; 32-bit support ended in 2022 and Windows 7 support in 2023.

macOS

Install MacTeX, the macOS packaging of TeX Live, which bundles the TeXShop editor. MacTeX-2026 requires macOS 11 Big Sur or later and runs natively on both Intel and Apple silicon — support for Mojave and Catalina was dropped. If 5 GB is too much, BasicTeX is the ~120 MB alternative.

Linux

TeX Live is in every major distribution’s repositories. On Debian and Ubuntu, sudo apt install texlive-latex-recommended gives you both amsmath and amssymb without the multi-gigabyte texlive-full install. (amsmath ships in texlive-latex-base; amssymb comes from amsfonts in texlive-base. Both are pulled in as dependencies.)

Microsoft Word

Press Alt + = to open a math zone, then choose LaTeX as the input format on the Equation ribbon, type your command, and hit Convert. Two things to know:

  • LaTeX input is a Microsoft 365 subscriber feature. Older perpetual-licence builds offer UnicodeMath only.
  • Word does not support \begin{} / \end{}. A matrix is written \matrix{a & b \\ c & d} instead.
  • Every other Office app — Excel, PowerPoint, OneNote — supports UnicodeMath only, not LaTeX.

Google Docs

Insert → Equation opens the equation toolbar. Type a backslash, the symbol name, then a space\pi + space becomes π. Superscripts and subscripts use ^ and _. Google doesn’t publish a full command list, so treat it as a useful subset of LaTeX, not the whole language: Greek letters, common relations and operators, fractions and roots all work. Anything exotic, use Insert → Special characters and search by name.

Notion

Notion renders math with KaTeX. Press Ctrl + Shift + E (Cmd + Shift + E on Mac) for an inline equation, or type /math for a block, then use the same commands: \pi, \frac{a}{b}, \sum. More in our guide to inserting symbols in Notion.

A web page

Load KaTeX or MathJax from a CDN and write $...$ in your HTML. For a single symbol with no library at all, just use the HTML entity — π renders as π, ∑ as ∑, ≤ as ≤. The entity column in the tables above gives you these directly.

The same commands work outside LaTeX

KaTeX and MathJax implement a large subset of LaTeX math syntax, so your commands carry over to:

  • Notion equations
  • GitHub Markdown ($...$ in issues, PRs and README files)
  • Jupyter notebooks
  • Stack Exchange, on math-enabled sites
  • Many static site generators and documentation tools

\pi, \sqrt{}, \frac{}{}, \sum, \leq behave identically in all of them.

One important difference: KaTeX and MathJax have no packages. There is no preamble and no \usepackage. Commands like \mathbb{R} and \therefore — which need amssymb in real LaTeX — simply work. Conversely, genuine LaTeX features (custom packages, TikZ diagrams, most \newcommand scope) do not. Don’t assume a .tex file will render if you paste it into Notion.

Finding a command you can’t remember

Detexify lets you draw a symbol with your mouse or finger and returns the matching LaTeX command plus the package it needs — often the more useful half of the answer.

Two limits worth knowing: it’s guessing from your handwriting, so the top hit isn’t always right (check the next few), and its database is community-maintained, so very new or very obscure symbols may be missing.

For a systematic search, the Comprehensive LaTeX Symbol List on CTAN catalogues thousands of symbols by category and package. It’s a PDF rather than a search tool, but it’s exhaustive.

Worked examples

You wantYou typeIt renders
Area of a circle$\pi r^{2}$πr²
Pythagoras$\sqrt{a^{2}+b^{2}}$√(a²+b²)
One half$\frac{1}{2}$½
Sum to n$\sum_{i=1}^{n} i$∑ from i=1 to n
Definite integral$\int_{0}^{1} x^{2} \, dx$∫₀¹ x² dx
Inequality$x \leq y$x ≤ y
Real numbers$x \in \mathbb{R}$x ∈ ℝ
Right angle$90^{\circ}$90°
Quadratic formula$x = \frac{-b \pm \sqrt{b^{2}-4ac}}{2a}$the full formula
Overleaf editor showing the LaTeX source for the quadratic formula next to the compiled PDF output, demonstrating frac, pm and sqrt.

Troubleshooting LaTeX math errors

Error / symptomCauseFix
Undefined control sequenceThe command needs a package you haven’t loadedAdd \usepackage{amsmath, amssymb}
Undefined control sequence on \Alpha, \Beta, \MuThese commands don’t existType the Latin capital: A, B, M
Command prints as literal textYou’re outside math modeWrap it: $\pi$
Missing $ insertedA math command escaped into text mode, or an unclosed $Check every $ has a partner
Package inputenc Error: Unicode charYou pasted π or ∑ into a pdfLaTeX source fileUse \pi, or switch to XeLaTeX / LuaLaTeX
Double superscriptTwo ^ in a row, e.g. x^2^3Use braces: x^{2^{3}}
Missing } insertedUnbalanced bracesCount your { and }
Limits appear beside ∑, not aboveYou’re in inline mathUse display mode, or \sum\limits_{...}
x^12 renders as x¹2Only the first character is superscriptedUse braces: x^{12}
Degree sign looks wrongWrong character or missing packageUse ^{\circ}, or gensymb / siunitx
Spacing looks crampedThe spacebar does nothing in math modeUse \, \; \quad
Words in an equation look italic and crampedLaTeX reads letters as variablesWrap them: \text{if } (amsmath)
φ looks wrong\phi is ϕ, not φUse \varphi

The preamble that prevents most of these

latex

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
  ...your math here...
\end{document}

Loading amsmath and amssymb up front eliminates the large majority of undefined-control-sequence errors people hit with math symbols.

Quick reference card

NeedCommandPackage
Inline math$ ... $base
Display math\[ ... \]base
Pi\pibase
Square root\sqrt{x}base
Fraction\frac{a}{b}base
Sum\sum_{i=1}^{n}base
Integral\int_{a}^{b}base
≤ ≥ ≠\leq \geq \neqbase
Infinity\inftybase
Degree^{\circ}base
Binomial\binom{n}{k}amsmath
Matrix\begin{pmatrix}amsmath
Aligned equations\begin{align}amsmath
Text in math\text{...}amsmath
Blackboard bold ℝ\mathbb{R}amssymb
Therefore ∴\thereforeamssymb
Round empty set ∅\varnothingamssymb

Frequently Asked Questions

How do I type math symbols in LaTeX?

Type commands in math mode. Wrap inline math in $…$ and use commands such as \pi for pi (π), \sqrt{x} for a square root (√x), and \leq for the less-than-or-equal symbol (≤).

How do I write a fraction or square root in LaTeX?

Use \frac{a}{b} to create a fraction and \sqrt{x} for a square root. For an nth root, use \sqrt[n]{x}.

How do I type the degree symbol in LaTeX?

There is no built-in \degree command in base LaTeX. Instead, use a superscript circle, such as 90^{\circ}, or load the gensymb or siunitx package to use a dedicated degree command.

Why do I get “Undefined control sequence”?

This error usually means the command you are using requires an additional package. Add amsmath and amssymb to your document preamble if the symbol depends on those packages.

How do I find the LaTeX command for a symbol?

Use Detexify, a tool that lets you draw a symbol and returns the corresponding LaTeX command along with any required package.

Do LaTeX commands work in Notion or Markdown?

Yes. KaTeX and MathJax support a large subset of LaTeX commands, so many of the same commands work in Notion equations, GitHub Markdown, and Jupyter notebooks.

Recap

Symbols are commands, and commands only work in math mode: \pi, \sqrt{}, \frac{}{}, \leq \geq \neq, \sum, \int. Load amsmath and amssymb in your preamble and most errors disappear before they happen. The degree sign is ^{\circ}. Don’t paste Unicode into a pdfLaTeX file — type the command. And when you can’t remember one, draw it in Detexify.

Written by Igor R. · Tested in Overleaf (TeX Live 2026, pdfLaTeX and XeLaTeX), MiKTeX on Windows 11, KaTeX in Notion, and Microsoft 365 Word. Last updated July 2026. Symbol code points follow the Unicode Standard.

Leave a Comment