Colorful House of Math logo
Log in

Linear Functions

A linear function is an expression that when graphed, results in a straight line. The name is slightly revealing—when something is “linear”, it means it progresses in a straight line. Here, you will learn how to recognize, and draw graphs of, linear functions.


Linear Function

A linear function can be written in the form

f(x) = ax + b

where a is the slope, and b is the y-intercept, the place the graph intersects with the y-axis (and where x = 0).

Finding the Slope and the Constant Term

You can find the slope of a line if you have the coordinates of two points on that line. Call the points (x1,y1) and (x2,y2). You use the following formulas for the slope a and the constant term b:


The Slope of a Linear Function

The straight line that goes through the points (x1,y1) and (x2,y2) has the slope

a = y2 y1 x2 x1

and the constant term

b = y1 ax1

A straight line with slope a=-1 and y-intercept at (0,1)


Important Attributes of the Linear Function

  • The slope a tells you how much y increases or decreases by as x increases by 1.

  • If a > 0, the graph rises towards the right, meaning y is increasing as x increases. If a < 0, the graph sinks towards the right, meaning y is decreasing as x increases.

  • The graph intersects the y-axis at the point b, which is why it is known as the y-intercept.

  • The graph is a straight line that with coordinates (x,y) = (x,f(x)).

Example 1

Find the slope of the straight line that passes through the points (5, 2) and (3, 6), and find the y-intercept.

You set (x1,y1) equal to (3, 6) and (x2,y2) equal to (5, 2). (The calculations would still work even if you switched the points.) You get:

a = y2 y1 x2 x1 = 2 6 5 3 = 4 2 = 2

You now know that y decreases by 2 when x increases by 1. In other words, the graph slopes downward by 2 when it moves 1 to the right.

Let’s see what the y-intercept is: b = y1 ax1 = 6 (2) × 3 = 6 + 6 = 12

Thus, the point y-intercept is (0, 12).

Want to know more?Sign UpIt's free!
White arrow pointing to the LeftPrevious entry
Activities 1
Next entryWhite arrow pointing to the right
Activities 2