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.
- Text mode, no math preview
a & b \\Inside tabular, array and matrices: next column.
- Text mode, no math preview
x &= 1Inside align or aligned: the alignment point.
\text{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.
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
LaTeXP(A \,\&\, B) = P(A)\,P(B \mid A)Logic texts sometimes use & for "and";
\land(∧) is the usual symbol.Aligned at the equals sign
LaTeX\begin{aligned} 2x + 3 &= 7 \\ 2x &= 4 \\ x &= 2 \end{aligned}Matrix columns
LaTeX\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}Cases
LaTeX\lvert x \rvert = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}Text with an ampersand
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
LaTeXSmith \& Jones (2024) measured the effect.Compiled resultSmith & Jones (2024) measured the effect.
Ampersand inside a table cell
LaTeX\begin{tabular}{ll} Team & Lead \\ R\&D & Kim \\ \end{tabular}Compiled resultTeam Lead R&D Kim
"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 ofSmith & JonesWriteSmith \& JonesA trailing
&creates an extra empty column and can give "Extra alignment tab".Instead of1 & 2 & \\ (two columns)Write1 & 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&insidealigned,casesand matrices. In HTML pages the ampersand may need to be written&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.
- Handwritten math to LaTeXPhotograph notes or a whiteboard and get LaTeX for every line.1 credit per image
- PDF to LaTeXTurn a paper or textbook PDF into a .tex project with every equation.10 credits per page
- Image to WordA screenshot or photo of a page becomes Word with editable equations.10 credits per image
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
&.
Related LaTeX reference
- How to Make a LaTeX TableThe tabular environment: column alignment, borders, merged cells, booktabs rules, captions, plus array for tables inside math.
- Matrix in LaTeXpmatrix, bmatrix, vmatrix and friends: rows with \\, columns with &, plus 2x2, 3x3, augmented and n×n examples.
- How to Write a Multiline Equation in LaTeXalign and align* for aligned lines, aligned inside $$ … $$, split, gather and multline for long formulas and systems of equations.
- How to Write a Bar in LaTeXx̄ with \bar, long bars with \overline, and the vertical bar | with \vert or \mid.
- Tensor Product in LaTeX⊗ with \otimes, ⨂ with \bigotimes and its limits, ⊕ with \oplus, and tensor powers V^{\otimes n}.
- Congruent Symbol in LaTeX≅ with \cong for geometry and isomorphism, ≡ with \equiv and \pmod for modular arithmetic, and \ncong / \not\equiv.
- 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