Examples
For any set X, the identity function idX on X is surjective.
The function f : Z → {0,1} defined by f(n) = n mod 2 (that is, even integers are mapped to 0 and odd integers to 1) is surjective.
The function f : R → R defined by f(x) = 2x + 1 is surjective (and even bijective), because for every real number y we have an x such that f(x) = y: an appropriate x is (y − 1)/2.
The function g : R → R defined by g(x) = x2 is not surjective, because there is no real number x such that x2 = −1. However, the function g : R → Rnn defined by g(x) = x2 (with restricted codomain) is surjective because for every y in the nonnegative real codomain Y there is at least one x in the real domain X such that x2 = y.
The natural logarithm function ln : (0,+∞) → R is a surjective and even bijective mapping from the set of positive real numbers to the set of all real numbers. Its inverse, the exponential function, is not surjective as its range is the set of positive real numbers and its domain is usually defined to be the set of all real numbers. The matrix exponential is not surjective when seen as a map from the space of all n×n matrices to itself. It is, however, usually defined as a map from the space of all n×n matrices to the general linear group of degree n, i.e. the group of all n×n invertible matrices. Under this definition the matrix exponential is surjective for complex matrices, although still not surjective for real matrices.
The projection from a cartesian product A × B to one of its factors is surjective.
In a 3D video game vectors are projected onto a 2D flat screen by means of a surjective function.
Read more about this topic: Surjective Function
Famous quotes containing the word examples:
“There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.”
—Bernard Mandeville (16701733)
“Histories are more full of examples of the fidelity of dogs than of friends.”
—Alexander Pope (16881744)
“It is hardly to be believed how spiritual reflections when mixed with a little physics can hold peoples attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.”
—G.C. (Georg Christoph)