Example 11: on : neither
Show that the function , defined as , is neither one-one nor onto.
Not one-one: and , so but . Thus is not one-one.
Not onto: for every , so has no real solution. So has no pre-image. Thus is not onto.
Hence is neither one-one nor onto.
Want the reason behind every step, the basics and the checks?
Squaring forgets the sign: and always have the same square. That makes fail one-one. Squaring also never produces a negative number, since for every real . So the whole negative half of the codomain is never reached, and fails onto. Both failures are shown with a single explicit counterexample each, as the book does: , and has no preimage.
- Given
- , with domain and codomain .
- To show
- (a) is not one-one. (b) is not onto.
- Plan
- (1) Disprove one-one with the pair . (2) Disprove onto with the element , and answer the book's "(Why?)" by proving for every real . (3) Identify the range exactly, and conclude.
Basics you need
One-one: . Onto: every in the codomain equals for some in the domain. Basics: one-one and onto
Both definitions are "for every" statements, so each is disproved by one explicit failure: one pair of distinct inputs with equal images, or one element of the codomain with no preimage. Basics: proving and disproving
The product of two positive numbers is positive, and the product of two negative numbers is also positive. Zero times anything is zero. Hence a square is never negative. Basics: integers, even and odd
"Neither one-one nor onto" is two separate claims, and both must be shown. Showing only one of them is half an answer. Basics: what a function is
Solution
Not one-one: and have the same square
Compute both images:
So , although . Two different inputs have the same image, so is not one-one.
One-one says every pair with equal images consists of equal inputs. The pair breaks this, and one such pair is a complete disproof. The choice of is not special: for every , with , so every positive output is in fact hit twice.: a negative times a negative is positive. That identity is the reason squaring cannot be one-one on a set containing both and .Why a square is never negative
Take any real . There are three cases.
- If : is a product of two positive numbers, so .
- If : .
- If : is a product of two negative numbers, so .
Every real number falls in exactly one case, so
This is the answer to the book's "(Why?)" in the next step. It is a "for every " statement, so we prove it for an arbitrary , splitting into cases that cover all real numbers.Proof by cases: the three cases , , cover every real number, so proving the claim in each covers them all.Not onto: is never a square
The codomain is , so is an element of it. Suppose some real had , that is . By Step 2, , while . A number cannot be both and , so there is no such . Hence is not the image of any element of the domain, and is not onto.
The graph of (compare the book's Fig 1.4). The line meets it twice, at and : not one-one. The line , and every line in the shaded region , misses it completely: not onto. To show an element has no preimage, failing to find one is not enough; we must show that none can exist. Assuming a preimage exists and reaching a contradiction (a number that is both and negative) does exactly that.On a graph, has a preimage exactly when the horizontal line meets the graph. Two meeting points mean "not one-one"; none means "not onto". Basics: one-one and ontoThe range is
Step 2 shows every output is . Conversely every is reached: is a real number and . So
The range is not the whole codomain, which again shows (by the Remark after Definition 6) that is not onto. Every negative number is missed, not just .
Knowing the exact range explains how to repair the function. If we shrink the codomain to , becomes onto; if we also shrink the domain to , it becomes one-one too, and then is its inverse.is onto exactly when its range equals its codomain.Conclude
is not one-one (Step 1) and not onto (Step 3). So is neither one-one nor onto.
Each failure was established with its own counterexample, so both halves of "neither … nor" are proved. Compare Exercise 1.2 Q2, where the same formula is tested on and : on there are no negative inputs, so squaring becomes one-one there.
on is not one-one, since with , and not onto, since for every real , so (indeed every negative number) has no preimage. Its range is .
Squares of are : none is negative, and appears twice (from ), just like 1 from . Trying to hit numerically: the smallest value takes on any list of reals is at least 0, so it can never equal .
- Saying " gives ". is not a real number, and the domain is . This is exactly why there is no preimage.
- Choosing a positive number as the counterexample for onto. Every is reached (by ). Only negative numbers work as counterexamples.
- Proving only one half. "Neither one-one nor onto" requires both failures.
- Using for the one-one counterexample. and are the same number, so they are not two different inputs. Use a non-zero pair such as .
- Any function with (an even function) fails to be one-one on a set containing some and .
- To show onto fails, find a value outside the range, and prove that it is outside, for example by an inequality like .
- Restricting domain or codomain can repair a function: from to is a bijection.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Definition of one-one | Step 1 | Definition 5, Section 1.3 (Lesson: types of functions) |
| Definition of onto; onto range = codomain | Steps 3, 4 | Definition 6 and the Remark after it, Section 1.3 |
| Step 1 | Sign rule for products | |
| for all real | Steps 2, 3 | Sign rule for products, by cases |
| for | Step 4 | Definition of the square root |
| Graph of | Step 3 figure | Fig 1.4, Section 1.3 |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →