How do I calculate the slope of a line on a graph?

1 answer

To calculate the slope of a line on a graph, you can use the formula for the slope, which is:

\[ \text{slope} (m) = \frac{\text{change in } y}{\text{change in } x} = \frac{y_2 - y_1}{x_2 - x_1} \]

Here's how to do it:

  1. Identify two points on the line: Choose two points that the line passes through. These points can be expressed as \((x_1, y_1)\) and \((x_2, y_2)\).

  2. Substitute the coordinates into the slope formula:

    • Use the coordinates of the two points in the formula above.
    • \(x_1\) and \(y_1\) are the coordinates of the first point, and \(x_2\) and \(y_2\) are the coordinates of the second point.
  3. Calculate the change in \(y\) and \(x\):

    • Find the difference in the \(y\)-coordinates: \(y_2 - y_1\).
    • Find the difference in the \(x\)-coordinates: \(x_2 - x_1\).
  4. Divide the change in \(y\) by the change in \(x\) to get the slope.

Example:

Suppose you have two points on a line: \(A(2, 3)\) and \(B(5, 7)\).

  • Point A: \((x_1, y_1) = (2, 3)\)
  • Point B: \((x_2, y_2) = (5, 7)\)

Now, plug these values into the formula:

\[ m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{7 - 3}{5 - 2} = \frac{4}{3} \]

So, the slope of the line is \(\frac{4}{3}\).

Key Points:

  • A positive slope means the line rises as it moves from left to right.
  • A negative slope means the line falls as it moves from left to right.
  • A slope of zero indicates a horizontal line, while an undefined slope (when \(x_2 = x_1\)) indicates a vertical line.