Any value in the domain of the function should have a unique value in codomain.
Explanation:
In the first set of points


,
value
maps to two distinct values
in the codomain.
This violates the property of functions.
The first set of points does not form a function.
In the second set of points


,
Every value in domain corresponds to unique value in domain.
There is no violation in the property of functions.
The second set of points does form a function.