# Linear Functions

A linear function is an expression that gives you a straight line. The name is slightly revealing. Here, you will learn how to draw and recognize linear functions.

Theory

### LinearFunction

A linear function can be written on the form

 $f\left(x\right)=ax+b,$

where $a$ is the slope, and $b$ is the intersection with the $y$-axis.

## Finding the Slope and the Constant Term

You can find the slope of a line if you have the coordinates of two points on the 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 the graph is increasing/decreasing when $x$ increases by 1.

• If $a>0$, the graph rises towards the right, and if $a<0$, the graph is sinking towards the right.

• The graph intersects the $y$-axis in the point $b$.

• The graph is a straight line with coordinates $\left(x,y\right)=\left(x,f\left(x\right)\right)$.

Example 1

Find the slope of the straight line that goes through the points $\left(5,2\right)$ and $\left(3,6\right)$, and find where it intersects with the $y$-axis

You choose $\left({x}_{1},{y}_{1}\right)$ to be $\left(3,6\right)$ and $\left({x}_{2},{y}_{2}\right)=\left(5,2\right)$. The calculations would 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 the line decreases by 2 when you move one place to the right. Let’s see what the point of intersection with the $y$-axis 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 of intersection with the $y$-axis is $\left(0,12\right)$.