Skip to main content
Mathematics LibreTexts

2.5: Divisibility Rules

  • Page ID
    7463
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    In this section, we will explore some rules of divisibility for some positive integers.  These rules can be easily extended to all the integers by dropping the sign.

    Let \(x \in \mathbb{Z_+}\).

    Then \[ x= d_n10^n +d_{n-1}10^{n-1}+ \cdots+ d_2 10^2+d_110^1+d_0,\]

    which implies

    \[x= 10( d_n10^{n-1} +d_{n-1}10^{n-2}+ \cdots+ d_2 10+d_1)+d_0.\]

    Thus we can express \(x\) as \(10 a+b\), where \(b=d_0\) is the ones digit of \(x\), and \(a= d_n10^{n-1} +d_{n-1}10^{n-2}+ \cdots+ d_2 10+d_1\).

    Divisibilty by \(2=2^1\): 

     

    Let \(x \in \mathbb{Z_+}\). \(2 \mid x\) iff \(2 \mid b\). In other words, \(2\) divides an integer iff the ones digit of the integer is either \(0, 2, 4, 6,\) or \( 8\).

    Proof:

    Since \( 2\mid 10\), \(x=10 a+b\), and by divisibility theorem I, \(2 \mid x\) iff \(2 \mid b\).\(\Box\)

    Divisibility by \(5:\)

     

    \(5 \mid x\) iff \(5 \mid b\). In other words, \(5\) divides an integer iff the ones digit of the integer is either \(0,\) or \( 5\).

    Proof:

    Since \( 5 \mid 10\), \(x=10 a+b\), and by divisibility theorem I, \(5 \mid x\) iff \( 5 \mid b\).\(\Box\)

    Divisibility by \(10:\)

     

    \(10 \mid x\) iff \(10 \mid b\). In other words, \(10\) divides an integer iff the ones digit of the integer is \(0,\).

    Proof:

    Since \( 10 \mid 10\), \(x=10 a+b\), and by divisibility theorem I, \(10 \mid x\) iff \( 10 \mid b\).\(\Box\)

    Divisibility by \(4=2^2:\)

     

    \(4 \mid x\) iff \( 4 \mid d_1d_0\).

    Proof:
    Let \(x\) be an integer. Then

     

    \( x= d_n10^n +d_{n-1}10^{n-1}+ \cdots+ d_2 10^2+d_110^1+d_0\), which implies

    \(x= 100( d_n10^{n-2} +d_{n-1}10^{n-3}+ \cdots+ d_2)+ 10d_1+d_0=100( d_n10^{n-2} +d_{n-1}10^{n-3}+ \cdots+ d_2)+ d_1d_0\).

    Since \( 4 \mid 100\), \(x=100 a+ d_1d_0\), and by divisibility theorem I, \(4 \mid x\) iff \( 4 \mid d_1d_0\).\(\Box\)

    Divisibility by \(4\) of a two digit number

    \( 4 \mid d_1d_0\) iff \( 4 \mid 2d_1+d_0\)

     

    Divisibility by \(8=2^3:\)

     

    \(8 \mid x\) iff \( 8 \mid d_2 d_1d_0\).

    Proof:

    Let \(x\) be an integer. Then

    \( x= d_n10^n +d_{n-1}10^{n-1}+ \cdots+ d_2 10^2+d_110^1+d_0\), which implies

    \(x= 10^3( d_n10^{n-3} +d_{n-1}10^{n-4}+ \cdots+ d_3)+ 100d_2+10d_1+d_0=10^3( d_n10^{n-3} +d_{n-1}10^{n-4}+ \cdots+ d_3)+ d_2d_1d_0\).

    Since \( 8 \mid 1000\), \(x=1000 a+ d_2d_1d_0\), and by divisibility theorem I, \(8 \mid x\) iff \( 8 \mid d_2d_1d_0\).\(\Box\)

    A similar argument can be made for divisibility by \(2^n\), for any positive integer \(n\).

    Example \(\PageIndex{1}\):

    Using divisibility tests, check if the number \(824112284 \) is divisible by:

    1. \(5\)
    2. \(4\)
    3. \( 8\)

    Solution:

    1.   \(824112284\) is not divisible by \(5.\)

    Rule: The one's digit of the number has to be either a \(0\) or a \(5.\)

    Since the last digit is not \(0\) or \(5,\)  \(824112284\)  is not divisible by \(5.\)

    2. \(824112284 \) is divisible by \( 4.\)

    Rule: The last two digits of the number have to be divisible by 4.

    The last two digits of \(824112284\) is \(84=(4)(21).\)

    Since \(84\) is divisible by \(4, 824112284\) is divisible by \(4\) also.

    3. \(824112284 \) is not divisible by \(8.\)

    Rule: The last three digits of the number have to be divisible by 8.

    The last three digits of \(824112284\) is \(284.\) Since \(284\) is not divisible by \(8,\)  the original number, \(824112284\) is not divisible by \(8\) either.

    Notice the following pattern \(10-1=9, 100-1=99, 1000-1=999, \cdots, 10^n-1=999 \cdots 9\)

    Divisibility by \(3=3^1:\)

     

    \(3 \mid x\) iff \(3\) divides sum of its digits.

    Proof:
    Let \(x \in \mathbb{Z_+}\).

     

    Then \[ x= d_n10^n +d_{n-1}10^{n-1}+ \cdots+ d_2 10^2+d_110^1+d_0,\]

    which implies

    \[x= 9( d_n(10^{n-1} +d_{n-1}10^{n-2}+ \cdots+ d_2 10+d_1)+ (d_0.\]

    Example \(\PageIndex{2}\):

    Find the possible values for the missing digit \(x\), if \( 1234x51234 \) is divisible by \(3.\)

    Solution:

    Consider the following:

    The divisibility rule for the number 3 is as follows: If the sum of the digits in the whole number is a number divisible by 3, then the larger, original number is also.

    The sum of the digits is \(2(1+2+3+4)+5 +x=25 +x.\) Since \(3\mid (25+x)\), \(25+x=27, 30\) or \(33\). Hence \(x=2,5\) or \(8\).

     

    Divisibility by \(9=3^2:\)

     

    \(9 \mid x\) iff \(9\) divides sum of its digits.

    Divisibility by \(7:\)

     

    \(7 \mid x\) iff \(7\) divides the absolute difference between \(a-2b\), where \(x=10 a+b\), where \(b=d_0\) is the ones digit of \(x\), and \(a= d_n10^{n-1} +d_{n-1}10^{n-2}+ \cdots+ d_2 10+d_1\).

    Proof:

    Assume \(7\mid x.\) Which implies \(7\mid 10a+b.\)

    Consider \( x-21b=(10a+b)-21b=10a-20b=10(a-2b)\).

    Thus \(7\mid x\) if and only if  \(7\mid a-2b.\)

    Divisibility by \(11:\)

     

    \(11 \mid x\) iff \(11\) divides the absolute difference between the alternate sum.

    Proof:
     

    This page titled 2.5: Divisibility Rules is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Pamini Thangarajah.

    • Was this article helpful?