What Is the Gradient Definition in Maths?
The gradient of a graph is a number that measures its steepness and direction: it is the rate at which the output ($y$) changes as the input ($x$) changes. In plain terms, the gradient answers "for every step I take sideways, how far do I move up or down?"
Written as a formula, the gradient between two points is the change in $y$ divided by the change in $x$:
$$\text{gradient} = \frac{\text{change in } y}{\text{change in } x} = \frac{\Delta y}{\Delta x}$$
The symbol $\Delta$ (the Greek letter delta) simply means "the change in." So a gradient of $3$ means $y$ increases by $3$ for every $1$ that $x$ increases.
Gradient and slope are two names for the same thing. "Gradient" is the term common in the UK and Commonwealth; "slope" is the American term. Both equal $\dfrac{\Delta y}{\Delta x}$, so the slope of a graph and its gradient are identical. This page is about the concept and definition of a gradient; for how the gradient sits inside the equation $y = mx + c$ and how to read it off a line, see the companion page on the gradient of a line.
Why Is the Gradient Called a Rate of Change?
A gradient is not only a measure of tilt on a picture. On any straight-line graph, the gradient is a real-world rate, and this is the fanout question readers ask most often about the definition.
If the vertical axis is distance and the horizontal axis is time, the gradient is speed: metres gained per second. If the axes are cost and quantity, the gradient is the price per item. The gradient converts "how the graph tilts" into "how fast one quantity responds to another." That is why the same number is called steepness by a hiker and a rate of change by a scientist. The intuitive picture behind it is rise over run: the rise is the response, the run is the driver.
What Is the Gradient Formula?
When you are given two points on a line rather than a ready-made rise and run, the gradient formula does the subtraction for you. For a line through the points $(x_1, y_1)$ and $(x_2, y_2)$, the gradient $m$ is:
$$m = \frac{y_2 - y_1}{x_2 - x_1}$$
The numerator is the change in $y$ (the rise), and the denominator is the change in $x$ (the run), so this is the same $\dfrac{\Delta y}{\Delta x}$ written with named coordinates.
Symbol | Meaning |
|---|---|
$m$ | The gradient (steepness and direction of the line) |
$(x_1, y_1)$ | The coordinates of the first point on the line |
$(x_2, y_2)$ | The coordinates of the second point on the line |
$y_2 - y_1$ | The change in $y$, or rise (vertical change) |
$x_2 - x_1$ | The change in $x$, or run (horizontal change) |
It does not matter which point you call the first, as long as you subtract the coordinates in the same order top and bottom. Swapping both changes the sign of the numerator and denominator together, so the gradient is unchanged.
What Are the Types of Gradient?
Every gradient falls into one of four cases, and the sign or form of the number tells you the shape of the line at a glance.
Type of gradient | Value | What the line does |
|---|---|---|
Positive gradient | $m > 0$ | Rises from left to right (uphill) |
Negative gradient | $m < 0$ | Falls from left to right (downhill) |
Zero gradient | $m = 0$ | Perfectly flat (a horizontal line) |
Undefined gradient | no value | Perfectly upright (a vertical line, run is zero) |
A steeper line has a gradient further from zero in either direction, so a gradient of $5$ is steeper than $2$, and $-5$ is steeper downhill than $-2$. The zero and undefined cases are the two extremes, and the worked examples below cover each of them in turn.
Examples of Gradient
These examples build from reading a gradient off a graph to interpreting it as a rate. Each problem statement is bold; the steps are plain.
Example 1
A line rises $6$ units vertically for every $2$ units it moves horizontally. What is its gradient?
Gradient is the rise divided by the run.
$$\text{gradient} = \frac{\Delta y}{\Delta x} = \frac{6}{2} = 3$$
Final answer: the gradient is $3$.
Example 2
Find the gradient of the line joining the points $(1, 4)$ and $(5, 12)$.
A tempting first move is to divide the run by the rise, writing $x$ over $y$ because $x$ is named first. Let's see where that leads.
Computing $\dfrac{\Delta x}{\Delta y} = \dfrac{5-1}{12-4} = \dfrac{4}{8} = \dfrac{1}{2}$ suggests a gentle slope. But the line climbs $8$ while moving only $4$, so it is steeper than a $45°$ line, and any correct gradient must be greater than $1$. The fraction is upside down.
Gradient puts the change in $y$ on top:
$$\text{gradient} = \frac{\Delta y}{\Delta x} = \frac{12 - 4}{5 - 1} = \frac{8}{4} = 2$$
A gradient of $2$ matches a line that rises faster than it runs, which fixes the flipped version.
Final answer: the gradient is $2$.
Example 3
A line passes through $(2, 7)$ and $(6, -1)$. Find its gradient.
$$\text{gradient} = \frac{-1 - 7}{6 - 2} = \frac{-8}{4} = -2$$
Final answer: the gradient is $-2$. The negative sign means the line falls two units for every one unit to the right.
Example 4
A car travels so that its distance-time graph is a straight line through $(0, 0)$ and $(4, 200)$, with distance in metres and time in seconds. What does the gradient represent, and what is its value?
$$\text{gradient} = \frac{200 - 0}{4 - 0} = \frac{200}{4} = 50$$
Because the vertical axis is distance and the horizontal axis is time, the gradient is a rate of change: metres per second.
Final answer: the gradient is $50$, meaning the car travels at $50$ metres per second. Students often compute the number correctly but forget to state its units, which is what turns a bare gradient into a real speed.
Example 5
What is the gradient of a horizontal line?
A horizontal line has the same $y$-value everywhere, so between any two points the rise is zero.
$$\text{gradient} = \frac{0}{\Delta x} = 0$$
Final answer: the gradient of a horizontal line is $0$. It has direction (flat) but no steepness.
Example 6
What is the gradient of a vertical line?
A vertical line has the same $x$-value everywhere, so the run is zero.
$$\text{gradient} = \frac{\Delta y}{0}$$
Division by zero has no value, so the gradient is undefined.
Final answer: the gradient of a vertical line is undefined, not zero. A flat line and an upright line are opposite extremes.
Where Does the Gradient Idea Come From, and Where Is It Used?
The gradient began as a builder's and surveyor's measurement long before it was written as algebra. Roads, roofs, and railway lines all needed one honest number for "how steep," and rise over run supplied it.
Engineering and safety limits. A wheelchair ramp is capped near a gradient of $1$ in $12$; railways post a maximum gradient so a locomotive can brake and still haul its load uphill. The gradient sets the rule that keeps the structure usable.
Science as a rate. In physics and chemistry, the gradient of a graph reads off a rate directly: speed from a distance-time graph, acceleration from a velocity-time graph, reaction rate from a concentration-time graph. The definition as $\dfrac{\Delta y}{\Delta x}$ is exactly what makes this work.
The bridge to calculus. The gradient of a straight line is constant, but real curves bend. Measuring the gradient of a curve at a single point is the whole starting idea of differential calculus — the gradient of the tangent line at that point.
Reading a gradient as a rate is where the definition earns its keep: it turns a shape on a page into a statement about how one quantity drives another.
What Are Common Mistakes With the Gradient Definition?
These errors appear the moment the graph is not already tidy or the points arrive out of order.
Mistake 1: Flipping the fraction to run over rise
Where it slips in: Putting the change in $x$ on top because $x$ comes first alphabetically or on the axis.
Don't do this: Writing $\dfrac{\Delta x}{\Delta y}$, which is the reciprocal of the gradient.
The correct way: Gradient is rise over run, $\dfrac{\Delta y}{\Delta x}$, with the change in $y$ on top. The second-guesser who is unsure can check against the picture: a steep-looking line must give a gradient bigger than $1$, so an answer of $\frac{1}{2}$ for a steep line signals a flip.
Mistake 2: Confusing a zero gradient with an undefined gradient
Where it slips in: Treating horizontal and vertical lines as if they behaved the same way.
Don't do this: Calling a vertical line's gradient $0$, or a horizontal line's gradient "undefined."
The correct way: A horizontal line has rise $0$, so its gradient is $\dfrac{0}{\Delta x} = 0$. A vertical line has run $0$, so its gradient is $\dfrac{\Delta y}{0}$, which is undefined. The habit that fixes this is naming the numerator and denominator before dividing.
Mistake 3: Reporting a gradient without stating what it means
Where it slips in: Treating the gradient as a bare number on a real graph, ignoring the axes.
Don't do this: Writing "gradient $= 50$" for a distance-time graph and stopping there.
The correct way: On a graph of real quantities, the gradient is a rate with units. Here $50$ is $50$ metres per second, a speed. The memorizer who has learned the formula but not the meaning loses the whole point of the definition.
Conclusion
The gradient definition is the measure of a graph's steepness and direction, equal to the rate of change of $y$ with respect to $x$.
The formula is $\dfrac{\Delta y}{\Delta x}$ — the change in $y$ over the change in $x$ — with the rise on top.
Gradient and slope are the same quantity, one British and one American name.
On real graphs the gradient is a rate with units: speed on a distance-time graph, price per unit on a cost graph.
A horizontal line has gradient $0$; a vertical line has an undefined gradient, which is not the same as zero.
To build the gradient concept with a teacher, explore Bhanzu's geometry tutor, a high school math tutor, or one-to-one math tutoring.
Practise What You Have Learned
Work through these to test your understanding: find the gradient of the line through $(0, 1)$ and $(4, 13)$ (Answer to Question 1: $3$); state what the gradient represents on a velocity-time graph (Answer to Question 2: acceleration); and give the gradient of the line joining $(3, 5)$ and $(3, 9)$ (Answer to Question 3: undefined, because the run is $0$). To see the gradient change as you tilt a graph live, book a free demo class.
Read More
Finding Slope From Two Points - the step-by-step method behind the gradient formula.
Slope Intercept Form - how the gradient becomes the m in y = mx + c.
Negative Slope - what a falling gradient looks like on a graph.
Zero Slope - the horizontal line whose gradient is exactly 0.
Was this article helpful?
Your feedback helps us write better content
