Determine whether function is onto or one-to-one

3k Views Asked by At

If $x, m, n$ are integers determine whether the following are onto or one-to-one and justify.

(a) $f(x) = (x + 2)$ - One to one because no such value of $x$ has the same result

(b) $g(x) = (x^2 + 2)$ - One to one because no such value of $x$ has the same result

(c) $h(x) = (x^3 + 2)$ - One to one because no such value of $x$ has the same result

(d) $f(m, n) = m + n + 1$ - Not onto because $f(0,1)$ and $f(1,0)$ both equal to $1$

(e) $f(m, n) = |m|$ - Not onto because the negative values of $m$ will give the same result as the positive values

(f) $f(m, n) = m^2 + n^2$ - Not onto because $f(0,1)$ and $f(1,0)$ both equal to $1$

Could someone tell me if my answers are right? I am not sure whether we have to take the negative numbers as well. The questions says $n,m$ and $x$ are in $\mathbb{Z}$. So I am assuming there are both positive and negative.

3

There are 3 best solutions below

0
On

Assuming the domain is Z, b is wrong.
The verbage use for b is weak for a,c.
Would it ask too much to actually prove it?
d, e, f are flat out wrong. Check your thinking.

To ask if a function is surjective (1-1) without stating its codomain is like asking how much water is needed to fill a glass without telling the size of the glass.

2
On

Whether or not something is one-to-one or onto depends on the domain and range of the functions. If it specified that you're working in the integers, then you have to look at negative and positive numbers. That means that your answer to b is wrong. Also, a function can be both one-to-one and onto. In fact, some of the ones you've marked as one-to-one are onto and vice versa. Lastly, it seems like you mixed up one to one and onto in d, e, and f. You're reasoning is correct but it has nothing to do with the functions being onto and instead shows they're not one-to-one.

0
On

To prove a function $f$ is injective (one-to-one), you must show that $f(x_1) = f(x_2) \implies x_1 = x_2$.

Your claim that the function $f: \mathbb{Z} \to \mathbb{Z}$ defined by $f(x) = x + 2$ is injective is correct since $$f(x_1) = f(x_2) \implies x_1 + 2 = x_2 + 2 \implies x_1 = x_2$$

Your claim that the function $g: \mathbb{Z} \to \mathbb{Z}$ defined by $g(x) = x^2 + 2$ is injective is incorrect since $$g(-1) = (-1)^2 + 2 = 1 + 2 = 1^2 + 2 = g(1)$$ but $-1 \neq 1$.

To prove a function $f$ is surjective (onto), you must show that given any element $y$ in the codomain, you can produce an element $x$ in the domain such that $f(x) = y$.

For instance, the function $f: \mathbb{Z} \to \mathbb{Z}$ defined by $f(x) = x + 2$ is surjective since given $y \in \mathbb{Z}$ we can find $x = y - 2 \in \mathbb{Z}$ such that $f(x) = f(y - 2) = y - 2 + 2 = y$.

The function $f: \mathbb{Z} \to \mathbb{Z}$ defined by $g(x) = x^2 + 2$ is not surjective since $1$ is not in its range. To see this, suppose that $g(x) = x^2 + 2 = 1$. Then $x^2 = -1$. However, there is no integer whose square is equal to $-1$.

Please try the others on your own.