My teacher tells me that in the vicinity of any rational number, an irrational exists. To elucidate, I presume, he further went on to say, if a function, if defined to give 1 for every rational number and 0 for every irrational, then the function would be discontinuous at each and every point.
So that means that there are two irrational numbers surrounding a rational, right? And vice versa? So if I take the A.M. of those two irrational numbers, I get a rational number? Or of those two rational numbers, an irrational? Does that make sense?
No, it is not the fact that there are only two irrationals surrounding a rational; there are actually infinitely many (for any distance of interest, say $\epsilon > 0$). This is referred to as the set being "dense".
Hopefully you now see that this question doesn't make sense, because you can't uniquely identify "those two irrational numbers".
You could, if carefully selected, find two irrational numbers around any rational of equal distance, and as a consequence have their arithmetic mean be that initial rational number. However, picking irrationals at random close to a given rational would not have that as a result.