Surjective and injective functions 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:


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?
 A: 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.
A: Curiously, real analysis and calculus are better expressed in terms of partial functions $f: \mathbb R \to \mathbb R$, which have a domain $ D(f)$ and a range $ R(f)$. I'll just use the name function for these. Then an injective function  $f$ has an inverse $f^{-1} $, and $D(f^{-1}) = R(f), R(f^{-1}) = D(f)$. Of course the function sin is not injective but its restriction to the interval $[-\pi/2, +\pi/2]$ is injective and its  inverse is our old friend sin$^{-1}$. We also have the empty function, given by, for example, log(log(sin $x$))). Notice that the solution of a first order differential equation is usually a partial function. 
Because of this, you would think that the functional analysis of partial functions would be well developed, and even  significant, but I think it barely exists. A research student and I wrote a paper 
A,M. Abd-Allah and R. Brown,  ``A compact-open topology on partial
maps  with open domain'', J. London Math Soc. (2) 21 (1980)
480-486. 
(and the closed domain case is also interesting and useful) but it is not so easy to see how to deal with functions with quite general domains! Nonetheless, a search on "spaces of partial maps" gives quite a few hits. 
