A graph turns a table of numbers into a picture. One glance shows whether a quantity grows or shrinks, steadily or not, and where something special happens. Physics uses graphs all the time, and the simplest one, the straight line, is the most important. This lesson is about reading graphs and about the one number that describes a straight line: its slope.
Reading a graph#
A graph has two axes. The horizontal axis usually shows the quantity you choose or control, such as time; the vertical axis shows the quantity that depends on it, such as position. Each point on the graph is a pair of values : go along and up. The axes cross at the origin, the point .
In physics, each axis is labelled with a quantity and its unit, as in "time (s)" and "position (m)". A graph with unlabelled axes cannot be read.
The straight line#
A straight line is the graph of an equation of the form
In words
y equals m x plus c
The two constants each have a job:
- is the intercept: the value of where the line crosses the -axis, at . Changing slides the line up or down without tilting it.
- is the slope, also called the gradient. It sets how steep the line is. If is positive the line rises from left to right; if it is negative the line falls; if the line is horizontal.
Try the sliders: they change and and redraw the line from its equation. (Some books and the simulation below write the intercept as , as in ; it is the same thing.)
The slope as rise over run#
To find the slope from two points and on the line, divide the change in (the rise) by the change in (the run):
In words
m equals the quantity y two minus y one, all over the quantity x two minus x one
It does not matter which point you call 1 and which 2, as long as you use the same order on top and below. For a straight line it does not matter which two points you pick either: the slope is the same everywhere along it. That is exactly what makes a line straight.
Two special cases: a horizontal line has rise 0, so slope 0. A vertical line has run 0, and dividing by zero is not allowed, so its slope is undefined.
The equation of a line through two points
A straight line passes through and . Find its equation.
Slope
.
Intercept
Put the slope and one point into : , so . The line is .
Check
The other point must fit as well: . It does.
A slope has units#
In maths, and are bare numbers. In physics, each axis carries a unit, and so does the slope: its unit is the unit of the vertical axis divided by the unit of the horizontal axis. That turns a slope into a physical quantity, a rate: how fast one quantity changes as the other increases.
A cyclist's speed from a graph
A cyclist rides along a straight road. At time 0 s she is 20 m from a lamp post; at 10 s she is 80 m from it, and the position–time graph between these moments is a straight line. What is her speed?
Rise and run
The rise is m, the run is s.
Slope with units
Slope m/s. Metres divided by seconds: the slope of a position–time graph is a speed.
The equation of the line
The intercept is the position at time 0, 20 m, so position . At 5.0 s this gives m, halfway between, as a straight line should.
Measured points and the line of best fit#
Real measurements never lie exactly on a line: each has a small error. When the points lie roughly along a straight line, draw the line of best fit: one straight line that passes as close as possible to all the points, with about as many points above it as below. Do not join the dots one by one.
To find its slope, pick two points on the line you drew, not two of the measured points, and take them far apart. Over a long run, the small error in reading each point off the graph matters much less than over a short run.
When the graph is not straight#
A steady speed gives a straight position–time graph. If the speed changed, the graph would curve, and its steepness would differ from place to place. Measuring the steepness of a curve is where calculus begins.
Direct proportion#
Two quantities are directly proportional when one is a fixed number times the other:
In words
y equals k x
The constant is the constant of proportionality. Doubling doubles , and halving halves . The graph is a straight line through the origin: it is with and slope .
Be careful with the words: every proportional relation is linear, but not every linear relation is proportional. The cyclist's position is linear in time but not proportional to it, because the line starts at 20 m, not at 0.
A quick test for proportion with measured data: divide each by its . If the ratio is the same every time, the quantities are proportional and the ratio is . For example, the mass of water is proportional to its volume. With the density from lesson 0.2, 1.0 × 10³ kg/m³, every litre (L, m³) has a mass of 1.0 kg, so 2.5 L of water has a mass of 2.5 kg.
Try it#
In the simulation you can drag a line, read off its slope and intercept, and find the equation of a line through two points.
Summary#
- Label each axis with a quantity and its unit; each point is a pair .
- A straight line is : is the slope and the intercept on the -axis.
- Slope = rise over run, ; horizontal lines have slope 0, vertical lines an undefined slope.
- In physics a slope has units and is a rate; the slope of a position–time graph is a speed.
- Direct proportion, , is a straight line through the origin.