And Symbol and Logic Symbols in LaTeX
It depends on which "and" you mean. For the logical and ∧, write \land (or its synonym \wedge) in math mode: $p \land q$. For a literal ampersand &, write \&, because a bare & is LaTeX's column separator. The other logic symbols follow the same pattern: \lor ∨, \lnot ¬, \implies ⟹, \iff ⟺, \forall ∀ and \exists ∃.
Logic symbols
\landLogical and (conjunction).
\wedgedraws the same ∧.\lorLogical or (disjunction).
\veedraws the same ∨.\lnot pNegation.
\negis a synonym.\impliesImplies ⟹ with wide spacing (amsmath).
\RightarrowShort double arrow ⇒, often used for implication too.
\iffIf and only if ⟺.
\LeftrightarrowShort two-way double arrow ⇔.
\forall xFor all (universal quantifier).
\exists xThere exists (existential quantifier).
\nexists xThere does not exist (amssymb).
\oplusExclusive or (XOR);
\veebar⊻ is an alternative in amssymb.\top \quad \botTrue (top) and false (bottom).
\bigwedge_{i=1}^{n} p_iBig and over many terms, like a sum sign.
\bigveeis the big or.\&A literal ampersand character, in text or math.
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.
Logic symbols 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.
De Morgan's law
LaTeX\lnot (p \land q) \iff \lnot p \lor \lnot qContrapositive
LaTeX(p \implies q) \iff (\lnot q \implies \lnot p)Epsilon-delta definition
LaTeX\forall \varepsilon > 0 \; \exists \delta > 0 : \; |x - a| < \delta \implies |f(x) - L| < \varepsilon\;adds a thick space so the quantifiers do not run together.Big and
LaTeX\bigwedge_{i=1}^{n} p_i = p_1 \land p_2 \land \cdots \land p_nExclusive or
LaTeXp \oplus q \iff (p \lor q) \land \lnot (p \land q)Unique existence
LaTeX\exists! \, x \in \mathbb{R} : x^3 = 8And inside a set
LaTeX\{ x \in \mathbb{R} : x > 0 \land x < 1 \}Ampersand in math
LaTeX\text{R\&D budget} = 2 \times 10^6
Logical and versus the ampersand
& is a special character in LaTeX: it separates columns in tabular, align and matrices. Typed on its own in a paragraph it stops the compile with "Misplaced alignment tab character &". Escape it as \& whenever you want the character itself, for example Smith \& Jones.
For "and" in a logical formula use \land or \wedge. They are the same symbol; \land reads better in logic, \wedge in exterior algebra. If you only want the word, write it as text inside math: x > 0 \text{ and } y > 0.
Implies: \implies or \Rightarrow?
\implies (from amsmath) draws a long arrow ⟹ with extra space on both sides, which suits a statement between two formulas. \Rightarrow is the shorter ⇒ with ordinary relation spacing, common inside a line of symbols. \iff is the long two-way version; \Leftrightarrow the short one. Pick one pair and use it throughout.
Which package do I need?
\land, \lor, \lnot, \neg, \forall, \exists, \Rightarrow, \iff, \top, \bot and \oplus work in plain LaTeX. \implies and \impliedby need \usepackage{amsmath}; \nexists and \veebar need \usepackage{amssymb}.
\usepackage{amsmath} % \implies, \impliedby
\usepackage{amssymb} % \nexists, \veebarCommon mistakes
An unescaped & in running text raises "Misplaced alignment tab character &".
Instead ofResearch & DevelopmentWriteResearch \& DevelopmentLetters in math mode are variables, so "and" comes out as three italic letters with no spaces.
Instead of$p and q$Write$p \land q$ or $p \text{ and } q$\notoverlays a slash that often sits off-center on ∃. amssymb has a proper ∄ glyph.Instead of\not\exists xWrite\nexists x\andonly separates authors inside\author{}; it is not a logic symbol and fails in formulas.Instead ofp \and qWritep \land q
In Overleaf, MathJax and Word
Overleaf and pdfLaTeX
Works as listed; add
amsmathfor\impliesandamssymbfor\nexists. Remember\&in titles, bibliography entries and table cells that should show an ampersand.MathJax and KaTeX
MathJax and KaTeX know all of these commands, including
\implies,\iffand\nexists, without loading anything. A bare&outside an aligned environment is an error there too, so use\&.Microsoft Word
In Word you can simply type & as text. For ∧, ∨, ¬ and ⟹ inside a formula, write it in the editor on this page and use Copy for Word to paste an editable Word equation.
Logic symbols in LaTeX: questions
- What is the LaTeX command for the and symbol?
- For logical and (∧) use
\landor\wedgein math mode. For the ampersand character (&) use\&. - How do I type an ampersand in LaTeX?
- Write
\&. The backslash tells LaTeX you want the character, not a column break. This works in text, in\text{}and in math. - Is there a difference between \land and \wedge?
- No visible one: both produce ∧ with the same spacing. Likewise
\lorand\vee, and\lnotand\neg. Choose by meaning so the source reads well. - How do I write "for all" and "there exists"?
- Use
\forallfor ∀ and\existsfor ∃, for example\forall x \in A \; \exists y. For "there does not exist" use\nexistsfrom amssymb, and\exists!for "there exists exactly one". - How do I write "if and only if"?
- Use
\ifffor the long arrow ⟺ or\Leftrightarrowfor the short ⇔. In prose many authors simply write "iff".
Related LaTeX reference
- How to Write an Arrow in LaTeXRight, left, double, long, maps-to and labeled arrows (\to, \Rightarrow, \xrightarrow), plus arrows in text mode.
- Element of Symbol (∈) in LaTeX\in for ∈, \notin for ∉, \ni for ∋, and how ∈ differs from the Greek letter epsilon.
- Subset in LaTeX\subset, \subseteq, \subsetneq, the superset forms and the negated "not a subset" symbols.
- 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