# Why aren't the functions $f(x) = \frac{x-1}{x-1}$ and $f(x) = 1$ the same? [duplicate]

I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the same function but with different domain how is this possible?

Or in other words why don't we simplify $f(x) = \frac{x-1}{x-1}$ to $f(x) = 1$ before plotting the points. Is it just defined this way or is there a particular reason ?

Note: my book says the domain of $f(x) = 1$ is $\mathbb{R}$ and the domain of $f(x) = \frac{x-1}{x-1}$ is $\mathbb{R}$ except $1$.

• This is an interesting question, but posted on the wrong website. You may want to think about what it means precisely for two functions to be "the same". Jan 11, 2017 at 15:16
• The crux of the matter is that you have been deceived: if they told you that a function is simply a formula, then they lied... Rather, a function f is: 1. a source set S, 2. a target set T, 3. a way to associate to each element x in S a unique element of T, denoted by f(x). In your example, 2. and 3. coincide but one generally chooses for S the real line for the function f(x)=1. Then you see that one cannot choose this same set S for the function f(x)=(x-1)/(x-1) since (1-1)/(1-1) does not exist, hence the two functions are indeed different.
– Did
Jan 11, 2017 at 15:26
• Jan 11, 2017 at 16:40
• "so they're the same function but with different domain" That answers your question. The domain is a required part of the determination of a function. The "same function but with different domain" is a bit like saying "24 and 48 are the same number but with a different power of 2". If the domains are different... then the functions are different. It's that simple. Jan 11, 2017 at 17:11
• Almost identical: math.stackexchange.com/questions/1670139/…. Jan 11, 2017 at 20:20

They are the same almost everywhere. But clearly one of them does not exist for $x=1$ (since "$\tfrac{0}{0}$" is undefined), while the other one is simply $1$ at $x=1$.

I understand that division by zero isn't allowed, but we merely just multiplied f(x) = 1 by (x-1)/(x-1)

You can multiply by any fraction $\tfrac{a}{a}$; but not when $a=0$ because the fraction you want to multiply with, isn't even defined then. So multiplying by $\tfrac{x-1}{x-1}$ is fine, but only valid for $x \ne 1$.

why don't we simplify f(x) = (x-1)/(x-1) to f(x) = 1 before plotting the points. Is it just defined this way or is there a particular reason ?

You can simplify, but recall that simplifying is actually dividing numerator and denominator by the same number: you can simplify $\tfrac{ka}{kb}$ to $\tfrac{a}{b}$ by dividing by $k$. But also then: this only works for $k \ne 0$ since you can't divide by $0$. So "simplifying" $\tfrac{x-1}{x-1}$ to $1$ is fine, for $x-1 \ne 0$ so for $x \ne 1$.

Note: my book says the domain of $f(x) = 1$ is $\mathbb{R}$ and the domain of $f(x) = \frac{x-1}{x-1}$ is $\mathbb{R}$ except $1$.

Technically, the domain is a part of the function: it should be given (as well as the codomain). It is very common though that when unspecified, in the context of real-valued functions of a real variable, we assume the 'maximal domain' is intended (and $\mathbb{R}$ is taken as codomain). Then look at: $$f : \mathbb{R} \to \mathbb{R} : x \mapsto f(x) = 1$$ and $$g : \mathbb{R} \setminus \left\{ 1 \right\} \to \mathbb{R} : x \mapsto g(x) = \frac{x-1}{x-1}$$ The functions $f$ and $g$ are different, but $f(x) = g(x)=1$ for all $x$ except when $x=1$, where $g$ is undefined.

Question: What is a function?

Answer: Maybe simply said it is a map (receipe), $f(x)$, that projects some elements, $x$, contained in a specifically defined set, Domain $D$, into another set, Range $R$.

Discussion: Hence when defining a function one must define the Domain as well as the functional form. Otherwise the function is not defined.

Conclusion: If two funtions have the same domain and the same receipe then they are the same "maps" otherwise they are not.

• Indeed, except that the target set can be any set containing the range, not necessarily the range.
– Did
Jan 11, 2017 at 15:30
• @Did Thank for making it more precise :-) Jan 11, 2017 at 15:30

$f(x)=(x-1)/(x-1)$ does not have a value when $x=1$, different thing happens to $f(x)=1$