Domain and the codomain of a composite function

In summary: The notation "##f: \mathbb{R} \rightarrow \mathbb{R}##" is not sufficient to tell us what the domain is. In this case the domain of ##f(x) = \sqrt{x}## is the set of nonnegative real numbers..
  • #1
Danijel
43
1
So, I'm a bit confused. The thing is, basically, all elementary functions are of the form ƒ:ℝ→ℝ. So the domain is ℝ and so is the codomain. However, if we have a function ƒ:ℝ→ℝ, given with f(x) = √x, it's domain is now x≥0. So, is the domain of this function ℝ or [0,+∞>?
Also, let's say we have two functions ƒ, and g, with f:A→B and g:C→D. Let's say that the image of the function f is f(A) ⊆ C. That way, we made sure that gof is defined. So, do we write gof: A → D, that is, is the domain of gof A, and the codomain D, or is the codomain of gof the image of f(A), because gof: A→f(A)⊆C→g(f(A)), that is, it starts in A and ends up in g(f(A)).
Thank you.
 
Mathematics news on Phys.org
  • #2
Danijel said:
So, I'm a bit confused. The thing is, basically, all elementary functions are of the form ƒ:ℝ→ℝ. So the domain is ℝ and so is the codomain. However, if we have a function ƒ:ℝ→ℝ, given with f(x) = √x, it's domain is now x≥0. So, is the domain of this function ℝ or [0,+∞>?
The notation ƒ:ℝ→ℝ means only that the domain is ##\mathbb R## or possibly some subset of it. Same with the codomain. The domain of the real-valued square root function is [0, ∞), and so is the codomain of this function
Danijel said:
Also, let's say we have two functions ƒ, and g, with f:A→B and g:C→D. Let's say that the image of the function f is f(A) ⊆ C. That way, we made sure that gof is defined. So, do we write gof: A → D, that is, is the domain of gof A, and the codomain D, or is the codomain of gof the image of f(A), because gof: A→f(A)⊆C→g(f(A)), that is, it starts in A and ends up in g(f(A)).
Since f(A) isn't necessarily all of C, the domain of ##f \circ g## is f(A). Try this out with some simple functions, such as ##f(x) = x^2## and ##g(x) = \sqrt x##, and the composition ##f \circ g##.
Edit of early reply:
The domain and codomain of the square root function is only nonnegative numbers. So even though the domain of f is all reals, because we're taking the square root first, only nonnegative numbers are inputs to f.
 
  • #3
Mark44 said:
The notation ƒ:ℝ→ℝ means only that the domain is ##\mathbb R## or possibly some subset of it. Same with the codomain. The domain of the real-valued square root function is [0, ∞), and so is the codomain of this function
Since f(A) isn't necessarily all of C, the domain of ##f \circ g## is f(A). Try this out with some simple functions, such as ##f(x) = x^2## and ##g(x) = \sqrt x##. You should see that although the domain of f is all real numbers, the codomain of g is only nonnegative numbers, so not all of the domain of f gets used in the composition ##f \circ g##.
What happens with the codomain? Does it remain the codomain of f?
 
  • #4
Danijel said:
What happens with the codomain? Does it remain the codomain of f?
I'm not sure what you're asking. I edited my earlier reply, as what I wrote wasn't very clear. Take a look at that and let me know if it's still not clear.
 
  • #5
What I am asking, and sorry for being ambiguous, is, if we have two functions f and g, and if the composition gof is defined (we don't need restrictions), in this case, is the domain of gof the domain of f, and the codomain of gof, the codomain of g. Thanks.
 
  • #6
Danijel said:
Actually , the domain of the fog is now the domain of g, right?
Yes, but that's only coincidental. Think about the same composition if ##f(x) = \sqrt{x - 1}##. Now the domain and codomain of f are not exactly the same.
 
  • #7
Mark44 said:
The notation ƒ:ℝ→ℝ means only that the domain is ##\mathbb R## or possibly some subset of it. Same with the codomain. The domain of the real-valued square root function is [0, ∞), and so is the codomain of this function
Since f(A) isn't necessarily all of C, the domain of ##f \circ g## is f(A). Try this out with some simple functions, such as ##f(x) = x^2## and ##g(x) = \sqrt x##, and the composition ##f \circ g##.
Edit of early reply:
The domain and codomain of the square root function is only nonnegative numbers. So even though the domain of f is all reals, because we're taking the square root first, only nonnegative numbers are inputs to f.

Strictly speaking this means the domain is ##\mathbb {R} ##. Nothing more, nothing less.
 
  • #8
Danijel said:
So, I'm a bit confused. The thing is, basically, all elementary functions are of the form ƒ:ℝ→ℝ.
That depends on your definition of "elementary function" and some conventions of notation.

For example, is ##f(x) = 1/x## an "elementary function"?

If we adopt the convention that "##f:A \rightarrow B##" designates ##A## as the domain of ##f## and declare that the domain of ##A## is exactly set of numbers that appear as first elements in the ordered pairs ##f## then (speaking of real valued functions of the reals) the domain of ##f(x) = 1/x## is not all of ##\mathbb{R}##

However, as @Mark44 indicates, sometimes the notation "##f:A \rightarrow B##" is used merely to indicate the that the domain of ##f## is a subset of ##A##. This is especially true when authors are expressing the idea that their remarks apply only to real valued functions of 1 real variable. They might write "##f:\mathbb{R}\rightarrow\mathbb{R}##" when what should be written is "##f:A\rightarrow B, A \subset \mathbb{R}, B \subset\mathbb{R}##"According to the current Wikipedia article https://en.wikipedia.org/wiki/Codomain, the "codomain" of a function is distinct from the "image" of a function. So, as @Mark44 indicated, the notation "##g(f(x))##" refers to a function whose domain is the image of ##f##.

However, if we have a function ƒ:ℝ→ℝ, given with f(x) = √x, it's domain is now x≥0. So, is the domain of this function ℝ or [0,+∞>?

With the understanding that we are speaking of real valued functions of one real variable, the domain of ##f## is ##[0,+\infty)##.

Also, let's say we have two functions ƒ, and g, with f:A→B and g:C→D. Let's say that the image of the function f is f(A) ⊆ C. That way, we made sure that gof is defined. So, do we write gof: A → D, that is, is the domain of gof A, and the codomain D, or is the codomain of gof the image of f(A), because gof: A→f(A)⊆C→g(f(A)), that is, it starts in A and ends up in g(f(A)).

The Wikipedia article mentions several different definitions of "function" It takes, what I think is the standard view that the "codomain" of a function is a somewhat arbitrary set. For example, one could define a function ##f(x) = sin(x)## and specify its codomain as [-1,1] and define a (technically) different function as ##f(x) = sin(x)## with codomain [-3,17] or some other arbitrary set containing the image of f(x) = sin(x). Taking the viewpoint that the codomain has this arbitrary aspect to it, the codomain of the composition of two functions is not uniquely determined unless an author has specified some rule for how it is determined.

Some authors might define the notation ##g \circ f## to mean a function whose codomain is exactly ##g(f(A))## where ##f(A)## is the image of ##f##. Other authors might take the viewpoint that "I'm talking about real valued functions in this book, so the codomain of all functions that I mention will be ##\mathbb{R}##".

Unfortunately, mathematical notation can be ambiguous.
 
  • #9
Stephen Tashi said:
That depends on your definition of "elementary function" and some conventions of notation.

For example, is ##f(x) = 1/x## an "elementary function"?

If we adopt the convention that "##f:A \rightarrow B##" designates ##A## as the domain of ##f## and declare that the domain of ##A## is exactly set of numbers that appear as first elements in the ordered pairs ##f## then (speaking of real valued functions of the reals) the domain of ##f(x) = 1/x## is not all of ##\mathbb{R}##

However, as @Mark44 indicates, sometimes the notation "##f:A \rightarrow B##" is used merely to indicate the that the domain of ##f## is a subset of ##A##. This is especially true when authors are expressing the idea that their remarks apply only to real valued functions of 1 real variable. They might write "##f:\mathbb{R}\rightarrow\mathbb{R}##" when what should be written is "##f:A\rightarrow B, A \subset \mathbb{R}, B \subset\mathbb{R}##"According to the current Wikipedia article https://en.wikipedia.org/wiki/Codomain, the "codomain" of a function is distinct from the "image" of a function. So, as @Mark44 indicated, the notation "##g(f(x))##" refers to a function whose domain is the image of ##f##.
With the understanding that we are speaking of real valued functions of one real variable, the domain of ##f## is ##[0,+\infty)##.
The Wikipedia article mentions several different definitions of "function" It takes, what I think is the standard view that the "codomain" of a function is a somewhat arbitrary set. For example, one could define a function ##f(x) = sin(x)## and specify its codomain as [-1,1] and define a (technically) different function as ##f(x) = sin(x)## with codomain [-3,17] or some other arbitrary set containing the image of f(x) = sin(x). Taking the viewpoint that the codomain has this arbitrary aspect to it, the codomain of the composition of two functions is not uniquely determined unless an author has specified some rule for how it is determined.

Some authors might define the notation ##g \circ f## to mean a function whose codomain is exactly ##g(f(A))## where ##f(A)## is the image of ##f##. Other authors might take the viewpoint that "I'm talking about real valued functions in this book, so the codomain of all functions that I mention will be ##\mathbb{R}##".

Unfortunately, mathematical notation can be ambiguous.
Thank you, I understand now.
 

1. What is a composite function?

A composite function is a function that is formed by combining two or more functions. The output of one function becomes the input of the next function, creating a chain of functions.

2. What is the domain of a composite function?

The domain of a composite function is the set of all values that can be input into the first function of the composite. It may also be limited by any restrictions or rules set by subsequent functions in the composite.

3. How is the domain of a composite function determined?

The domain of a composite function can be determined by looking at the domains of each individual function in the composite and finding the values that are common to all of them. These common values will be the domain of the composite function.

4. What is the codomain of a composite function?

The codomain of a composite function is the set of all possible output values from the final function in the composite. It may be different from the range, which is the set of actual output values of the composite function.

5. Can the codomain of a composite function be different from the codomain of its individual functions?

Yes, the codomain of a composite function can be different from the codomain of its individual functions. This is because the output of one function may not necessarily be within the range of the next function in the composite.

Similar threads

Replies
4
Views
825
Replies
6
Views
820
Replies
4
Views
886
Replies
5
Views
1K
  • General Math
Replies
1
Views
946
  • General Math
Replies
6
Views
1K
  • General Math
Replies
11
Views
1K
Replies
3
Views
1K
Replies
2
Views
642
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Back
Top