Theory:

A function is represented using a curve on a graph.
 
When a vertical line drawn, intersects the curve precisely at one point, the curve forms a function.
Example of a function
4.svg
 
In the figure given above, the vertical line intersects the curve precisely at one point.
 
Therefore, the figure given above is a function.
Example of a non-function
3.svg
 
In the figure given above, the vertical line intersects the curve at two points.
 
Therefore, the figure given above is not a function.