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

1.3 KiB

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.
  • A zero value of a slope(m = 0) in a line indiciates that the given line is horizontal.
  • A line with undefined value of slope indicates that the given line is vertical.
  • A line with positive value of slope(m > 0) indicates that the given line is going up from left to right.
  • A line with negative value of slope(m < 0) indicates that the given line is going down from right to left.

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 (x1,y1) and (x2,y2) then the slope of a line is calculated as:

Calculating the slope of a line from the equation of line

Convert the given equation from given form into the form of
where m is the slope and c is the y-intercept.