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

  • \land
    ∧

    Logical and (conjunction). \wedge draws the same ∧.

  • \lor
    ∨

    Logical or (disjunction). \vee draws the same ∨.

  • \lnot p
    ¬ p

    Negation. \neg is a synonym.

  • \implies
    ⟹

    Implies ⟹ with wide spacing (amsmath).

  • \Rightarrow
    ⇒

    Short double arrow ⇒, often used for implication too.

  • \iff
    ⟺

    If and only if ⟺.

  • \Leftrightarrow
    ⇔

    Short two-way double arrow ⇔.

  • \forall x
    ∀ x

    For all (universal quantifier).

  • \exists x
    ∃ x

    There exists (existential quantifier).

  • \nexists x
    ∄ x

    There does not exist (amssymb).

  • \oplus
    ⊕

    Exclusive or (XOR); \veebar ⊻ is an alternative in amssymb.

  • \top \quad \bot
    ⊤ ⊥

    True (top) and false (bottom).

  • \bigwedge_{i=1}^{n} p_i
    ⋀ i = 1 n p i

    Big and over many terms, like a sum sign. \bigvee is 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.

Templates

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

    ¬ ( p ∧ q ) ⟺ ¬ p ∨ ¬ q
    LaTeX
    \lnot (p \land q) \iff \lnot p \lor \lnot q
  • Contrapositive

    ( p ⟹ q ) ⟺ ( ¬ q ⟹ ¬ p )
    LaTeX
    (p \implies q) \iff (\lnot q \implies \lnot p)
  • Epsilon-delta definition

    ∀ ε > 0 ∃ δ > 0 : | x − a | < δ ⟹ | f ( x ) − L | < ε
    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

    ⋀ i = 1 n p i = p 1 ∧ p 2 ∧ ⋯ ∧ p n
    LaTeX
    \bigwedge_{i=1}^{n} p_i = p_1 \land p_2 \land \cdots \land p_n
  • Exclusive or

    p ⊕ q ⟺ ( p ∨ q ) ∧ ¬ ( p ∧ q )
    LaTeX
    p \oplus q \iff (p \lor q) \land \lnot (p \land q)
  • Unique existence

    ∃ ! x ∈ R : x 3 = 8
    LaTeX
    \exists! \, x \in \mathbb{R} : x^3 = 8
  • And inside a set

    { x ∈ R : x > 0 ∧ x < 1 }
    LaTeX
    \{ x \in \mathbb{R} : x > 0 \land x < 1 \}
  • Ampersand in math

    R&D budget = 2 × 10 6
    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}.

LaTeX
\usepackage{amsmath}  % \implies, \impliedby
\usepackage{amssymb}  % \nexists, \veebar

Common mistakes

  • An unescaped & in running text raises "Misplaced alignment tab character &".

    Instead of
    Research & Development
    Write
    Research \& Development
  • Letters 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$
  • \not overlays a slash that often sits off-center on ∃. amssymb has a proper ∄ glyph.

    Instead of
    \not\exists x
    Write
    \nexists x
  • \and only separates authors inside \author{}; it is not a logic symbol and fails in formulas.

    Instead of
    p \and q
    Write
    p \land q

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    Works as listed; add amsmath for \implies and amssymb for \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, \iff and \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 \land or \wedge in 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 \lor and \vee, and \lnot and \neg. Choose by meaning so the source reads well.
How do I write "for all" and "there exists"?
Use \forall for ∀ and \exists for ∃, for example \forall x \in A \; \exists y. For "there does not exist" use \nexists from amssymb, and \exists! for "there exists exactly one".
How do I write "if and only if"?
Use \iff for the long arrow ⟺ or \Leftrightarrow for the short ⇔. In prose many authors simply write "iff".

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