1.2: Lines
( \newcommand{\kernel}{\mathrm{null}\,}\)
If we have two points A(x1,y1) and B(x2,y2), then we can draw one and only one line through both points. By the slope of this line we mean the ratio of Δy to Δx. The slope is often denoted m: m=Δy/Δx=(y2−y1)/(x2−x1). For example, the line joining the points (1,−2) and (3,5) has slope (5+2)/(3−1)=7/2.
The most familiar form of the equation of a straight line is: y=mx+b. Here m is the slope of the line: if you increase x by 1, the equation tells you that you have to increase y by m. If you increase x by Δx, then y increases by Δy=mΔx. The number b is called the y-intercept, because it is where the line crosses the y-axis. If you know two points on a line, the formula m=(y2−y1)/(x2−x1) gives you the slope. Once you know a point and the slope, then the y-intercept can be found by substituting the coordinates of either point in the equation: y1=mx1+b, i.e., b=y1−mx1. Alternatively, one can use the "point-slope'' form of the equation of a straight line: start with (y−y1)/(x−x1)=m and then multiply to get (y−y1)=m(x−x1), the point-slope form. Of course, this may be further manipulated to get y=mx−mx1+y1, which is essentially the "mx+b'' form.

If m=0, then the line is horizontal: its equation is simply y=b.
There is one type of line that cannot be written in the form y=mx+b, namely, vertical lines. A vertical line has an equation of the form x=a. Sometimes one says that a vertical line has an "infinite'' slope.
Sometimes it is useful to find the x-intercept of a line y=mx+b. This is the x-value when y=0. Setting mx+b equal to 0 and solving for x gives: x=−b/m. For example, the line y=2x−3 through the points A(2,1) and B(3,3) has x-intercept 3/2.
Contributors
Integrated by Justin Marshall.