# Can f-g ever equal g-f?

by Kakateo
Tags: equal
 P: 4 I was wondering that if told the functions for f(x) and g(x) are different, can f-g ever equal g-f? My take on this was that they can never equal each other but some of my friends said they can sometimes equal each other because they plugged in x=0 for f(x) = 2x and g(x) = 3x. I was told that I couldn't put any random coordinates in. Another instance I just thought of is 1^x and 1^2x, as both will always equal 1, holding the equality statement true. However, wouldn't those two equations be the same as writing y=1 therefore having the same function? I'm not really sure so I ask for guidance please :)
 P: 1,302 I'm not sure why you want to avoid doing algebra? Let f-g = g-f Then f - g + f = g f + f = g + g 2f = 2g f = g So yes, they are the same if f - g = g - f, clearly.
HW Helper
Thanks
P: 26,148
Hi Kakateo!

(try using the X2 button just above the Reply box )
 Quote by Kakateo I was told that I couldn't put any random coordinates in.
You were told correctly!

For two functions to be equal, they have to be the same … I can't think of another way of putting it!

If two functions of x are equal at (eg) x = 0, that doesn't make them equal.
 Another instance I just thought of is 1x and 12x, as both will always equal 1, holding the equality statement true. However, wouldn't those two equations be the same as writing y=1 therefore having the same function?
Correct: they are the same (constant!) function written two different ways!

 P: 4 Can f-g ever equal g-f? Thank you for the help :) One last question: would f-g=g-f be always true, sometimes true, or never true? Once again, this is said with f(x) =/= g(x)
P: 1,302
 Quote by Kakateo Thank you for the help :) One last question: would f-g=g-f be always true, sometimes true, or never true? Once again, this is said with f(x) =/= g(x)
Never true when f(x) =/= g(x)

Always true when f(x) = g(x)

Again, simple algebra makes quick work of the question. Another way to do it:

Let f - g = g - f
Then f - g = -(f - g)
Then f - g = 0 [where 0 is the zero function]
And so f = g
 Mentor P: 21,280 Part of the difficulty here seems to me to be that the term "equal" is ambiguous, as is the symbol we use, =. If we let f(x) = x and g(x) = 4 - x, then f(x) = g(x) if x = 2, hence f(x) - g(x) = g(x) - f(x) = 0 when x = 2. "Equal" here is conditional, with the condition being that x = 2. OTOH, if "equal" means "identically equal" then f and g are not identically equal, as their graphs are different. In this case, f(x) - g(x) is not in general equal to either g(x) - f(x) or zero.
P: 1,302
 Quote by Mark44 Part of the difficulty here seems to me to be that the term "equal" is ambiguous, as is the symbol we use, =. If we let f(x) = x and g(x) = 4 - x, then f(x) = g(x) if x = 2, hence f(x) - g(x) = g(x) - f(x) = 0 when x = 2. "Equal" here is conditional, with the condition being that x = 2. OTOH, if "equal" means "identically equal" then f and g are not identically equal, as their graphs are different. In this case, f(x) - g(x) is not in general equal to either g(x) - f(x) or zero.
I don't think there is any ambiguity in "=" but rather what we mean by ##f(x)##. The first interpretation you've presented does not view ##f(x)## in ##f(x) = g(x)## as a function, it views it as some element of the range of a function. The second interpretation views ##f(x)## as a function.

That's why I like the notation ##f: X \rightarrow Y##. It's hard to interpret that as being some element of the range of f. It's clearly talking about the function. If we say ##f: X \rightarrow Y = g: X \rightarrow Y##, we all know what is meant.

I would argue that the only legitimate interpretation of ##f(x) = g(x)## where ##f(x)## and ##g(x)## are to be viewed as functions, is that they are identically equal. Presenting interpretations where they are referring to elements of the range is just going to cause confusion, and is likely not the OP's question (because then there is no reason to phrase this question in terms of functions anyway).
 P: 4 So then in this case would you be able to plug in 0 as a point and get f-g = g-f?
Mentor
P: 21,280
 Quote by 1MileCrash I don't think there is any ambiguity in "=" but rather what we mean by ##f(x)##.
There certainly is ambiguity in the symbol as it is ordinarily used. Consider these two equations:
1. (x + 1)2 = x2 + 2x + 1
2. (x + 1)2 = 4

The first equation is identically true. The second equation is true only for x = 1 or x = -3.

 Quote by 1MileCrash The first interpretation you've presented does not view ##f(x)## in ##f(x) = g(x)## as a function, it views it as some element of the range of a function.
You lost me here. I defined f and g as functions and then set them equal.
 Quote by 1MileCrash The second interpretation views ##f(x)## as a function. That's why I like the notation ##f: X \rightarrow Y##. It's hard to interpret that as being some element of the range of f. It's clearly talking about the function. If we say ##f: X \rightarrow Y = g: X \rightarrow Y##, we all know what is meant.
