One way to test if a graph is a function or not is by doing a vertical line test.
The vertical line test is tested by testing if any vertical line is drawn would intersect the curve more than once. If there is any such line, the graph does not represent a function, if there isn't any such line, the graph is a function.
Hope that helps!