1

I'm new to discrete mathematics and was wondering whether the following functions are one to one:

$$f(x) = x - 1$$ $$f(x) = x^2 + 1$$

The reason I stand by this is because for the first equation:

$$x - 1 = y - 1\\x = y$$

and for the second one:

$$x^2 +1 = y^2 +1\\x = y$$

Git Gud
  • 31,356
Sentrl
  • 311
  • $x^2+1=y^2+1 \implies x=\pm y$, not $x=y$. For example, $(-1)^2+1 = (1)^2+1$. – David P Jan 29 '14 at 01:48
  • If $x^2=y^2$, it may be that $x=3$ and $y=-3$ so $x\ne y$. – Michael Hardy Jan 29 '14 at 01:48
  • 2
    In order to determine whether a function is one-to-one (or onto) it is essential to also give the domain and codomain, because the answer will differ depending on those. – fkraiem Jan 29 '14 at 02:03
  • As an anecdote, in high school when on tests my teacher would give us a parabola and tell us to define a domain for which the funciton is one-to-one, I always made the domain $x = 0$. – MT_ Jan 29 '14 at 03:56

2 Answers2

1

Your reasoning for the first equation is right, but not for the second.

Hint: $x^2 = y^2$ does not necessarily mean $x = y$. For example, take $x = 2, y = -2$.

For simple functions like this, one can perform the "horizontal line test." If there exists a horizontal line which intersects the graph in more than one place, then the function is not one-to-one. For the second example, that is the equation of a parabola, and if we draw a horizontal line anywhere above the vertex it will intersect the graph twice, thus it is not one to one.

The theory behind the test is that if one can draw a horizontal line that intersects in two or more places, then that means a $y$ value will be reached at two or more $x$ values. This means that there is not a one-to-one correspondence between the domain and the range.

MT_
  • 19,603
  • 9
  • 40
  • 81
1

Well, a function is characterized not only by its "formula", but, also, by its domain and codomain. Roughly, a function is a ordered triple $(X,Y, f) $, in which $ X, Y $ are sets and $ f $ is a law which associates each element $x\in X $ to one element $ f(x)\in Y $. In this situation, $X$ is called "domain" and $Y$ is called codomain.,

You can see more at: http://en.wikipedia.org/wiki/Function_%28mathematics%29

So, you usually can't say much about a function when you don't have this complete information: the domain, the codomain and the "law".

You cannot say if they are "one-to-one" if you don't know which are the domains of these functions...

Nevertheless, let me say something about your question: If you consider the domain and codomain being the real line, which I think it's the case. Then the second argument is wrong - because $x^2 = y^2 $ doesn't imply $ x=y $. Assuming $ x^2 = y ^2 $, you can only conclude that $ \left| x \right| = \left| y\right| $. Furthermore, you may conclude that $f(x) = f(-x) $ for all $x$. And you would conclude, therefore, that the function is not one-to-one.

But, if, for instance, your domain was $ \mathbb{R} ^+ $ (that is the set of positive real numbers) then your (second) argument would be right.

Fernando
  • 1,052