2

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.

CuriousD
  • 189
  • 16
    $\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. – Jack D'Aurizio Feb 25 '18 at 12:01
  • 7
    Rational numbers are equivalence classes of pairs of integers, so the class of $(0, k)$ suffices for any integer $k \neq 0$ – Edward Evans Feb 25 '18 at 12:01
  • 3
    "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. " – Mauro ALLEGRANZA Feb 25 '18 at 12:01
  • 2
    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. – Angina Seng Feb 25 '18 at 12:09
  • 5
    0 is a rational number. Why do you want to write it any other way? – almagest Feb 25 '18 at 12:32
  • 1
    @almagest I think the question meant: How to express zero to emphasise it's rationality? – Henricus V. Feb 25 '18 at 16:17
  • 2
    You can represent the element $0$ of $\mathbb{Q}$ as whatever you want: a color, a figure, a name, a letter, a sound, etc. It's up to your own fantasy. – telephone Feb 25 '18 at 18:18
  • If you want a single valued function $f:\mathbb{Q} \to \mathbb{Z}^2$ rather than to an equivalence class, then a useful function is $f(q)=(n,m)$ where $m$ is the smallest positive integer with $n=mq$ being an integer, but there are many other such functions. It is common to write $q$ as $\frac{n}{m}$ and you would then write the rational zero as $\frac{0}{1}$ as there is no positive integer smaller than $1$ – Henry Feb 26 '18 at 13:20

4 Answers4

28

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$.

15

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...

Netchaiev
  • 4,841
  • 14
    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$$ – GEdgar Feb 25 '18 at 12:30
  • $$ \frac{0}{-6} = \frac{-6}{-6} * \frac{0}{1} $$ – Rob Feb 25 '18 at 18:02
7

$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.

1

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)$.

Thomas Davis
  • 1,293