which graph represents a function? how donyou know

Only graph D represents a function. One can figure this out because of the definition of a function. A function is something where every input (x value) has only 1 output (y value). Since the only figure that works for that definition is figure D, that means that the answer is D.
A graph must pass a Vertical Line Test to be a function.
You can visualize a vertical line anywhere on the graph. If the vertical line hits the graph twice, the graph cannot be a function.
For answer A, you can draw a vertical line anywhere on x < 0, and hit the graph twice. This means the graph is not a function.
For answer B, you can draw a vertical line anywhere on the circle and hit the graph twice. This means the graph is not a function.
For answer C, the graph is a vertical line. This means the graph is not a function.
No matter where you put a vertical line on D, you will only hit the graph once. This means that graph D represents a function.