Does Not Divide in LaTeX (\nmid)

∤\nmid
LaTeX command
\nmid
Package
Add to your preamble:\usepackage{amssymb}
Mode
Math mode only
Copy the Unicode character
∤U+2224

Where it is used

Slashed vertical bar stating that one integer does not divide another.

Number theorists write 3 \nmid 10 and use it in hypotheses such as Fermat's little theorem: if p \nmid a, then a^{p-1} \equiv 1 \pmod p. It is the negation of \mid and has the same relation spacing; \not\mid produces a slash that is often poorly placed, so prefer \nmid. Avoid a plain | with a slash typed by hand. In computer science it appears in conditions on strides, periods and hash table sizes, such as k \nmid n. Related precomposed negations include \nparallel and \nleq.

Also listed under: Sains Komputer

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

p∤a  ⟹  ap−1≡1(modp)p \nmid a \implies a^{p-1} \equiv 1 \pmod{p}
\documentclass{article}
\usepackage{amssymb,amsmath}
\begin{document}
Does Not Divide: $\nmid$

\[ p \nmid a \implies a^{p-1} \equiv 1 \pmod{p} \]
\end{document}

Related symbols

All Teori Nombor →

Frequently asked questions

How do I write Does Not Divide in LaTeX?
Type \nmid in math mode, for example $p \nmid a \implies a^{p-1} \equiv 1 \pmod{p}$. Load amssymb first with \usepackage{amssymb}.
Which package do I need for \nmid?
\nmid needs amssymb: add \usepackage{amssymb} to your preamble before the document starts.
Can I use \nmid in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\nmid$ in running text. If you only need the glyph in text, paste the Unicode character ∤ instead (with XeLaTeX or LuaLaTeX and a font that has it).
Math poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan