If a function has a constant rate of change, it is linear. Graphically, a linear function is a straight line.
The slope of a line passing through the points (x1,y1) and (x2,y2) is the ratio of the vertical change (Δy) to the horizontal change (Δx) between the points. The variable m is most commonly used to represent slope.
m=ΔxΔy
The words rise and run are sometimes used to describe the slope of a line, especially when the line is given graphically. Rise corresponds to Δy and run corresponds to Δx.
This gives the following definition for the slope of a line.
m=ΔxΔy=runrise
The slope of a line can be found algebraically using the following rule.
m=x2−x1y2−y1
One way to express linear function rules is called slope-intercept form.
y=mx+b
Sometimes, f(x)=mx+b is used. In either case, m and b describe the general characteristics of the line. m indicates the slope, and b indicates the y-intercept. The linear function graphed below can be expressed as f(x)=2x+1, because it has a slope of 2 and a y-intercept at (0,1).
Write the equation of the line that passes through the points (3,1) and (5,5).
To write the equation of the graph of a line in slope-intercept form, y=mx+b,
the y-intercept, b, and the slope of the line, m, must be found. The following method can be used. As an example, consider the line shown.
The y-intercept is the point where the graph intersects the y-axis. From the diagram, it can be seen that the y-intercept is (0,-4).
The y-coordinate of the y-intercept can be substituted into y=mx+b for b. Here, substituting b=-4 gives y=mx−4.
Next, the slope of the line must be determined. From a graph, the slope of a line can be expressed as m=runrise, where rise gives the vertical distance between two points, and run gives the horizontal distance. To find the slope, use any two points. Here, use the already marked y-intercept and the arbitratily chosen (2,2).
From the lines drawn, it can be seen that the rise=6 and the run=2. Therefore, the slope is m=26=3.
The complete equation of the line can now be written by substituting the value of m into the equation from Step 2. Here, substitute m=3. y=3x−4.