freeCodeCamp/guide/english/mathematics/the-slope-of-a-straight-line/index.md

20 lines
1.3 KiB
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: The Slope of a Straight Line
---
## The Slope of a Straight Line
- The slope of a line is a number that describes both the direction and the steepness of the line. Usually, the slope of the line is denoted by m. <br />
- A zero value of a slope(m = 0) in a line indiciates that the given line is horizontal. <br />
- A line with undefined value of slope indicates that the given line is vertical. <br />
- A line with positive value of slope(m > 0) indicates that the given line is going up from left to right.<br />
- A line with negative value of slope(m < 0) indicates that the given line is going down from right to left.<br />
### Calculating the slope of a line when two co-ordinates of the points on the line are given
In this case, Suppose a line l has two points with co-ordinates (x<sub>1</sub>,y<sub>1</sub>) and (x<sub>2</sub>,y<sub>2</sub>) then the slope of a line is calculated as:
<img src="https://latex.codecogs.com/gif.latex?m&space;=&space;\frac{y_{2}&space;-&space;y_{1}}{x_{2}&space;-&space;x_{1}}" title="m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}" />
### Calculating the slope of a line from the equation of line
Convert the given equation from given form into the form of <img src="https://latex.codecogs.com/gif.latex?y&space;=&space;mx&space;&plus;&space;c" title="y = mx + c" /> <br />
where m is the slope
and c is the y-intercept.