[Math] Surjective and injective functions

analysisfunctions

So let's say that we have some function $f: \mathbb{A} \rightarrow \mathbb{B} $

Is it possible to have some function such that not all elements of A map to some value in B?

Like for example, in these pictures for various surjective and injective functions:

Example 1

Example 2

Would it be possible to have some function that has elements in A that don't map to any values of B? Like in example 1, just have the 3 in A without mapping to the element in B?

Best Answer

By definition, $f$ is a function from $A$ to $B$ if it assigns to each element $a \in A$ an element $f(a) \in B$. A partial function from $A$ to $B$ is exactly what you're after: it is a function assignment to some elements $a \in A$ values $f(a) \in B$. In a context when partial functions are discussed, if you want to emphasize that a function is not partial, then you call it a total function.