But then you need to provide a formula for the function, which is what I did in my examples. I don't see that the notation with the arrow provides any clarity.
 Quote by 1MileCrash I would argue that the only legitimate interpretation of ##f(x) = g(x)## where ##f(x)## and ##g(x)## are to be viewed as functions, is that they are identically equal.
You're essentially arguing my point here. What I said was that we should distinguish between conditional equality of two expressions (each of which happen to be functions in my example) and unconditional or identical equality of the expressions.

If you write f(x) = g(x) versus f(x) ##\equiv## g(x), it's clear what the difference is.
 Quote by 1MileCrash Presenting interpretations where they are referring to elements of the domain is just going to cause confusion, and is likely not the OP's question (because then there is no reason to phrase this question in terms of functions anyway).
P: 1,302
 Quote by Mark44 There certainly is ambiguity in the symbol as it is ordinarily used. Consider these two equations: 1. (x + 1)2 = x2 + 2x + 1 2. (x + 1)2 = 4
I didn't mean to imply that the "=" sign can't be ambiguous, I mean it is not the source of ambiguity here. In any case, the first is a true statement, the second is not a statement, and is wrong to write as a true statement. I could presume its truth by saying "let (x + 1)2 = 4" but it is not a logical statement to write down precisely because it has no inherent truth value.

The equals sign means the same thing in both cases.

 You lost me here. I defined f and g as functions and then set them equal.
Yes, you defined ##f## and ##g## as functions, and they are functions, but one can use the symbol "##f(x)##" to either mean the function itself, or as an element of the range of the function, in different contexts.

By saying "then f(x) = g(x) if x = 2" you are saying that "the range element f(x) is equal to the range element g(x) whenever x = 2," you are not saying that the functions ##f(x)## and ##g(x)## are equal whenever x = 2, you are saying that the functions map the domain element 2 to the same range element, 2. In other words, you are using f(x) and g(x) to refer to a specific member of the range corresponding to a specific member of the domain, x. They are not being used to represent the functions f and g in this usage.

In other words, when I say "when x = 2, f(x) = 5" I am using the symbol "f(x)" to refer to an element of the range of the function f, I am not using it to refer to the function itself, I am not asserting that the function f is equal to the number 5. Similarly, if I say "when x = 2, f(x) = 5 and g(x) = 5, so f(x) = g(x) when x = 2" I am using f(x) and g(x) to refer to elements of the ranges of f and g respectively. I am not saying that the function f(x) is equal to the function g(x) whenever x = 2.

 But then you need to provide a formula for the function, which is what I did in my examples. I don't see that the notation with the arrow provides any clarity.
I don't know what you mean by needing to provide a formula with the function.

The notation with the arrow provides clarity because ##f: X \rightarrow Y## never refers to some element of the codomain, it always means the function itself. ##f(x)## may mean both, depending on the context.

Let ##f: X \rightarrow Y## be a function.
Then for any ##x \in X, f(x) \in Y##. I am not saying that the function f itself is a member of its own codomain.. "##f(x)##" does not refer to the function ##f## in this usage.

Have you ever seen anyone write something like:

Let ##f(x)## be a function.
Then for any ##x \in X, ( f: X \rightarrow Y ) \in Y##.

Because I sure haven't.

 You're essentially arguing my point here. What I said was that we should distinguish between conditional equality of two expressions (each of which happen to be functions in my example) and unconditional or identical equality of the expressions.
Yes, but we can distinguish them automatically by simply clarifying what we are talking about. "Conditional equality of two functions" is just another way of saying "an instance where the output of the functions are equal." The output of the functions, not the functions. So to write ##f(x) = g(x)##, and to mean "conditional equality of two functions" means you are referring to ##f(x)## and ##g(x)## as "outputs of the function" and not the functions.

If I say:

##f: X \rightarrow Y = g: X \rightarrow Y##

there is absolutely no way to interpret that as "conditional equality of two functions." It means the functions are equal, always.
 Engineering Sci Advisor HW Helper Thanks P: 7,157 Everybody is assuming "function" means something similar to ##f:\mathbb R \to \mathbb R##. In general, the OP's statement can be true. For example, take addition modulo 2, and f(x) = x, g(x) = 1-x. f(x)-g(x) and g(x)-f(x) are both equal to 1, for all (i.e. both) values of x. 1MileCrash's proof in #2 fails, because here 1+1=0.
Mentor
P: 21,280
 Quote by 1MileCrash I didn't mean to imply that the "=" sign can't be ambiguous, I mean it is not the source of ambiguity here. In any case, the first is a true statement, the second is not a statement, and is wrong to write as a true statement. I could presume its truth by saying "let (x + 1)2 = 4" but it is not a logical statement to write down precisely because it has no inherent truth value.
