# Domain, Image, co-domain

1. Let f(x)= 1/x where x is a rational number. What is the domain of f? Give a codomain and image for f that are not equal to each other.

I am not sure about my answers, I got:
D= (-infinity, 0) U (0, infinity)
Image= (o, infinity)
Codomain= Set of all reals
I dont think this is right...can anyone help?

## Answers and Replies

D(f) will be the set of all rational numbers for which 1/x is defined... clearly, all rational numbers x with x != 0. So we have D(f) = Q - {0}.

The codomain is what may possibly come out. What might possibly come out when you put 1 over a rational number? Think about it by writing out a few examples. Hint: It's not the set of all Real Numbers? How do you get sqrt(2)?

As for the image... well, certainly any image will be a subset of the codomain (if it actually happened, it has to be possible, right?) However, out of the possible numbers, are there any that don't happen? Why? Can you get 2? Can you get 0?

You can get 2 because if x=.5 then 1/.5=2 but you cant get zero because ther is a one in the numeraor and the only way to get zero is zero/x. I just dont know how to state the image in technical terms.

matt grime
Science Advisor
Homework Helper
Grrr. Where did this stupid question come from? Tell whomever set it that "the domain of a function is part of its definition". It does *not* even begin to make sense to ask what the domain of f is like this.

Rant over.

matt grime
Science Advisor
Homework Helper
Let's pander to the moronic nature of the question, as is necessary.

First, f cannot be a function from Q to Q (rationals to rationals). Obviously we cannot divide by zero. Let Q* be the rational numbers excluding zero.

That f is now a well defined function from Q* to Q. What is its range? (Hint if x is non-zero, is 1/x non-zero?).

HallsofIvy
Science Advisor
Homework Helper
Grrr. Where did this stupid question come from? Tell whomever set it that "the domain of a function is part of its definition". It does *not* even begin to make sense to ask what the domain of f is like this.

Rant over.
Not so. It is standard that if the domain of a function is NOT given explicitely as "part of its definition", then it is the largest set on which the the given formula can be calculated. If someone were to say "the function f(x)= x2", would you complain that they had not given the domain? Here the domain is all rational numbers except 0.

I tend to agree with both Matt and Ivy.

I think the domain is part of the definition of a function. However, I also believe that when it is not given, it is implicitly "whatever works". Perhaps the question could be worded in slightly less colloquial terms by asking "what is the largest set of numbers for which the given function is defined?"

I don't know. I think the question is reasonable.

matt grime
Science Advisor
Homework Helper
But Halls, you've just introduced a huge load of subjectivity into the question. There is no such thing as the largest set on which it can be calculated. Shall we take the union of the proper class of such objects? Here, are we supposed to use R, C, Q, A, Z, an extension of F_p, an elliptic curve,... as our starting point? All have notions of rationality. Yes, I am playing devil's advocate, since it is clear what the question *intends*, but that does not stop it being a stupid thing to ask. It is also trivial to make the question well founded.

Students should not be required to make such leaps as to guess what is intended when people make non-mathematical statements. And several generations of students have been taught something that is just plain wrong.

If the domain is not given then it cannot technically be a function.

If you don't believe this to be a problem, then just consider that one of the standard examples they'll have to do will involve square rooting something like 1-x^2. What's the domain now? They'll be required to say [-1,1], only to be told about complex numbers in the next course meaning that the same question now has two answers. Which are they to pick if asked again?

Last edited:
Sometimes it is useful to allow a little ambiguity in the domain of an inverse function, if the range of the original function is poorly understood. I've seen some functional analysis books occasionally take the "domain is whatever works" approach.

matt grime
Science Advisor
Homework Helper
OK, let f:X-->Y. If by that you mean defining f^{-1}(U) = { x : f(x)=u}, then formally you're defining a perfectly good function from subsets of Y to subsets of X. If f is injective then one can also define the inverse function from the image of f to X. There is no ambiguity.

I think that while you're technically correct, Matt, the point of the exercise isn't to get bogged down in the definitions, just to do some figuring and get some idea of where the function is defined. I think it's clear what this question is asking... and to be fair, it does say "x is a rational number". It's just asking which rational numbers, specifically, can you use.

OK, let f:X-->Y. If by that you mean defining f^{-1}(U) = { x : f(x)=u}, then formally you're defining a perfectly good function from subsets of Y to subsets of X. If f is injective then one can also define the inverse function from the image of f to X. There is no ambiguity.

But it is not so clear on what domain the inverse will be continuous

matt grime
Science Advisor
Homework Helper
But it is not so clear on what domain the inverse will be continuous

That is neither here nor there. It is still a function. What you need to restrict to to get a function with some particular property is not the issue.

matt grime
Science Advisor
Homework Helper
I think that while you're technically correct, Matt, the point of the exercise isn't to get bogged down in the definitions, just to do some figuring and get some idea of where the function is defined. I think it's clear what this question is asking... and to be fair, it does say "x is a rational number". It's just asking which rational numbers, specifically, can you use.

The answer: domain all of Q, codomain the Riemann sphere is a perfectly respectable answer if you happen to know what the Riemann sphere is. Don't stand for this abuse! Just 'cos it's in the book doesn't mean you have to teach it.

... I think you're belaboring the point a bit.

That is neither here nor there. It is still a function. What you need to restrict to to get a function with some particular property is not the issue.

Right, but usually the thing you're trying to prove is which set the function has a continuous inverse on.

I'm not trying to say you're wrong, obviously you can wiggle your way around the problem by defining a bunch of sets, but the point is that the terminology is in use, and apparently some mathematicians like it.

matt grime, how would you ask the question the textbook is asking? It's clearly a reasonable question, even if - as you are suggesting - the way in which it's phrased is sloppy, misleading, and dangerous.

How would you ask the same question? Just curious.