# Can decimal numbers be considered “even” or “odd”?

Is the concept of even/odd numbers is applicable to decimal numbers? For e.g. - 4.222 is a even number?

-
No, since you can always append a zero to the end of the decimal representation without changing the value. For integers, $x$ is even just when $2$ divides $x$. I don't see an equally fundamental meaning to the decimal number's last digit. –  mjqxxxx Dec 18 '11 at 7:14
What definition of, say, "even" would you like to carry over to decimals? I can always cut a decimal in half, so that scratches off the "divisible by two" portion... –  Ｊ. Ｍ. Dec 18 '11 at 7:17
@Ravi Gupta: Please note that the response by Patrick Da Silva gives a positive (and useful) answer to your question. He shows how one can give sensible meaning to the phrase "the rational number $r$ is even." Briefly, express $r$ in reduced form $a/b$. Then $r$ is even if $a$ is even. But there is no longer a simple dichotomy between odd and even. There are various grades of oddness. For instance, $1/8$ is odder than $3/5$, since both are in reduced form and $1/8$ has more $2$'s in the denominator. –  André Nicolas Dec 18 '11 at 15:00
@Ravi See also my answer which, unlike Patrick's, shows that parity arithmetic does precisely extend to many number systems (but not to real numbers (decimals) because they contain $1/2\:$). –  Bill Dubuque Dec 26 '11 at 3:31

I am not saying that this is a way to consider "even" and "odd" numbers, but I think it's quite cool that it looks somehow as a generalization of this notion.

It doesn't make sense to look at the digits of an irrational number to determine its "parity", hence let's just stick with rational numbers, which we know have a finite decimal expansion.

When we were looking at integers, we said that an integer was even when it was divisible by $2$ and odd when it is not. Instead of using words, we could give much better information, which is to define a map \begin{align} \nu_2 : \mathbb N & \to \mathbb N \cup \{ 0 \} \\ n=2^k m & \mapsto k \end{align} where in the latter, $m$ is odd. The map $\nu$ then measures how even the integer $n$ is, in the sense that when there are more powers of 2 that divide $n$, it is considered "more divisible by two".

This concept can be generalized to the rational numbers : write $x = a/b$ with $a$ and $b \neq 0$ integers. Write $a = 2^{k_1} a'$ and $b=2^{k_2} b'$, so that $x = 2^{k_1 - k_2} (a'/b')$ and now both $a'$ and $b'$ are odd. Now define $\nu$ again in a similar manner : \begin{align} \nu_2 : \mathbb Q & \to \mathbb Z \\ x = \frac{2^{k_1}a'}{2^{k_2}b'} & \mapsto k_1 - k_2. \end{align} When $x$ is an integer, we recover the map we had before, so this can be considered as an extension of this map to the rational numbers.

I don't know if you have done some abstract algebra, but I am going to work things out a little more so that readers that might be interested find good information here.

If we replace $\nu_2$ by $\nu_p$, where $p$ is a prime number, all that we did works just fine and we get a map from $\mathbb Q$ to $\mathbb Z$ which indicates how much can a rational be divisible by $p$ (by allowing "negative divisibility" in some sense, because it also measures how many times $p$ divides the denominator, also). We are getting close to the concept of a discrete valuation, which is defined as the following : given a field $K$, a discrete valuation $\nu$ is a function from $K^{\times}$, the group of units, to $\mathbb Z$, which satisfies the following properties : \begin{align} \nu(ab) & = \nu(a) + \nu(b) \\ \nu(a+b) & \ge \min \{ \nu(a),\nu(b) \} \end{align} and must also be surjective. This function has many interesting algebraic properties. Recalling informations we had before such as "the set of all even integers form a ring", and just by considering this map and its properties, we can show that $$\{ x \in K^{\times} \, | \, \nu(x) \ge 0 \} \cup \{ 0 \}$$ is a subring of $K$ which contains the identity of $K$. For some examples of how this is relevant, consider this : if we take the map $\nu_2$ we had before (over $\mathbb Q$), proving this fact means that the set of all rational numbers with odd denominator form a subring of $\mathbb Q$ (and so does the set of all rational numbers with denominators coprime to $p$). Valuations are extensively studied, and you can probably look it up on Wikipedia or ask for a reference if you are more interested in this.

Hope that helps!

-
Note that this notion of "generalized even-ness" does not show up easily in the digits of the rational number : $x = 4.2222= 42222/10000 = 2 \cdot 21111 / (2^4 5^4)$ is such that $\nu(x) = -3$, which is not what you would expect if the number of $2$'s in the decimal expansion was relevant. –  Patrick Da Silva Dec 18 '11 at 9:10
+1: Agree with André. This is the most useful answer to the question given at this time. Settling the question for rational numbers with some of the rules in tact, if in a slightly different form. –  Jyrki Lahtonen Dec 18 '11 at 15:49
Whew =) I am glad people liked it. –  Patrick Da Silva Dec 18 '11 at 20:24
There are more interesting things I'd love to say about this map... it has so many nice properties. For instance, the sets $I_k = \{ x \in K^{\times} \, | \, \nu(x) \ge k \} \cup \{0 \}$ with $k > 0$ are ideals of the subring $\{ x \in K^{\times} \, | \, \nu(x) \ge 0 \} \cup \{0\}$, and the ideal $I_1$ is maximal, because the group of units of this subring is those with $\nu(x) = 0$. Algebra is so sweet <3 –  Patrick Da Silva Dec 18 '11 at 21:26

Suppose we would like to define odd/even real numbers in some similar way as for integers. What could we do?

• We could say that even numbers are all multiples of 2 by a real number, but then every real number would be odd. Defining such a notion does not seem to be useful.

• We could work only with real numbers that have finite decimal expansions. And for such numbers, we could say that it is odd/even based on the parity of the last digit. The first disadvantage of this definition is that it works only for some numbers. But - perhaps more importantly - it does not have the usual properties of addition, namely:
$0.4+0.6=1$ even+even can be odd;
$0.3+0.7=1$ odd+odd can be odd;
$0.04+0.1=0.14$ even+odd can be even.
So this definition would not make too much sense, either.

-
"odd+odd can be even" is not a problem, that's exactly what you'd expect! –  Dalker Dec 18 '11 at 12:18
@Dalker Thanks for pointing out my mistake, I've corrected it. –  Martin Sleziak Dec 18 '11 at 12:28
I particularly like this answer for discussing one of the major reasons why we work with odd/even (namely, the arithmetic properties mod 2) and how that breaks down. –  Steven Stadnicki Dec 18 '11 at 16:59
I just wanted to say that this answer only explains why working with the decimals of the rational number is not the right way to look at it. Good examples. =) –  Patrick Da Silva Dec 18 '11 at 20:29
No, any ring where $2$ has an inverse $\rm\:u\:$ cannot sense parity since $\rm\:2\:u = 1\ \Rightarrow\ 1$ is even hence $\rm\ x = 1\cdot x\$ yields that every element $\rm\:x\:$ is even. However, there are many rings which do have a notion of parity compatible with integer parity. For example, the subring of rationals with odd denominator have parity obtained by defining the parity of $\rm\:m/(2n+1)\:$ to be the parity of $\rm\:m\:.\:$ Further many rings of algebraic integers have a natural notion of parity, e.g. the Gaussian integers $\rm\:m + n\ {\it i},\ m,n \in \mathbb Z\$ have parity by defining $\:i\:$ to be odd. For further discussion see my post here, and this post where parity in $\rm\:\mathbb Z[\sqrt{5}]\:$ implies that the integer $\rm\:(9+4\sqrt{5})^n + (9-4\sqrt{5})^n\:$ is even.