Are functions partly defined by their domains and codomains?

• Jon Seymore
In summary, the conversation discusses the properties of inner and outer functions in a composition and how they affect the injectivity and surjectivity of the overall composition. The definition of composition is also discussed, with one participant mentioning Tao's usage of terminology which is not standard. Overall, there seems to be confusion around the terms "domain," "codomain," and "range" and how they relate to each other in defining a function.
Jon Seymore
I just finished working through compositions of functions, and what properties the inner and outer functions need to have in order for the whole composition to be injective or surjective. I checked Wikipedia just to make sure I'm right in thinking that for a composition to be injective or surjective, both of the functions need to be injective or surjective respectively. Wikipedia talks about these facts as if functions are totally divorced from the domain and range that's being considered. Composing functions by definition requires that the range of the inner function is the domain of the outer function. Currently Wikipedia says that a composition can be injective even if the outer function is not, because a counter example can exist outside of the range of the inner function. Similarly, that a surjective composition can be surjective even if the inner function is not because the counter example may not be in the domain of the outer function. Doesn't this treat functions has separate entities that aren't partly defined by their domain? Isn't the inner function trivially surjective in the case of compositions because of the requirement that the domain of the outer function be the range of the inner function? Doesn't that same requirement, and the fact that functions are partly defined by the domain and range being considered, also mean that both functions must be injective for the composition to be injective? I'm getting my definitions from Tao's Analysis.

Jon Seymore said:
Composing functions by definition requires that the range of the inner function is the domain of the outer function.

This is not true. It suffices that the range of the inner function is a subset of the domain of the outer function. So if ##f:A\rightarrow D## and ##g:B\rightarrow C## are functions and if ##f(A)\subseteq B##, then we define ##g\circ f## with domain ##A## and codomain ##C## to do ##(g\circ f)(a) = g(f(a))##. This is the most general definition of composition. Maybe Tao does not take the definition to this generality.

Last edited:
Using that more general definition of composition only helps me if its true that functions have a unique domain, because you refer to "the domain of the outer function". Are rules for mapping between sets assigned their own unique domains? This general definition of composition just seems to focus the problem on whether or not each unique domain that is considered results in, technically, a new object (a function) for each unique domain. Is Tao using definitions for functions and compositions that aren't necessarily agreed upon? Is there not a universal agreed upon definition for what a function is?

Every function has a unique domain and codomain by definition of a function. So yes, if you change the domain and codomain, then you change your function, even if the graph of the function looks completely the same.

Okay, everything is clear to me now. Thank you for your help.

Are there a couple of typos? Surely: if ##f:A\rightarrow D## and ##g:B\rightarrow C## are functions and if ##f(A)\subseteq B##, then we define ##g\circ f## with domain ##A## and codomain ##C## to do ##(g\circ f)(a) = g(f(a))##.

micromass
MrAnchovy said:
Are there a couple of typos? Surely: if ##f:A\rightarrow D## and ##g:B\rightarrow C## are functions and if ##f(A)\subseteq B##, then we define ##g\circ f## with domain ##A## and codomain ##C## to do ##(g\circ f)(a) = g(f(a))##.
It seems that Tao defines compositions in a different way. He defines compositions so that the range of f is precisely the domain of g. Maybe he does this because it's more natural from a foundational point of view at this point in his text and maybe it's too restrictive in general;. I'm not sure. Someone else can answer for that better than I can. I just know they're different definitions and I've sorted out how everything works out in each case. I'll tell you how Tao does it specifically. He initializes f and g and then says, "such that the range of f is the same set as the domain of g." That's why in my original comment I was saying things like, "Wouldn't that make f trivially surjective?".

Jon Seymore said:
It seems that Tao defines compositions in a different way. He defines compositions so that the range of f is precisely the domain of g. Maybe he does this because it's more natural from a foundational point of view at this point in his text and maybe it's too restrictive in general;. I'm not sure. Someone else can answer for that better than I can. I just know they're different definitions and I've sorted out how everything works out in each case. I'll tell you how Tao does it specifically. He initializes f and g and then says, "such that the range of f is the same set as the domain of g." That's why in my original comment I was saying things like, "Wouldn't that make f trivially surjective?".

Tao is being highly nonstandard with his terminology here. Usually, one would use the word "codomain" for what he calls "range". So a function has a specific domain and codomain. The range of a function ##f:A\rightarrow B## is then defined as ##f(A)## and may or may not equal the codomain. I don't know why Tao uses the terminology he does, it's really puzzling since everybody does it differently than him.

micromass said:
Tao is being highly nonstandard with his terminology here. Usually, one would use the word "codomain" for what he calls "range". So a function has a specific domain and codomain. The range of a function ##f:A\rightarrow B## is then defined as ##f(A)## and may or may not equal the codomain. I don't know why Tao uses the terminology he does, it's really puzzling since everybody does it differently than him.
Interesting. I thought from the way he seemed to use those words that "codomain" and "range" were the same idea. I guess I'll have to sort through that too. He does in fact use "range" in his definition. This is the first time that I'm hearing those are different ideas. Thanks for letting me know.

Jon Seymore said:
Interesting. I thought from the way he seemed to use those words that "codomain" and "range" were the same idea

Yes, he is using them as the same. But in most (modern) texts, they are different. https://en.wikipedia.org/wiki/Range_(mathematics)

micromass said:
Yes, he is using them as the same. But in most (modern) texts, they are different. https://en.wikipedia.org/wiki/Range_(mathematics)
Okay, so I've gathered that compositions are typically defined by initializing functions with codomains in mind, where in general, the range of g, given the range of f as input, is a smaller set than the codomain that we used to initially define g. The codomain of f (by which I mean the initial domain of g) is larger than the range of f. I hope that's all right.

Seems right.

1. What is a function's domain and codomain?

A function's domain is the set of input values for which the function is defined. The codomain is the set of all possible output values of the function.

2. Are the domain and codomain of a function always the same?

No, the domain and codomain of a function can be different. The domain can be a subset of the codomain, but it cannot be larger than the codomain.

3. How are the domain and codomain related to the range of a function?

The range of a function is the set of all output values that the function actually uses. It is a subset of the codomain. The domain and range together determine the function's behavior and how it maps inputs to outputs.

4. Can a function have multiple domains and codomains?

No, a function can only have one domain and one codomain. However, the domain and codomain can be complex sets, such as the set of real numbers or the set of all possible strings.

5. Why is it important to define a function's domain and codomain?

Defining a function's domain and codomain is important because it helps clarify the behavior and limitations of the function. It also ensures that the function is well-defined and that all inputs will have a corresponding output.

Replies
3
Views
16K
Replies
3
Views
1K
Replies
2
Views
899
Replies
5
Views
2K
Replies
8
Views
4K
Replies
1
Views
3K
Replies
4
Views
3K
Replies
1
Views
3K
Replies
4
Views
1K
Replies
17
Views
2K