freeCodeCamp/guide/english/mathematics/finding-slope-from-graph/index.md

22 lines
1.7 KiB
Markdown

---
title: Finding Slope from Graph
---
## Finding Slope from Graph
Let us consider the graph for `2x+3`
![Image showing graph of 2x+3](https://graphsketch.com/render.php?eqn1_color=1&eqn1_eqn=2x%2B3&eqn2_color=2&eqn2_eqn=&eqn3_color=3&eqn3_eqn=&eqn4_color=4&eqn4_eqn=&eqn5_color=5&eqn5_eqn=&eqn6_color=6&eqn6_eqn=&x_min=-17&x_max=17&y_min=-10.5&y_max=10.5&x_tick=1&y_tick=1&x_label_freq=5&y_label_freq=5&do_grid=0&do_grid=1&bold_labeled_lines=0&bold_labeled_lines=1&line_width=4&image_w=850&image_h=525)
To find the slope we need to take two points on the `x` axis and their perpendicular points on `y` axis then subtract two points of `x` axis to find change in `x` and two points on `y` to find change in `y`
To find the slope use the formula slope = <a href="https://www.codecogs.com/eqnedit.php?latex=\frac{\Delta&space;y}{\Delta&space;x}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{\Delta&space;y}{\Delta&space;x}" title="\frac{\Delta x}{\Delta y}" alt="delta x/delta y" /></a>
where <a href="https://www.codecogs.com/eqnedit.php?latex=\Delta&space;x" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\Delta&space;x" title="\Delta x" alt="delta x" /></a> = change in `x`
and <a href="https://www.codecogs.com/eqnedit.php?latex=\Delta&space;y" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\Delta&space;y" title="\Delta y" alt="delta y"/></a> = change in `y`
If we take `x1=2`, `x2=0` and `y1=7` and `y2=3` slope = <a href="https://www.codecogs.com/eqnedit.php?latex=\frac{7-3}{2-0}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{7-3}{2-0}" title="\frac{7-3}{2-0}" alt="(7-3)/(2-0)"/></a> = `2`