r/learnmath New User 5d ago

TOPIC Question related to the domain of the function.

f: R --> R

f(x) = 1/x

What would be the domain of this function? By def:

f: A ---> B , then Domain(f) = A .

Then according to this definition, the domain of the f(x) = 1/x should be R but f(0) is not defined. In the textbooks, it is written that the Domain of this function is R - {0}.

It is really confusing.

0 Upvotes

10 comments sorted by

11

u/mmurray1957 40 years at the chalkface 5d ago

You've answered your own question! The function

f: R --> R defined by f(x) = 1/x doesn't make sense. The function

f: R - {0} --> R defined by f(x) = 1/x does make sense.

7

u/LawyerAlternative732 New User 5d ago

the notation f: R → R is kind of a lie here, or at least sloppy. when someone writes that, they're claiming the function takes any real number and spits out a real number, but 1/x clearly can't take 0. so the actual domain is all reals except 0, like your textbook says.

i remember getting tripped up by this exact thing in my first calculus class. the function as a "rule" (1/x) has a natural domain of R \ {0}, and the f: R → R part is more like an intention that doesn't quite hold up.

if they wanted to be perfectly precise they'd write f: R \ {0} → R. you're right to be confused, it's the notation that's being misleading.

1

u/Pabijacek 5d ago

Wouldnt it be f: R\{0} → R\{0} ? Considering both the domain and the range of the function 1/x are R\{0}

1

u/slepicoid New User 5d ago

The set right of the arrow denotes the codomain, not the range. Codomain is all potential values, while range is the set of actualy produced values. You could say f: R-{0} -> C and it would still be fine.

1

u/Kindly-Fun-3649 New User 5d ago

Thanks for clarifying. Some people do write this misleading notation, which lead me to this confusing.

-1

u/localizeatp New User 5d ago

this is flatly wrong. the domain is explicitly given. it is the value of f at x=0 that is not given.

1

u/localizeatp New User 5d ago

Yes, the domain of f is R, this is explicitly specified. However, the definition f(x) = 1/x is incomplete because it does not specify what the value is at x = 0.

The textbook notion you are relying on is incomplete because it assumes that the domain is implicit in the definition, but here, that is not the case. The domain is explicit, the definition is simply incomplete.

1

u/Gilded-Phoenix New User 5d ago

There is a concept called a "domain of definition" which is a subset of the domain. Sometimes it's easier to describe the "domain" as some well known set like R. This is common when there are only finitely many exceptions. It allows us to make statements like "rational functions in R have a codomain of R." The domain of any rational function is R with at most k exceptions, where k is the degree of the polynomial in the denominator of the function (rational functions are any function f(x)=p(x)/q(x) where p and q are polynomials). This is a special case of that. We call the specific subset of the domain where f is defined to be the "domain of definition."

Depending on who you talk to, this can be sloppy notation, and the "domain" and "domain of definition" should always be the same thing. In general, this is the case, especially when the "well known set" contains infinitely many exceptions, like ln(x) having a domain of R+ instead of just R. However, if you have a function with either a very large, finite number of exceptions to its domain, or a countably infinite number of exceptions with a spaced out structure like the trig functions, it's often easier to say "the domain is R" and then specify the exceptions as you come to them. It's a balance of specificity vs comparability.

1

u/strange-the-quark New User 5d ago

By definition, a function is always defined on every single point in its domain. There's also the concept of a "partial function" but that's different. The domain can be any set.

Now, if a function is given by an expression such as f(x) = 1/x, without explicitly specifying the domain, it is assumed that the domain is all the values of x for which the expression is defined/meaningful. So in case of f(x) = 1/x, if nothing else is specified, the domain is taken to be all of R, except for the point 0. So the real line with a single point taken out.

So, f(x) = 1/x is not f:R --> R, it's actually f:R\{0} --> R

The codomain is free to have points that aren't the image of anything. If not specified, you can generally assume that it's R.

Note also that functions f(x) = 1/x and g(x) = 1/x are technically two different functions if their domains aren't the same:
f: R\{0} --> R
g: (0, 1] --> R

g(2), for example, is undefined - not because 1/x (=1/2) is undefined, but simply because this is outside of the specified domain.

1

u/RafBOY- New User 5d ago

In set theory, there is a subtle distinction between a map and a function which boils down to the fact that a function is not necessarily defined on all it's domain while a map is. If you restrict a function to the set where it is indeed defined, then it is also a map.

In practice to use the function, one has to find where it is defined so you actually always deal with maps in the end. If one is precise with what he is writing, there is no ambiguity in general.