How to Write an Ampersand in LaTeX

Write \& to print an ampersand, in text and in math. A bare & is LaTeX's column separator: in tables, matrices and align it moves to the next column, and anywhere else it stops with "Misplaced alignment tab character &".

The two jobs of &

  • \&
    &

    A printed ampersand, in text or math.

  • a & b \\
    Text mode, no math preview

    Inside tabular, array and matrices: next column.

  • x &= 1
    Text mode, no math preview

    Inside align or aligned: the alignment point.

  • \text{R\&D}
    R&D

    Ampersand inside text in a formula.

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

Ampersand (&) 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.

  • Ampersand in a formula label

    P ( A & B ) = P ( A ) P ( B ∣ A )
    LaTeX
    P(A \,\&\, B) = P(A)\,P(B \mid A)

    Logic texts sometimes use & for "and"; \land (∧) is the usual symbol.

  • Aligned at the equals sign

    2 x + 3 = 7 2 x = 4 x = 2
    LaTeX
    \begin{aligned} 2x + 3 &= 7 \\ 2x &= 4 \\ x &= 2 \end{aligned}
  • Matrix columns

    ( 1 2 3 4 )
    LaTeX
    \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
  • Cases

    | x | = { x x ≥ 0 − x x < 0
    LaTeX
    \lvert x \rvert = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}
  • Text with an ampersand

    Cost of R&D = 1.2 M
    LaTeX
    \text{Cost of R\&D} = 1.2\,\text{M}

In a LaTeX document

These commands work in the text of a .tex document (Overleaf, TeX Live, MiKTeX), not inside math. The box on the right shows what the compiled PDF looks like.

  • Ampersand in text

    LaTeX
    Smith \& Jones (2024) measured the effect.
    Compiled result

    Smith & Jones (2024) measured the effect.

  • Ampersand inside a table cell

    LaTeX
    \begin{tabular}{ll}
    Team & Lead \\
    R\&D & Kim \\
    \end{tabular}
    Compiled result
    TeamLead
    R&DKim

"Misplaced alignment tab character &"

This error means LaTeX met & outside a table or alignment, usually in a sentence ("Smith & Jones"), a title, a URL or a BibTeX field such as journal = {Science & Society}. Escape it as \& everywhere except where it really separates columns.

In a .bib file the field is copied into your document, so the escape is needed there too: journal = {Science \& Society}.

& in tables and equations

In tabular and matrices each & ends a cell and \\ ends the row, so a row needs one & fewer than it has columns. In align and aligned, & marks the point the lines line up on, usually just before =.

Common mistakes

  • A bare & outside a table causes "Misplaced alignment tab character".

    Instead of
    Smith & Jones
    Write
    Smith \& Jones
  • A trailing & creates an extra empty column and can give "Extra alignment tab".

    Instead of
    1 & 2 & \\  (two columns)
    Write
    1 & 2 \\
  • Inside another command's argument, escape & in URLs.

    Instead of
    \url{https://a.com/?x=1&y=2}  (inside \footnote)
    Write
    \url{https://a.com/?x=1\&y=2}

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    \& works without packages. The error message shows the line with the stray &.

  • MathJax and KaTeX

    MathJax and KaTeX accept \& in math and & inside aligned, cases and matrices. In HTML pages the ampersand may need to be written &amp; in the source.

  • Microsoft Word

    In Word type & directly. In an equation array, & marks the alignment point the same way as in LaTeX.

Have this math on paper, in a PDF or a photo?

Retyping formulas is slow. These converters read whole pages and handwriting and give you LaTeX or Word with every equation editable.

Single printed formulas are free: 3 a day without an account, 6 with a free account. New accounts get 30 credits to try handwriting, pages and documents; failed conversions return their credits. See plans and credit prices.

Ampersand (&) in LaTeX: questions

How do I write & in LaTeX?
Use \&.
What does "Misplaced alignment tab character &" mean?
A bare & appears outside a table or alignment. Replace it with \&.
What does & do in align?
It sets the alignment point; the lines are lined up at the &.

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