You're omitting some context that I included, which was that if x = 1 or x = -3, the second equation is a true statement. For any other values of x, it is a false statement.

 Quote by 1MileCrash The equals sign means the same thing in both cases.
I disagree for the reasons already given.
 Quote by 1MileCrash Yes, you defined ##f## and ##g## as functions, and they are functions, but one can use the symbol "##f(x)##" to either mean the function itself, or as an element of the range of the function, in different contexts. By saying "then f(x) = g(x) if x = 2" you are saying that "the range element f(x) is equal to the range element g(x) whenever x = 2," you are not saying that the functions ##f(x)## and ##g(x)## are equal whenever x = 2, you are saying that the functions map the domain element 2 to the same range element, 2. In other words, you are using f(x) and g(x) to refer to a specific member of the range corresponding to a specific member of the domain, x. They are not being used to represent the functions f and g in this usage.
I agree with what you are saying here, but I suspect that you might be going way over the head of the OP.
 Quote by 1MileCrash In other words, when I say "when x = 2, f(x) = 5" I am using the symbol "f(x)" to refer to an element of the range of the function f, I am not using it to refer to the function itself, I am not asserting that the function f is equal to the number 5. Similarly, if I say "when x = 2, f(x) = 5 and g(x) = 5, so f(x) = g(x) when x = 2" I am using f(x) and g(x) to refer to elements of the ranges of f and g respectively. I am not saying that the function f(x) is equal to the function g(x) whenever x = 2. I don't know what you mean by needing to provide a formula with the function. The notation with the arrow provides clarity because ##f: X \rightarrow Y## never refers to some element of the codomain, it always means the function itself. ##f(x)## may mean both, depending on the context.
My comment was that the arrow notation merely states that there is a mapping between two sets, but doesn't say how the mapping works. I completely understand the distinction between a function f and a value of the function, f(x).
 Quote by 1MileCrash Let ##f: X \rightarrow Y## be a function. Then for any ##x \in X, f(x) \in Y##. I am not saying that the function f itself is a member of its own codomain.. "##f(x)##" does not refer to the function ##f## in this usage. Have you ever seen anyone write something like: Let ##f(x)## be a function. Then for any ##x \in X, ( f: X \rightarrow Y ) \in Y##. Because I sure haven't. Yes, but we can distinguish them automatically by simply clarifying what we are talking about. "Conditional equality of two functions" is just another way of saying "an instance where the output of the functions are equal." The output of the functions, not the functions. So to write ##f(x) = g(x)##, and to mean "conditional equality of two functions" means you are referring to ##f(x)## and ##g(x)## as "outputs of the function" and not the functions. If I say: ##f: X \rightarrow Y = g: X \rightarrow Y## there is absolutely no way to interpret that as "conditional equality of two functions." It means the functions are equal, always.
P: 1,302
 Quote by Mark44 You're omitting some context that I included, which was that if x = 1 or x = -3, the second equation is a true statement. For any other values of x, it is a false statement.
What I am saying is that when I consider
(x + 1)2 = 4

to be a statement about two functions, it is a false statement, always.

If you say "it is true whenever x = 1 or x = -3," it may be true statement, but it is not a true statement about the functions (x+1)2 and 4, it is a true statement about the numbers (1+1)2, (-3 + 1)2, and 4.

You could say "the functions are equal at those points" but it is never correct to write f(x) = g(x) with those regarded as functions even if that is the case.

But I digress, and this becomes a debate about nothing in particular, because whether or not we perceive ambiguity in what f(x) means or what "=" means, clarification of one clarifies the other. My only point is that in the statement "f(x) = g(x)" I would immediately consider this to be a statement about functions themselves, and thus there is no ambiguity in =.
P: 1,302
 Quote by AlephZero In general, the OP's statement can be true. For example, take addition modulo 2, and f(x) = x, g(x) = 1-x. f(x)-g(x) and g(x)-f(x) are both equal to 1, for all (i.e. both) values of x. 1MileCrash's proof in #2 fails, because here 1+1=0.
This is incorrect.

f(x) - g(x) is defined to be the difference of f(x) and g(x) for any x.

That means that
##f(x) - g(x) = (x (mod 2)) - ((1 -x) mod 2)##
which is completely different from
##(x - (1 - x)) (mod 2) = (2x - 1) (mod 2)##

With your f(x) and g(x), I assert that
##(f - g)(3) = 1##
and
##(g - f)(3) = -1##
and so f - g =/= g - f

