# How to get a good “divisible by” symbol?

In addition to the "divides" relation, denoted b | a, there is also a "divisible by" relation expressing the converse (a is divisible by b), often designated with three vertical dots.

Up until now, I've settled with

\mathrel{\vdots} But there are two problems with the symbol:

• It is too high relative to the numbers
• It is also somewhat too long

A search with Detexify and the Comprehensive LaTeX Symbol List doesn't reveal anything more suitable. How do I get a good looking "divisible by" symbol?

• Is $A \scalebox{0.75}{\vdots} B$ closer to what you want? – percusse Oct 23 '11 at 21:56
• I agree with egreg that this is not an universal convention. Is this a local convention (in some country)? or is this a new convention in some new branch of mathematics? I am just curious. – Sony Oct 24 '11 at 11:57
• @Sony: This is common in some Eastern Europe countries and Russia. On the other hand, the "|" relation is much less used in these countries. – Andrey Vihrov Oct 24 '11 at 13:05

I've never seen that symbol. But here's how you can define it

\DeclareRobustCommand{\divby}{%
\mathrel{\vbox{\baselineskip.65ex\lineskiplimit0pt\hbox{.}\hbox{.}\hbox{.}}}%
}


It's just an almost straightforward modification of \vdots. In order that the symbol changes size when used in subscripts/superscripts, just enclosing the main part in \text will do.

\documentclass{article}
\usepackage{amsmath}

\DeclareRobustCommand{\divby}{%
\mathrel{\text{\vbox{\baselineskip.65ex\lineskiplimit0pt\hbox{.}\hbox{.}\hbox{.}}}}%
}

\begin{document}

$a\divby b \qquad \sum_{k\divby n}a_k$

\end{document} Here's another way to define a \divby symbol (it additionally requires graphicx though):

\newcommand*{\divby}{\mathrel{\rotatebox{90}{$\hskip-1pt.{}.{}.$}}}% I have another solution. :) You could also use TikZ. (This may be quite straightforward if you load the package in your preamble anyway.)

\documentclass{article}

\usepackage{tikz}

\newcommand{\divby}{\ \tikz \foreach \y in {0ex, 0.65ex, 1.3ex} \fill (0,\y) circle (0.5pt);\ }

\begin{document}
$15\divby 3$
\end{document} • As the old saying goes: "When in doubt, use TikZ" – Martin Tapankov Oct 24 '11 at 10:35
• I would actually recommend against using TiKZ for typography when there is a vanilla LaTeX solution such as egreg's, because it will be much slower. – Niel de Beaudrap Oct 24 '11 at 11:12

Using the stackengine package: \documentclass{article}
\usepackage{amsmath}
\usepackage{stackengine}
\newcommand{\divby}{%
\setstackgap{S}{0.45ex}%
\mathrel{\Shortstack{{.} {.} {.}}}}
\begin{document}
$15\divby 3$
\end{document}