# 0.1: Divison Theorem

- Page ID
- 7446

For all \(a\), \(n\in Z\) with \(n\neq 0\), there exist unique \(q\),\(r\in Z\) satisfying \(a = qn + r\) and \(0\le r<|n|\). Since \(q\) and \(r\) are unique, we use \(\lfloor{a/n}\rfloor\) to denote \(q\) and \(a\) % \(n\) to denote \(r\). Hence:

\(a=|\frac{a}{n}|n+(a\)%\(n)\).

The % symbol is often called the modulo operator. Beware that some programming languages also have a % operator in which a % \(n\) always has the same sign as a. We will instead use the convention that a % \(n\) is always always nonnegative.