35

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}

Example

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?

Charles Stewart
  • 21,014
  • 5
  • 65
  • 121
Andrey Vihrov
  • 22,325
  • 1
    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
  • 4
    @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

4 Answers4

46

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.

enter image description here

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}

enter image description here

egreg
  • 1,121,712
7

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

\newcommand*{\divby}{\mathrel{\rotatebox{90}{$\hskip-1pt.{}.{}.$}}}%

enter image description here

Werner
  • 603,163
5

Using the stackengine package:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{stackengine}
\newcommand{\divby}{%
 \setstackgap{S}{0.45ex}%
 \mathrel{\Shortstack{{.} {.} {.}}}}
\begin{document}
$15\divby 3$
\end{document}
azetina
  • 28,884
5

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}

enter image description here

Count Zero
  • 17,424