The equation \( y = mx + c \) is the general form of the equation of a straight line, where:
In this guide, we will discuss how to use the equation to find the equation of a straight line and how to calculate the gradient when given two points on the line.
The equation \( y = mx + c \) describes a straight line. The gradient \( m \) is calculated by determining how much \( y \) changes for a given change in \( x \), and \( c \) represents the value of \( y \) when \( x = 0 \), i.e., where the line crosses the y-axis.
If you are given two points on the line, \( (x_1, y_1) \) and \( (x_2, y_2) \), the gradient can be calculated using the formula:
\[ m = \frac{y_2 – y_1}{x_2 – x_1} \]
This formula calculates the “rise over run” or the change in \( y \) divided by the change in \( x \), i.e., the vertical change divided by the horizontal change between the two points.
Once the gradient \( m \) is known, you can substitute it into the equation \( y = mx + c \). To find \( c \), you can substitute the coordinates of one of the points into the equation and solve for \( c \). The general steps are:
Let’s find the equation of a line that passes through the points \( (1, 2) \) and \( (3, 6) \).
Using the formula for the gradient, \[ m = \frac{y_2 – y_1}{x_2 – x_1} = \frac{6 – 2}{3 – 1} = \frac{4}{2} = 2 \]
The equation becomes: \[ y = 2x + c \]
Now, substitute one of the points into the equation. Let’s use \( (x_1, y_1) = (1, 2) \): \[ 2 = 2(1) + c \] \[ 2 = 2 + c \] \[ c = 0 \]
Now that we know \( m = 2 \) and \( c = 0 \), the equation of the line is: \[ y = 2x \]
To verify, we can substitute the second point \( (3, 6) \) into the equation \( y = 2x \): \[ y = 2(3) = 6 \] This is correct, so the equation of the line is \( y = 2x \).
Ultimate members get access to four additional questions with full video explanations.