sAn easy way to know if a relation in a graph is a function is to look for 2 values of y that have the same value of x, if you find them, then the graph is not a function, to do this use the vertical line test, which consists of drawing a vertical line that cuts a point in the graph, if the line cuts 2 points, the graph is not a function
Let's do the first one
In this case there are 2 values of y that correspond to one single value of x, you know it because the second line cuts to points of the graph, it means this is not a function
For the second one
In this case, each line cuts only one point in the graph, it means it is a function