MathorynMathematical Formula Database

Number Theory

Division Algorithm

For integers aa and b>0b>0 there are unique integers qq (quotient) and rr (remainder) with a=bq+ra=bq+r and 0≤r<b0\le r<b. It is the basis of long division, modular arithmetic and the Euclidean algorithm.

a=bq+r,0≤r<ba=bq+r,\qquad 0\le r<b
LaTeXa=bq+r,\qquad 0\le r<b

Variables

aa
dividend
bb
divisor (positive)
qq
quotient
rr
remainder

Example

Divide 4747 by 55.

  1. 47=5⋅9+247=5\cdot9+2.

Answer: q=9, r=2q=9,\ r=2.

Related formulas