You have defined your functions themselves to take addition mod 2, that does not impose addition mod 2 on the subtraction operation of functions unless you are talking about something like ##(f - g) (mod 2)## which is not ##f - g##.
Mentor
P: 21,280
 Quote by 1MileCrash What I am saying is that when I consider (x + 1)2 = 4 to be a statement about two functions, it is a false statement, always. If you say "it is true whenever x = 1 or x = -3," it may be true statement, but it is not a true statement about the functions (x+1)2 and 4, it is a true statement about the numbers (1+1)2, (-3 + 1)2, and 4.
IMO you're being pedantic here. Rightly or wrongly, there are countless textbooks that conflate the ideas of a function with the output of the function.

Clearly the function f(x) = x2 + 1 is different from the function g(x) = 4, so the equation above could not possibly be interpreted as a statement that is identically true. However, as a conditional equation, it IS a true statement for the values of x that I listed.
 Quote by 1MileCrash You could say "the functions are equal at those points" but it is never correct to write f(x) = g(x) with those regarded as functions even if that is the case.
Nor was that what I was saying or implying.
 Quote by 1MileCrash But I digress, and this becomes a debate about nothing in particular, because whether or not we perceive ambiguity in what f(x) means or what "=" means, clarification of one clarifies the other. My only point is that in the statement "f(x) = g(x)" I would immediately consider this to be a statement about functions themselves, and thus there is no ambiguity in =.
The whole thing about functions has been a digression. My only point is that we use the same symbol, =, to mean two different things, and that is confusing to many students. Having spent 21 years teaching mathematics classes at the college level, I have some experience in this matter.

A final example comes from the technique of partial fractions, in which, for example, the goal is to write x/[(x + 2)(x + 3)] in the form A/(x + 2) + B/(x + 3).

After multiplying both sides by (x + 2)(x + 3), obtaining x = A(x + 3) + B(x + 2).

This equation is really an identity, meaning that it holds for all values of x, possibly except for x = -3 and x = -2. If this were written as x ##\equiv## A(x + 3) + B(x + 2), it might reinforce the idea that this is an identity rather than a conditional equation.
P: 1,302
 Quote by Mark44 IMO you're being pedantic here. Rightly or wrongly, there are countless textbooks that conflate the ideas of a function with the output of the function. Clearly the function f(x) = x2 + 1 is different from the function g(x) = 4, so the equation above could not possibly be interpreted as a statement that is identically true. However, as a conditional equation, it IS a true statement for the values of x that I listed.

I'm only saying that considering its truth value for particular values of x means that I am no longer evaluating whether or not two functions are equal by the definition of equal functions.

 Nor was that what I was saying or implying.
Of course.

I know, that you know, what it means for functions to be equal. I'm just pointing it out as a reason for my opinion.

 The whole thing about functions has been a digression. My only point is that we use the same symbol, =, to mean two different things, and that is confusing to many students. Having spent 21 years teaching mathematics classes at the college level, I have some experience in this matter. A final example comes from the technique of partial fractions, in which, for example, the goal is to write x/[(x + 2)(x + 3)] in the form A/(x + 2) + B/(x + 3). After multiplying both sides by (x + 2)(x + 3), obtaining x = A(x + 3) + B(x + 2). This equation is really an identity, meaning that it holds for all values of x, possibly except for x = -3 and x = -2. If this were written as x ##\equiv## A(x + 3) + B(x + 2), it might reinforce the idea that this is an identity rather than a conditional equation.
My point is that the equals sign can only be taken to mean two different things if the objects we are comparing can be taken to mean two different things.

Equality of numbers means precisely one thing.
Equality of functions means precisely one thing.
Equality of vectors means precisely one thing.
Equality of sets means precisely one thing.
.
.
.

That's why I remarked that in this case, the ambiguity of ##f(x)## leads to an ambiguity of '=.' There isn't any ambiguity in ##f: X \rightarrow Y = g: X \rightarrow Y##. I'm sorry if it sounds like I am being pedantic, I wasn't really expecting a follow-up debate or response about ##f(x)## being ambiguous, or having to defend why I said that.
Mentor
P: 21,280
 Quote by 1MileCrash My point is that the equals sign can only be taken to mean two different things if the objects we are comparing can be taken to mean two different things. Equality of numbers means precisely one thing. Equality of functions means precisely one thing. Equality of vectors means precisely one thing. Equality of sets means precisely one thing. . . .
If by "numbers" you include expressions that evaluate to a number, then = is ambiguous, and that was my whole, entire point.

My example from post #9:
 There certainly is ambiguity in the symbol as it is ordinarily used. Consider these two equations: 1. (x + 1)2 = x2 + 2x + 1 2. (x + 1)2 = 4
The = in the first equation is used in a different way than the one in the second equation.

Since the OP hasn't chimed in for a while, I'm going to close this thread.

 Related Discussions Calculus 10 General Math 5 Introductory Physics Homework 5 Linear & Abstract Algebra 7 Calculus 17