# Linear Functions

## Definition and Properties of the Linear Functions

Linear functions are some of the most basic functions in mathematics yet extremely important to understand because they are widely applied in electrocnics, physics, economics, chemistry, ...Also several concepts in the theory of functions and related topics depends strongly on the concept of linear functions.
A linear function has the form
$f(x) = a x + b$ where $f$ is the name of the function, $x$ the variable and $a$ and b $b$ are constants such that $a \ne 0$.
The linear function as defined above gives an output for any value of the variable $x$ in the set of real numbers. Therefore the domain of any linear function is the set of all real numbers unless it is defined otherwise.
The graphs of a linear function is a line with y intercept at the point $(0 , b)$ and slope $a$. If we take any two points $P_1$ and $P_2$ on the graph of the linear function $f$, the slope $a$ is given by:
$a = \dfrac{Rise}{Run} = \dfrac{y_2 - y_1}{x_2 - x_1}$ If $a \gt 0$, the line rises from left to right and we say that $f$ is an increasing function as $x$ increases.
If $a \lt 0$, the line falls from left to right and we say that $f$ is a decreasing function as $x$ increases.
The range of a linear function with $a \ne 0$ is the set of all real numbers.
The domain and range of a linear function are writtes in interval forms as follows:
Domain: $(-\infty , + \infty )$
Range: $(-\infty , + \infty )$ Example 1 Graph Linear Functions
a) Graph the linear functions given by $f(x) = x + 3$ and $g(x) = 0.5 x + 3$ on the same system of coordinates.
b) Which of the two functions increases faster?

Solution to Example 1
a)
The graph of a linear function is a line and two points only are needed to graph it.
Let us find the values of the functions at $x = 0$ and $x = 2$ because we need two points only to graph a linear function.

 $x$ $0$ $2$ $y = f(x) = x + 3$ $(0)+ 3 = 3$ $(2) + 3 = 5$

 $x$ $0$ $2$ $y = g(x) = 0.5 x + 3$ $0.5(0) + 3 = 3$ $0.5 (2) + 3 = 4$

Two points for the graph of $f$: $(0 , 3)$ and $(2 , 5)$ to be used to graph function $f$.
Two points for the graph of $g$: $(0 , 3)$ and $(2 , 4)$ to be used to graph function $g$.
The graphs of $f$ and $g$ are shown below. b)
From the graph, we conclude that function $f$ increases faster than function $g$.
In general, given two linear functions $f$ and $g$ with slopes $m_1$ and $m_2$ respectively :
1) If both $m_1$ and $m_2$ are positive and $m_1 \gt m_2$, $f$ increases faster than $g$
2) If both $m_1$ and $m_2$ are negative and $m_1 \lt m_2$, $f$ decreases faster than $g$
3) If $m_1$ and $m_2$ have different signs, the one with positive slope increases and the one with negative slope decreases.
More tutorial on graphing linear functions and similar tutorials on quadratic and rational functions are also included in this website.

Example 2 Find Linear Functions
Find the linear function $f$ such that $f(-1) = 4$ and $f(2) = 1$.

Solution to Example 2
Being a linear function, $f$ is of the form: $f(x) = a x + b$ and we therefore need to find the constants $a$ and $b$.
$f(-1) = 3$ gives the equation: $a(-1) + b = 4$
$f(2) = - 2$ gives the equation: $a(2) + b = 1$
We now solve the system of the two equations above to find $a$ and $b$. Rewrite the system of equations as
$\begin{cases} -a + b = 4 \\ 2 a + b = 1 \end{cases}$
Subtract the first equation from the second to eliminate $b$
$(2a + b) - (-a+b) = 1 - 4$
Simplify to obtain
$3 a = - 3$
$a = - 1$
Substitute $a$ by $- 1$ in equation 1 and solve for $b$.
$(-1)(-1) + b = 4$
$b = 3$
The function is given by
$f(x) = - x + 3$

## Examples of Applications of Linear Functions

1. In electronics, the voltage $V$ across a resistor of resistance $R$ is given by $V = R I$ where $I$ is the current through the resistor.
2. In physics, a resultant force $F$ acting on an object of mass $M$ is given by $F = M a$ where $a$ is the acceleration of the object.
3. In chemistry, to convert degree Celcius $C$ into degree Kelvin $K$, we use the formula $K = C + 273.15$
4. The distance $d$ covevered by an object moving at an average speed $s$ during a period of time $t$ is given by $d = s t$
5. In economics, the total cost $C$ of $x$ units is given by $C = a x + C_0$ where $a$ is the cost per unit and $C_0$ is the fixed cost.
More Linear functions problems with solutions are included in this website.

## Interactive Tutorial to Further Explore Linear Functions

The properties of the graphs of linear functins are explored interactively using an app. The exploration is carried out by changing the parameters $a$ and $b$ included in the linear function $f(x) = a x + b$.
Answers to the questions included in the tutorial are at the bottom of the page.

 a = 1 -10+10 b = 0 -10+10
>

1 - Set parameter $a$ to $1$ and change parameter $b$. How does the y intercept change as $b$ changes? Give a quantitative answer and explain it analytically.
2 - Set parameter $b$ to any value and change parameter $a$. For what values of parameter $a$ is the graph of function f increasing? For what values of the parameter $a$ is the graph of $f$ decreasing? For what value of $a$ if $f$ constant?
3 - The graph of $f$ is a line. Set $a$ to a value and use two points on the graph to find the slope of the line. Compare the value of the slope found to the value of parameter $a$. Do this for several values of $a$. What does $a$ represent?
4 - What is the domain of the linear function $f$?
5 - What is the range of function $f$ when parameter a is not equal to $0$? What is the range of $f$ when parameter $a$ is equal to $0$?

## Answers to the Above Questions

1 - If we set $x = 0$ in $f(x) = a x + b$, we obtain $f(0) = b$. The $y$ intercept of the graph of $f$ is the point with coordinates $(0 , b)$.
2 - If $a$ is positive, $f$ is an increasing function on the interval $(-\infty; , +\infty)$.
If $a$ is negative, $f$ is a decreasing function on the interval $(-\infty; , +\infty)$.
If $a$ is equal to $0$, $f$ is a constant function on the interval $(-\infty; , +\infty)$.
3 - The graph of function $f$ is a line, hence the name linear function. Parameter $a$ represents the slope of this line.
4 - The domain of all linear functions is the set of all real numbers represented by the interval $(-\infty; , +\infty)$.
5 - If $a$ is not equal to $0$, the range of any linear function is the set of all real numbers represented by the interval $(-\infty; , +\infty)$.
If $a$ is equal to $0$, $f(x) = b$ is a constant function and its range is the set $\{b\}$.