The function doesn't have inverse because it doesn't pass the horizontal line test. This test tells us that a function has an inverse function<em> if and only if</em> there is no any horizontal line that intersects the graph of at more than one point. As you can see, from the graph of f (the red one), if you draw an horizontal line that passes through then this line will touch the graph of f at three points, so the horizontal line test is not satisfied here. If you see the graph of g, this doesn't represent a function because there is at least one vertical line that touches the graph at more than one point, so this relation is not a function.