# Irrationality Preserving Operations

We all know about rationality preserving operations. That is, if $$r,s\in\mathbb{Q},$$ we have that $$r+s,r-s,rs,\frac{r}{s(≠0)}\in\mathbb{Q}.$$ I was wondering if there are irrationality preserving operations. I know that addition isn't such an operation. To demonstrate this, we can just take $$1+\sqrt{2},$$ and $$2-\sqrt{2}.$$ Similarly, subtraction doesn't work either. Multiplication and division don't work either. A few examples would easily demonstrate this. Exponentiation doesn't work either. For this, we can consider $$e^{\ln(2)}.$$ This leaves me to wonder if there are any operations that preserve irrationality at all. All the operations I considered took two inputs, and I found no such irrationality preserving operations. So, my question is: Are there are irrationality preserving operations, and if there are, what is the minimum number of inputs they need?

Note: I am not considering the "do nothing operation" or operations that take only one input.

• One trivial example that slips through: If $a_1,\dots,a_n$ are irrational, then so is $\min(a_1,\dots,a_n)$. If you want to avoid the use of $\min$, you can also use absolute values. For instance, $2\min(a,b)=a+b-|a-b|$.
– Zuy
Jan 27 at 14:18
• Another no doubt unwanted source: $(\mathbb{R}\setminus\mathbb{Q})^n$ has the same cardinality as $\mathbb{R}\setminus\mathbb{Q}$, so there many bijections $(\mathbb{R}\setminus\mathbb{Q})^n \to \mathbb{R}\setminus\mathbb{Q}$ extending to `irrational preserving' maps $\mathbb{R}^n \to \mathbb{R}$. Jan 27 at 14:42
• @Zuy, that's a nice example. Jan 27 at 15:25
• @DavidM, could you elaborate? I think I understand what you're saying, but I'm not sure. Jan 27 at 15:25
• @aqualubix The basic idea is that "same cardinality" is the formal way of saying "the same size" in set theory. More formally, two sets have the same cardinality if there is a bijection between them. A basic result about cardinality is that if a set $A$ is infinite, it has the same cardinality as $A^2$. So there will be a bijection $f \colon A^2 \to A$. In the case where $A$ is the irrationals, this will provide a bijective function that inputs a pair of irrationals and outputs an irrational. Then you can always extend the function so its domain is the whole of $\mathbb{R}^2$. Jan 28 at 4:08

If $$n$$ is an integer greater than $$1$$, taking an $$n$$th root of an irrational number gives you an irrational number. If $$a$$ is irrational and $$\sqrt[n]{a} = p/q$$ were rational, then $$a = p^n/q^n$$ which would be rational, contradiction.
• There are two inputs. $n$ and $a$. Jan 27 at 15:32
• Yes, but in your case, $n$ is not irrational. Jan 27 at 15:32
There certainly are, but most of them are impossible to describe. One that we can is digit alternation. Given $$a,b$$, express each in base $$10$$, using the terminating representation if there are two. Then create the result by alternating the digits of the two numbers each direction from the decimal point, so $$f(3.14159,2.71828)=32.1741185298$$. This will give a rational output if both inputs are rational and an irrational output if either input is irrational.
• @aqualubix: You can use it to show $\Bbb{|R|=|R \times R|}$ Jan 27 at 15:26