The equation \( y = mx + c \) is the general form of the equation of a straight line, where:
- \( m \) is the gradient (or slope) of the line, which represents how steep the line is.
- \( c \) is the y-intercept, which represents the point where the line crosses the y-axis.
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.
1. Understanding the equation \( y = mx + c \):
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.
2. Finding the gradient \( m \) from two points:
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.
3. Finding the equation of the line:
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:
- Find the gradient \( m \) using the formula above.
- Substitute \( m \) into the equation \( y = mx + c \).
- Substitute the coordinates of one point \( (x_1, y_1) \) into the equation to solve for \( c \).
- Write the equation of the line in the form \( y = mx + c \).
4. Example: Finding the equation of a line using two points:
Let’s find the equation of a line that passes through the points \( (1, 2) \) and \( (3, 6) \).
Step 1: Calculate the gradient \( m \):
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 \]
Step 2: Substitute \( m = 2 \) into the equation \( y = mx + c \):
The equation becomes: \[ y = 2x + c \]
Step 3: Solve for \( 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 \]
Step 4: Write the equation of the line:
Now that we know \( m = 2 \) and \( c = 0 \), the equation of the line is: \[ y = 2x \]
5. Check the solution:
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 \).
6. Special cases to note:
- If the two points have the same \( x \)-coordinate, the line is vertical, and the gradient is undefined (because the denominator in the gradient formula is zero).
- If the two points have the same \( y \)-coordinate, the line is horizontal, and the gradient is zero.