Parity (mathematics)

In mathematics, parity is the property of an integer of whether it is even or odd. An integer is even if it is a multiple of two, and odd if it isn't.[1] For example, −4, 0, 82 are even because

{\displaystyle {\begin{aligned}-2\cdot 2&=-4\\0\cdot 2&=0\\41\cdot 2&=82\end{aligned}}}

By contrast, −3, 5, 7, 21 are odd numbers. The above definition of parity applies only to integer numbers, hence it cannot be applied to numbers like 1/2 or 4.201. See the section "Higher mathematics" below for some extensions of the notion of parity to a larger class of "numbers" or in other more general settings.

Even and odd numbers have opposite parities, e.g., 22 (even number) and 13 (odd number) have opposite parities. In particular, the parity of zero is even.[2] Any two consecutive integers have opposite parity. A number (i.e., integer) expressed in the decimal numeral system is even or odd according to whether its last digit is even or odd. That is, if the last digit is 1, 3, 5, 7, or 9, then it is odd; otherwise it is even—as the last digit of any even number is 0, 2, 4, 6, or 8. The same idea will work using any even base. In particular, a number expressed in the binary numeral system is odd if its last digit is 1; and it is even if its last digit is 0. In an odd base, the number is even according to the sum of its digits—it is even if and only if the sum of its digits is even.[3]

Share this article:

This article uses material from the Wikipedia article Parity (mathematics), and is written by contributors. Text is available under a CC BY-SA 4.0 International License; additional terms may apply. Images, videos and audio are available under their respective licenses.