# Are all non-irrational numbers rational? [duplicate]

I am working on a simple proof involving rational and irrational numbers. Is it safe to assume that if a number is not rational, it is irrational, and that if a number is not irrational, it is rational?

Example: Let $P(x)=\text{x is rational}$ and $Q(x)=\text{x is irrational}$.

Then is it true that $\forall x\ P(x)\text{ xor }Q(x)$?

## marked as duplicate by Ross Millikan, rschwieb, Watson, Namaste discrete-mathematics StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Sep 17 '16 at 11:47

• A double negation is an affirmation. – Pedro Tamaroff Sep 16 '16 at 1:47
• As long as by "number" you mean real number. – Joey Zou Sep 16 '16 at 4:56
• I feel that it's important to point out that double negation isn't always an affirmation. See constructive mathematics. – James Wood Sep 17 '16 at 20:45

The real numbers are composed of the rational numbers and the irrational numbers so yes if a number is not one, it is the other.

A rational number is defined as a number that can be expressed as the ratio of two integers, i.e. $\frac{p}{q}$, where $q\ne0$. An irrational number is a real number that cannot be expressed as a ratio. So, yes a real number is either rational or irrational, but not both.
In set notation irrational numbers are $\mathbb{R}\setminus\mathbb{Q}$, so non-irrational numbers are $\mathbb{R}\setminus(\mathbb{R}\setminus\mathbb{Q})=\mathbb{Q}$.