¨ is injective if and only if different inputs give different outputs.
¨ is injective if and only if “different elements of A go to different elements of B.”
¨ It is the whole function that is or is not injective.
¨ The articles about most of the example functions state whether they are injective or not. Checking each of these functions to see why it is or is not injective is an excellent way to get a feel for the concept of injectivity.
¨ The doubling function is injective on the real numbers and in fact on the complex numbers. Doubling different numbers gives different numbers.
¨ The squaring function is not injective, because for example . Squaring different numbers might give you the same number.
¨ The cubing function on the reals is injective. It is not injective on the complex numbers, because for example
¨ See Wikipedia for more examples and more discussion.
No information loss
An injective function loses no information. If you have an output from the function, you know it came from exactly one input.
¨ If you got 8 when you cubed a real number, the real number had to be 2. The cubing function is injective on the reals. But if you got 8 when you cubed a complex number, the complex number could be any of three numbers (see above); the cubing function is not injective on the complex numbers.
¨ If you got 4 when you squared something, the something could have been either 2 or 2: You lost some information about the input, namely its sign in this case. The squaring function is not injective.
¨ If you get as an output from the sine blur function, it could have come from any one of an infinite number of inputs. The sin blur function is ridiculously noninjective.
Embeds as a substructure
Some functions preserve some structure. For example, multiplying integers by 2 preserves addition. In other words, if you let be defined by , then (write it out, don’t just believe me!). This makes it a group homomorphism. Because multiplying by 2 is injective, this says that the substructure of the group of integers with addition as operation that consists of the even integers is a copy of the group of integers itself.
Horizontal line crosses the graph only once at most
Let be a real continuous function. Then F is injective if no horizontal line cuts it twice. This is a useful way of thinking about injective continuous functions, but it doesn’t work with arbitrary functions.
a) This is a plot of part of (which is injective) with some horizontal lines
b) On the other hand, is not injective. Note that some horizontal lines cut it more than once, but others cut it only once.
c) Horizontal lines don’t have to cut a function at all. This is part of . Horizontal lines below zero don’t cut its graph because 0 is its minimum. There are horizontal lines that cut it twice, so it is not injective.
A function is surjective if and only if
¨ is surjective if and only if the image of F is the same as the codomain B.
¨ is surjective if and only if “every element of B comes from an element of A.”
¨ Let be the squaring function, so for every real number x. Then F is not surjective, since for any negative number b, there is no real number a such that F(a) = b. (You can’t solve , for example).
¨ But if you define (where denotes the set of nonnegative reals) by , then G is surjective. As you can see, whether a function is surjective or not depends on the codomain you specify for it. Note that “G is surjective” says exactly that every nonnegative real number has a square root.
Another way of saying that is surjective is to say, “F is surjective onto B”, or simply, “F is onto B”. Saying it this way does not depend on whether you use the loose or strict definition for functions.
A function is surjective if every horizontal line crosses its graph (one or more times). Check out the graphs (a) through (c) above: and are surjective onto , but is not surjective onto . H is surjective onto the set of nonnegative real numbers.