Operations on functions

  • #1
DumpmeAdrenaline
35
0
TL;DR Summary
Why in combining functions to form other functions do we restrict the domain to the intersections of their domains?
For example:
h(x)=f(x)+g(x)
If f(x) and g(x) are real numbers and real numbers can be added, subtracted, multiplied and divided (except by 0). why do we insist that the x in f(x) and g(x) be {x: x∈ dom f ∩ dom g}?
My thoughts:
The equality of two functions requires two criteria:
1) They operate on the same domain
2) Images be the same, element for element
Criteria 1) is not satisfied if x does not belong to the intersection of the two sets
then f(x1)+g(x2)=h(x3, x2 or x1)
h is mapping a different element in the domain to that of f or g yielding the same image resulting from any operation we perform on f and g.
 

Answers and Replies

  • #2
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,757
15,364
If ##f(x)## is not defined at some point ##x_0##, then ##f(x) + g(x)## is not defined either. In other words, ##f(x) + g(x)## can only be defined on the intersection of the domains of ##f(x)## and ##g(x)##.
 
  • #3
DumpmeAdrenaline
35
0
Yes I get that but I am discussing something else. Let f(x1)=y1 and g(x2)=y2. y1 and y2 are two real numbers which can be added, subtracted, multiplied and divided. f(x1)+g(x2)=y1+y2 can't we equate that to another function which maps some element in its domain to y1+y2 because h is mapping a different element in the domain to that of f or g yielding the same image resulting from any operation we perform on f and g.
 
  • #4
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,757
15,364
Yes I get that but I am discussing something else. Let f(x1)=y1 and g(x2)=y2. y1 and y2 are two real numbers which can be added, subtracted, multiplied and divided. f(x1)+g(x2)=y1+y2 can't we equate that to another function which maps some element in its domain to y1+y2 because h is mapping a different element in the domain to that of f or g yielding the same image resulting from any operation we perform on f and g.
You can define a function on the Cartesian product of the domains of ##f## and ##g##:
$$h: Dom(f) \times Dom(g) \rightarrow \mathbb R$$$$h(x_1, x_2) = f(x_1) + g(x_2)$$
 
  • Like
Likes DumpmeAdrenaline
  • #5
DumpmeAdrenaline
35
0
What about the composition of two functions?
Let f:A->B and g:B->C be given. Then by the composition of f and g we mean the function h:A->C such that for each a∈A, h(a)=g(f(a))
1) The domain of h is A whereas the domain of g is B. To form the composition above, f(a) must belong to B because g cannot map an element which is not part of its domain.
2) Should f(a)=a for equality to hold? Namely h and g operate on the same domain A=B and they map the same element to the same image.
 
  • #6
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,757
15,364
The composition ##g(f(x))## is fine as long as the range of ##f(x)## is a subset of the domain of ##g(x)##. If not, then it's not always easy to work out what is the domain of ##g \circ f##. In fact, we get homework problems posted on here for this.
 
  • #7
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
5,466
1,396
2) Should f(a)=a for equality to hold? Namely h and g operate on the same domain A=B and they map the same element to the same image.

It sometimes helps to remember that functions can operate on any set (not just numbers), and these statements have to hold for all sets. Sometimes when everything is numbers it's harder to figure out what fits together.

Here's a dumb example. Let ##\mathbb{N}## be the natural numbers, and ##\mathbb{A}## be the English alphabet (letters a,b,c,...,z). Let ##\mathbb{V}## be the set of vowels (a,e,i,o,u) and ##\mathbb{C}## the set of consonants (this is not standard notation! Usually it's the complex numbers)

##f:\mathbb{N} \to \mathbb{A}## takes a number and maps it to "o" if it's odd, "e" if it's even.

So for example f(2)="e", f(7)="o".

We will consider three functions to compose this with.

##g_1:\mathbb{N}\to \mathbb{N}## defined by ##g(n)=n^2##. Is ##g_1 \circ f## well defined?

##g_2: \mathbb{A} \to \mathbb{N}## that takes a letter and maps it to which position it is in the alphabet. So ##g_2("b")=2##, ##g_2(z)= 26##. Is ##g_2\circ f## well defined?

##g_3: \mathbb{C}\to \mathbb{A}## that maps each consonant to itself. So ##g_3('c') = 'c'##. Is ##g_3 \circ f## well defined?
 
Last edited by a moderator:
  • #8
DumpmeAdrenaline
35
0
1) The composition g1.f is not well defined since the output of f is an alphabet and g1 operates rather on natural numbers.
2) g2(f(N))=5 (if N is even) or 15 (if N is odd)
3) g3f(N) is not well defined since E and O are not members of the consonant set.
Am I supplying a wrong criterion to check whether two functions are equal or not?
 

Suggested for: Operations on functions

Replies
6
Views
488
  • Last Post
Replies
17
Views
711
  • Last Post
Replies
4
Views
548
Replies
2
Views
238
Replies
18
Views
1K
  • Last Post
Replies
2
Views
610
Replies
17
Views
918
  • Last Post
Replies
8
Views
1K
Replies
4
Views
374
  • Last Post
Replies
4
Views
750
Top