Congruent Symbol in LaTeX

For congruent triangles or isomorphic objects write \cong (≅): \triangle ABC \cong \triangle DEF. For modular congruence write \equiv (≡) with \pmod: a \equiv b \pmod{n}. The negations are \ncong (amssymb) and \not\equiv.

Congruence symbols

  • A \cong B
    A ≅ B

    ≅: congruent (geometry) or isomorphic (algebra).

  • A \ncong B
    A ≇ B

    ≇: not congruent (amssymb).

  • a \equiv b \pmod{n}
    a ≡ b ( mod n )

    ≡ with the modulus in parentheses.

  • a \not\equiv b \pmod{n}
    a ≢ b ( mod n )

    Not congruent modulo n.

  • f \equiv 0
    f ≡ 0

    ≡ also means "identically equal" or "defined as".

  • a \sim b
    a ∼ b

    ∼: similar or equivalent, a weaker relation.

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

Congruent (≅, ≡) 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.

Which symbol means what

≅ (\cong) is used for congruent figures in geometry and for isomorphisms in algebra and topology. ≡ (\equiv) is used for congruence modulo n, for "identically equal" and in some texts for definitions. ∼ (\sim) is for similar triangles or a general equivalence relation.

Writing the modulus

\pmod{n} adds space and parentheses: "a ≡ b (mod n)". \bmod is the binary operator in "a mod n", and \mod{n} and \pod{n} are variants with and without the word or the parentheses. See the modulo page for all four.

Common mistakes

  • Typed "mod" is set in italic letters as a product m·o·d.

    Instead of
    a \equiv b (mod n)
    Write
    a \equiv b \pmod{n}
  • \ncong comes from amssymb.

    Instead of
    A \ncong B  (no amssymb)
    Write
    \usepackage{amssymb}
  • Most curricula use ≅ for congruent figures; ≡ is the modular or identity symbol.

    Instead of
    \triangle ABC \equiv \triangle DEF
    Write
    \triangle ABC \cong \triangle DEF

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    \cong, \equiv, \pmod need nothing; \ncong needs amssymb.

  • MathJax and KaTeX

    MathJax and KaTeX support \cong, \ncong, \equiv, \not\equiv and \pmod.

  • Microsoft Word

    In a Word equation \cong then Space gives ≅ and \equiv gives ≡.

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.

Congruent (≅, ≡) in LaTeX: questions

What is the LaTeX command for the congruent symbol?
\cong for ≅. For modular congruence use \equiv (≡).
How do I write a ≡ b mod n?
a \equiv b \pmod{n}.
How do I write "not congruent"?
\ncong (with amssymb) or \not\equiv.

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