Discrete Mathematics - One to One 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$$
 A: 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.
A: 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.
