# 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.

Theory

### LinearFunction

A linear function can be written in the form

 $f\left(x\right)=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 $\left({x}_{1},{y}_{1}\right)$ and $\left({x}_{2},{y}_{2}\right)$. You use the following formulas for the slope $a$ and the constant term $b$:

Rule

### TheSlopeofaLinearFunction

The straight line that goes through the points $\left({x}_{1},{y}_{1}\right)$ and $\left({x}_{2},{y}_{2}\right)$ has the slope

 $a=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$

and the constant term

 $b={y}_{1}-a{x}_{1}$

Rule

### ImportantAttributesoftheLinearFunction

• 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 $\left(x,y\right)=\left(x,f\left(x\right)\right)$.

Example 1

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

You set $\left({x}_{1},{y}_{1}\right)$ equal to $\left(3,6\right)$ and $\left({x}_{2},{y}_{2}\right)$ equal to $\left(5,2\right)$. (The calculations would still work even if you switched the points.) You get:

 $a=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}=\frac{2-6}{5-3}=\frac{-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: $\begin{array}{llll}\hfill b& ={y}_{1}-a{x}_{1}\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =6-\left(-2\right)×3\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =6+6\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =12\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$

Thus, the point $y$-intercept is $\left(0,12\right)$.