Greater Than or Equal to in LaTeX
In math mode, greater than or equal to is \geq (or its short form \ge) and less than or equal to is \leq (\le): $x \geq 0$ gives x ≥ 0. Plain less than and greater than are the keyboard characters < and >, typed inside $ … $.
Inequality symbols
<Less than. Type it inside math mode.
>Greater than.
\leqLess than or equal to;
\leis identical.\geqGreater than or equal to;
\geis identical.\leqslantSlanted ≤, common in European texts (amssymb);
\geqslantfor ≥.\llMuch less than;
\ggfor much greater than.\nlessNot less than (amssymb);
\ngtr,\nleq,\ngeqfor the others.\lesssimLess than or similar to (amssymb);
\gtrsimfor the other side.\leqqLess than over a double line (amssymb);
\geqqfor ≧.- Text mode, no math preview
\textlessText-mode <, for use outside math (
\textgreaterfor >).
Try it live
Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.
Less than and greater than examples
Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.
Interval condition
LaTeX0 \leq x < 1Chain of inequalities
LaTeXa < b \leq c < dTriangle inequality
LaTeX|x + y| \leq |x| + |y|Much less than
LaTeX\varepsilon \ll 1 \quad \text{and} \quad N \gg 1Slanted forms
LaTeXx \leqslant y \quad \text{vs} \quad x \leq yNegated inequality
LaTeXx \nleq y \iff x > y \text{ (for real numbers)}Asymptotic bound
LaTeXf(n) \lesssim g(n)
Less than and greater than signs
Inside math mode the keyboard < and > are the right symbols, with the correct spacing around them: $a < b$. MathJax also accepts \lt and \gt, which exist to avoid clashes with HTML tags, but standard LaTeX does not define them, so Overleaf reports "Undefined control sequence".
Outside math mode, pdfLaTeX with its old default font encoding prints < as ¡ and > as ¿. Either put the sign in math ($<$), use \textless and \textgreater, or add \usepackage[T1]{fontenc} to the preamble.
Choosing between ≤, ⩽ and ≦
\leq and \le are the same command; pick one and stay consistent. \leqslant (amssymb) draws the slanted form preferred in some countries and journals. \leqq draws the version with a double bar underneath. All three mean the same thing, so the choice is style, not meaning.
Many authors switch the whole document to the slanted form by adding \renewcommand{\leq}{\leqslant} and \renewcommand{\geq}{\geqslant} after loading amssymb.
Inequalities on web pages and in Markdown
In HTML or Markdown processed by MathJax, a < directly followed by a letter can be read as the start of an HTML tag and swallow the rest of the formula. Put spaces around it (a < b) or use \lt, which MathJax understands.
Common mistakes
LaTeX prints
>=as two separate characters. It never merges them into ≥.Instead ofx >= 0Writex \geq 0In running text with the default pdfLaTeX font encoding,
<prints as an inverted exclamation mark ¡.Instead ofThe value is <5 in all cases.WriteThe value is $<5$ in all cases.\ltand\gtare MathJax conveniences. A LaTeX document needs the plain characters in math mode.Instead of\lt, \gt % in a .tex fileWrite<, >The slanted, negated and "similar to" forms come from amssymb; without it they are undefined.
Instead of\leqslant % without amssymbWrite\usepackage{amssymb}
In Overleaf, MathJax and Word
Overleaf and pdfLaTeX
<,>,\leq,\geq,\lland\ggneed nothing extra.\leqslant,\nleq,\lesssimand\leqqneed\usepackage{amssymb}.\ltand\gtare not defined.MathJax and KaTeX
MathJax and KaTeX support every command on this page, including
\ltand\gt. Mind the HTML issue: keep a space after<in formulas embedded in HTML.Microsoft Word
In a Word equation, typing
\leor\geand pressing Space inserts ≤ or ≥ through Math AutoCorrect. Copy for Word from the editor here pastes the full inequality as an editable equation.
Less than and greater than in LaTeX: questions
- How do I write greater than or equal to in LaTeX?
- Use
\geqor\gein math mode:$x \geq 5$. For the slanted ⩾ use\geqslantwith amssymb. - How do I write less than in LaTeX?
- Type
<inside math mode:$a < b$. In plain text use\textless, or load\usepackage[T1]{fontenc}so the character prints correctly. - Is there a difference between \leq and \le?
- No.
\leis a shorter name for the same symbol; the output is identical. - Why does < print as ¡ in my LaTeX document?
- The character is outside math mode and pdfLaTeX is using its old OT1 font encoding. Put it in math mode, use
\textless, or add\usepackage[T1]{fontenc}. - How do I write not greater than or equal to?
- Use
\ngeq(amssymb), or\not\geq.\ngeqis the better-looking choice.
Related LaTeX reference
- Not Equal in LaTeXThe ≠ sign with \neq or \ne, and other negated relations: not equivalent, not an element of, not a subset.
- Approximately Equal in LaTeX\approx for ≈, plus \sim, \simeq, \cong and \equiv, with what each symbol means.
- Plus Minus Sign in LaTeXThe ± sign with \pm, the minus-plus ∓ with \mp, ± in running text, and uncertainties such as 5.0 ± 0.1.
- LaTeX equation editorSymbol panel, live preview, and PNG, SVG, MathML or Word export.
- All LaTeX reference pagesSymbols, math structures and text formatting in one list.
Have the formula as a picture?
Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.
Convert an image to LaTeX