How to represent 0 as rational number?

$0/0$ is not legitimate, $0/\text{const}$ should be good enough, but what is the right value of const? $0/1$ works for a lot of computational cases, but only on intuitive.

  • 16
    $\begingroup$ $\frac{0}{a}=0$ for any $a\neq 0$, and a number doesn't need to be represented in some way to be a rational number. $0\in\mathbb{Q}$ since $0\in\mathbb{N}$, for instance. $\endgroup$ Feb 25, 2018 at 12:01
  • 7
    $\begingroup$ Rational numbers are equivalence classes of pairs of integers, so the class of $(0, k)$ suffices for any integer $k \neq 0$ $\endgroup$ Feb 25, 2018 at 12:01
  • 3
    $\begingroup$ "In mathematics, a rational number is any number that can be expressed [i.e. represented] as the quotient or fraction $\dfrac p q$ of two integers, a numerator $p$ and a non-zero denominator $q$. Since $q$ may be equal to $1$, every integer is a rational number. " $\endgroup$ Feb 25, 2018 at 12:01
  • 2
    $\begingroup$ And I thought that $0/1$ equalled $0$; not just that it works for a lot of computational cases. I can't imagine a "computational case" where it didn't work. $\endgroup$ Feb 25, 2018 at 12:09
  • 5
    $\begingroup$ 0 is a rational number. Why do you want to write it any other way? $\endgroup$
    – almagest
    Feb 25, 2018 at 12:32

4 Answers 4


There is no single right value. The rational number $0$ can be represented as the quotient of an integer by a non-zero integer in infinitely many ways: $0=\frac 0d$ ($d\in\mathbb{Z}\setminus\{0\}$). Choosing $d=1$ is a natural choice: every rational number can be represented in one and only one way as $\frac nd$ with $n\in\mathbb Z$, $d\in\mathbb N$ and $\gcd(n,d)=1$. In the case of $0$, that representation is $\frac01$.

  • $\begingroup$ There is no "right" value? Or there is no "single right" value? $\endgroup$ Feb 25, 2018 at 22:32
  • $\begingroup$ @RandallStewart I've edited my answer. Thank you. $\endgroup$ Feb 25, 2018 at 22:54
  • $\begingroup$ Hello! This question (which in my opinion is a sincere inquiry) is at risk of deletion. The problem is that the linked duplicates are bad as JMoravitz and I agreed, but this wasn't the asker's fault, so could you please edit the duplicate list to add the two links JMoravitz gave in a comment under the question and remove the original, so that it is reasonably justifiable to keep the question (closed as duplicate rather than deleted)? Thanks! $\endgroup$
    – user21820
    Aug 13, 2021 at 10:50
  • $\begingroup$ @user21820 Done. $\endgroup$ Aug 13, 2021 at 11:05
  • $\begingroup$ Thank you very much! $\endgroup$
    – user21820
    Aug 13, 2021 at 11:19

What is wrong with $$ \cdots=\frac{0}{-2}=\frac{0}{-1}=0=\frac{0}{1}=\frac{0}{2}=\frac{0}{3}=\cdots \ ?$$ You have an infinity of perfectly defined representations...

  • 14
    $\begingroup$ Yes. And in fact for other rationals you also have infinitely many representations. $$\dots =\frac{-14}{-4} = \frac{-7}{-2} = \frac{7}{2} = \frac{14}{4}=\dots$$ $\endgroup$
    – GEdgar
    Feb 25, 2018 at 12:30
  • $\begingroup$ $$ \frac{0}{-6} = \frac{-6}{-6} * \frac{0}{1} $$ $\endgroup$
    – Rob
    Feb 25, 2018 at 18:02

$0/1$ is generally considered to be the canonical form. This is important for the definition of the "rational ruler" or modified Dirichlet function:

$$ f(x) = \begin{cases} 0 & x \in \Bbb{R}\setminus\Bbb{Q} \\ 1/q & x = p/q \mbox{ in lowest terms}\end{cases}$$

and I'm sure in many other situations too.

  • $\begingroup$ If you're referring to Thomae's function, that actually takes the value $1/q$ instead of $q$ for rational $x$. But a nice example nonetheless. $\endgroup$ Feb 25, 2018 at 15:16
  • $\begingroup$ Yes, good catch! $\endgroup$ Feb 25, 2018 at 15:22

As other answers have mentioned, there are many equivalent representations of $0$ in the rational numbers.

A formal way to define rational numbers is the following:

Consider the set - $$S = \{ (x,y) \in \textbf{Z} \times \textbf{Z} \quad |\quad y \neq 0\} . $$

The each element $q$ of the rational numbers Q is an equivalence class $\bar{s} \in S/\equiv_{\sim}$ under the equivalence relation: $$(a,b)\sim (c,d) \iff ad = bc$$ Or equivalently in Q: $$ad = bc\iff \frac{a}{b}= \frac{c}{d}$$ Since $0 \cdot b = 0 \cdot d = 0$ for any $d, c \in \textbf{Z}$, we can represent $0 \in \textbf{Q} $ as $(0,x)$ for any $x \in \textbf{Z}-\{0\}$.

You can do this procedure for any integral domain $R$, and it represents the field of fractions of $R$, denoted commonly as $Quot(R)$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.