The graph of a function in this visualization
The graph of a function consists of the points for in its domain . From it you can read the output at a given input, or find every input that gives a chosen output. A point lies on the graph exactly when its -coordinate is the function's value at its -coordinate, which is why the graph is often described by the equation .
Switch the graph off and move : the moving point traces the part of the graph it visits. The curve you usually see is this track with every input visited. Because each input has exactly one output, each vertical line through an input in the domain meets the graph exactly once; the Function page explains this test.
Reading it both ways
For in the domain, go from on the -axis straight up or down to the graph, then across to the -axis. The height you arrive at is .
To solve , read the other way. Draw the horizontal line ; each point where it meets the graph has height , so its -coordinate is a solution, and every solution appears this way. Counting meeting points counts solutions. A point where the line only touches the graph is still one point and one solution. The line can also miss the graph entirely, lie along a flat piece so that a whole interval solves the equation, or meet a graph that keeps returning to the same height infinitely often.
Domain and range as shadows
Press the graph flat onto the -axis and the shadow it leaves is the set of inputs that have a point: the domain. Pressed onto the -axis, it leaves every height the graph reaches: the range. So has a solution exactly when lies in the range. At the end of a shadow, a filled dot means that coordinate is included and an open circle means it is not. For , with no point above and no height , both shadows have a gap at . A graph that runs off the picture does not stop there; the cubic's range is every real number, though only part of it fits on the screen.
Why joining plotted points can mislead
Drawing a graph by hand usually means working out a few points and joining them. The points are true; the joins are a guess about what happens between them, and finitely many points cannot settle that. Samples taken at a fixed step can all land at the same height while the graph swings up and down in between. A smaller step can reveal what a larger one missed, as the sine's peaks and troughs show, but it cannot always mend the picture: on the floor function every join across a jump is a slant the graph never takes, however small the step. Joining points works when you already know the function has no surprises between them, and that knowledge comes from the function, not from the points.
Controls
- The handles for x and c move with the arrow keys, 0.1 at a time (0.01 with Shift). The horizontal line can be dragged anywhere along its length. Where the things you can drag overlap, drag sideways to change x or up and down to change c.