Hello Mary,
It will be helpful to begin with a few words on the rational and irrational numbers. The set of all real numbers can be represented as the union of 2 sets, the rational numbers and the irrational numbers. A rational number is any number that can be expressed as a ratio of two integers. In other words, a rational number is any number of the form p/q, where p and q are integers and q≠0. Basically, this just says that a rational number is an ordinary fraction. Of course, a rational number can also be expressed in decimal form. The decimal form of a rational number either terminates or repeats.
As you might expect, any real number which is not a rational number is called an irrational number. Specifically, this means an irrational number is a number that cannot be expressed in the form p/q, where p and q are integers. Alternately, an irrational number can be defined as a number whose decimal form neither terminates, nor repeats.
(After that lengthy digression, on to your questions.)
The "rule" you are given defines what is called a piecewise function (assuming it is indeed a function.) This means that different rules or formulas are used to give the output value (y-value) on different parts of the domain.
1. Every real number x is either rational or irrational (but it can't be both.) If x is rational, then y=1. If x is irrational, then y = 0. [For example, if x = 2/3 (a rational number), then y = 1. If x = π = 3.14159265.... (a famous example of an irrational number), then y = 0.] It is clear that for each x-value, there corresponds exactly one y-value. Therefore, this defines a function.
2. Recall that the domain is the set of all possible x-values ("inputs"). Since every real number is either a rational number or an irrational number, the function is defined for all real numbers. Therefore, the domain of this function is the set of all real numbers. If we wish, we can express this in interval notation as
Domain = (-∞,∞).
3. The range is the set of all possible output values (y-values). Clearly, the only possible y-values are 0 or 1, so the range is the set {0,1}.
4. The y-intercept of any function can be found by setting x = 0. But 0 is a rational number, so the rule tells us that when x = 0, y = 1. Therefore, the y -intercept is y = 1. [Or, if required, we can express the y-intercept as the point (0,1)].
5. To find the x-intercept, set y=0. For what values of x does y = 0 for this function? The rule tells us that y = 0 if x is any irrational number. Consequently, every irrational number is an x-intercept for this function.
6. This part is a little tricky. Recall that a function is called even if f(-x) = f(x) for all x in its domain. We're not using "f(x)" notation in this function, but this is the same as saying that for every x in the domain, you obtain the same y-value from both x and -x. Geometrically, this says that the graph is symmetric with respect to the y-axis. Now to the main point:
Given any x, x is either rational or irrational.
Suppose x is rational. Then -x is also rational, so the y-value for both x and -x is 1.
Suppose x is irrational. Then -x is also irrational, so y = 0 for both x and -x.
(In either case, rational or irrational x, the y-value is the same for x and -x). Therefore, the function is even.
7. It's a bit difficult to describe the graph without showing it. Recall that if k is a constant, the graph of y=k is a horizontal line. If we only had the equation y = 1, we would have a horizontal line with y-intercept 1. Similarly, the function y = 0 is another horizontal line (corresponding to the x-axis.) The graph of our function can't consist of the two complete horizontal lines at y = 1 and y = 0. (If it did, the graph would not pass the vertical line test, so it would not represent a function.) However, our rule says that y equals either 0 or 1, but never at the same time (for the same value of x.) So the graph looks like the horizontal line y = 1 (but only over the rational values of x) and the horizontal line y = 0 (but only for the irrational numbers). We basically have the horizontal line y = 1 (but with all the points corresponding to irrational values of x removed), and the horizontal line y = 0 (missing all the points corresponding to rational number values of x.)
(As a result, this function is discontinuous for every real number!)
Hope that helps! Let me know if need any clarification.
William