menu icon shown in narrow screens to bring the side navigation and scores panel into view

Tutorial: Linear functions and models

⊠
This tutorial: Part A: Slope and intercept
Go to Part B: Finding the equation of a line
Go to Part C: Applications: Linear models

(This topic is also in Section 1.3 in Applied Calculus or Section 1.3 in Finite Mathematics and Applied Calculus)

Note In this tutorial, we talk only about real valued linear functions of a single variable. So, when we talk about "linear functions" here, we really mean "real valued linear functions of a single variable." (To see what a general real valued function of a single variable looks like, see the %%functionstut. To see what a linear function of more than one variable looks like, go to the %%sevvarstut.)
What is a linear function?

Briefly, a linear function is one whose graph is a straight line (hence the term "linear").

%%Q #[How do we recognize a linear function when we see one?][¿Cómo reconocemos una función lineal cuando la vemos?]#
%%A #[As follows][Como sigue]#: A linear real valued function of a single variable assigns

Linear function

#[A linear function is a function that can be written in the form][Una función lineal es una función que se puede escribir en la forma]#
$f(x) = mx + b$ \t \gap[20] #[Function form][Forma función]# \t \gap[20] #[Example][Ejemplo]#: $f(x) = 2x-1 \ \ $$(m=2, b=1)$ \\ $y = mx + b$ \t \gap[20] #[Equation form][Forma ecuación]# \t \gap[20] #[Example][Ejemplo]#: $y = 2x-1$
#[where $m$ and $b$ are fixed numbers (the names $m$ and $b$ are traditional). The graph of a linear function is a straight line: the term $mx$ in the formula for $y$ tells us that changing $x$ by any amount changes $y$ by $m$ times that amount (see the example below).][donde $m$ y $b$ son números fijos (los nombres $m$ y $b$ son tradicionales). La gráfica de una función lineal es una línea recta: el término $mx$ en la fórmula para $y$ nos dice que cambiar $x$ en cualquier cantidad cambia $y$ en $m$ veces esa cantidad (consulte el ejemplo a continuación).]#
Example

#[Plotting a couple of points of the equation $y = 2x - 1$ gives us the following result:][Trazando un par de puntos de la ecuación $y = 2x - 1$ nos da el siguiente resultados:]#
Your turn

#[Meaning of m and b numerically and graphically][Significado de m y b numérica y gráficamente]#

Notice two things about the table of values for $f(x) = 2x-1$ and its graph in the example above:
  1. In the table of values, the value of $f$ at $x = 0$ is $b = -1$; that is, $f(0) = b = -1.$ In the graph, the number $b$ is where the graph crosses the $y$-axis, thereby giving us a point on the graph: $(0,b).$ For this reason we call $b$ the $y$-intercept of the line.
  2. In both the table of values and the graph, as you go from left to right, the values of $y$ increase by $m = 2$ for every 1-unit increase in $x;$ in other words, changing $x$ by any amount results in $y$ changing by $m = 2$ times that amount. Graphically, this tells us how steep the graph is: for this reason, we refer to $m$ as the slope of the line
#[From these observations we infer the following general facts:][De estas observaciones inferimos los siguientes hechos generales:]#,

#[Meaning of b:][Significado de b:]#
  • Numerically, b is the the value of the function at 0.
    For instance, here again is the table for $y=2x-1.$ When $x = 0, y = b = -1$ as shown:
  • Graphically, b is the the y-intercept.
    For instance, here again is the graph of $y=2x-1$ highlighting the $y$-intercept at $-1$:
#[Meaning of m:][Significado de m:]#
  • Numerically, f(x) increases by m units per one-unit increase in x.
    For instance, if you scan along the $y$ row in the table of values, you will notice that they increase by $m=2$ for each change of $x$ by one unit as you go from left to right:
  • Graphically, you move vertically by m units for every one unit you move horizonally to the right.
    For instance, we can see this behavior in the graph of $y=2x-1,$ which has $m=2:$

%%Note These observations suggest and alternative way to draw the graph of $y = mx + b:$
Graphing linear functions the easy way

#[To quickly graph any linear function, first express it in the form $f(x) = mx + b$ and, if possible, write $m$ as a fraction. Then plot two points:][Para graficar rápidamente cualquier función lineal, primero exprésala en la forma $f(x) = mx + b$ y, si es posible, escribe $m$ como una fracción. Luego traza dos puntos:]#
  • For the first point, take any convenient point on the line; for instance, the $y$-intercept $b$ on the $y$-axis.: $f(0) = b$
  • Then, with the slope written as a ratio $\pm p/q$, move $q$ units to the right and $p$ units up (or down if $m$ is negtive) to get a second point. Connecting them gives the desired line.
Example
#[Positive slope][Pendiente positiva]#
$\qquad f(x) = 2x-1$
 
\t
 ;
\t
#[Negative slope][Pendiente negativa]#
$f(x) = -\dfrac{2x}{3}+1$
Your turn

The slope: How y changes with x as we move along a line
In the example $f(x) = 2x-1$ at the the beginning of this tutorial, we noted that as we move along the graph, $y$ changed by $m = 2$ units for ever $1$-unit change in $x$, which was why we referred to $m = 2$ as the slope of the line. Let's make these notions a little more formal:
The change in a quantity: Delta notation

#[If a quantity $q$ changes from $q_1$ to $q_2,$ we refer the the difference, $q_2-q_1,$ as the change in $q$, written as $\Delta q$ ("Delta $q$").][Si una cantidad $q$ cambia de $q_1$ a $q_2,$ nos referimos a la diferencia, $q_2-q_1,$ como el cambio en $q$, escrito como $\Delta q$ ("Delta $q$").]#
$\Delta q = q_2-q_1$ = $\Delta q$ #[equals second value minus first value][es igual al segundo valor menos el primer valor]#.
#[Examples][Ejemplos]#
  1. #[If $y$ changes from $3$ to $1$, then][Si $y$ cambia de $3$ a $1$, entoncess]#
    $\Delta y = y_2-y_1 = 1-3 = -2$. \gap[40] \t #[The negative change indicates that $y$ has decreased.][El valor negativo indica que $y$ ha disminuido.]#
  2. #[If the temperature $T$ at 5 in the afternoon is identical, at 10°, to what it was at 5 in the morning, then][Si la temperatura $T$ a las 5 de la tarde es idéntica, a 10°, a la que era a las 5 de la mañana, entonces]#
    $\Delta T = T_2-T_1 = 10-10=0$.
    #[The zero change does not mean that the temperature has remained constant throughout the day; just that it ended up at the original value it had at 5AM. For this reason, saying that it is "unchanged" may be ambiguous.][El cambio de cero no significa que la temperatura se haya mantenido constante durante todo el día; solo que terminó en el valor original que tenía a las 5 a.m. Por esta razón, decir que "no ha cambiado" puede resultar ambiguo.]#
  3. #[If $(x,y)$ changes from $(4,-1)$ to $(6,-4)$, then][Si $(x,y)$ cambia de $(4,-1)$ a $(6,-4)$, entoncess]#
    $\Delta x = x_2-x_1 = 6-4 = 2$. \gap[40] \t #[$x$ has increased by 2.][$x$ ha aumentado por 2.]# \\ $\Delta y = y_2-y_1 = -4-(-1) = -3$. \gap[40] \t #[$y$ has decreased by 3.][$y$ ha disminuido por 3.]#
#[Slope as a quotient of changes: Calculating the slope][Pendiente como cociente de cambios: Calcular la pendiente]#

Referring again to our example $f(x) = 2x-1$, we can now say that, as we move along it graph, $y$ changes by $\Delta y = m = 2$ units for ever $1$-unit change $\Delta x$ in $x$. In other words, the ratio $\dfrac{\Delta y}{\Delta x}$ is always the same, and equal to $m = 2$ in our example.
$\color{darkred}{\dfrac{\Delta y}{\Delta x} = \dfrac{6}{3} = 2}$
$\color{darkgreen}{\dfrac{\Delta y}{\Delta x} = \dfrac{4}{2} = 2}$
$\color{blue}{\dfrac{\Delta y}{\Delta x} = \dfrac{2}{1} = 2}$

#[In general][En general,]#
#[Slope of a line][Pendiente de una recta]# $m = \dfrac{\Delta y}{\Delta x} = \dfrac{y_2-y_1}{x_2-x_1}$.
From the formula we see that the slope is positive when $\Delta x$ and $\Delta y$ have the same sign, and negative when they have opposite signs. The quotient $\Delta x/\Delta y$ defining the slope, being a quotient of two differences, is often called a difference quotient.
#[Examples][Ejemplos]#

1. The line passing through $(-3,1)$ and $(5,2)$ has slope
$m = \dfrac{y_2-y_1}{x_2-x_1}$ \t ${}=\dfrac{2-1}{5-(-3)} = \dfrac{1}{8}.$

2. Below are two lines; one with a positive slope ($\Delta x$ and $\Delta y$ have the same sign) and one with a negative slope ($\Delta x$ and $\Delta y$ have opposite sign):
$(x_1,y_1)=(1,1)$, $(x_2,y_2)=(5,7)$
 
$m = \dfrac{\Delta y}{\Delta x} = \dfrac{7-1}{5-1} = \dfrac{6}{4}= \dfrac{3}{2}$
\t   \t
$(x_1,y_1)=(1,7)$, $(x_2,y_2)=(5,1)$
 
$m = \dfrac{\Delta y}{\Delta x} = \dfrac{1-7}{5-1} = \dfrac{-6}{4}= -\dfrac{3}{2}$
#[$\Delta y$ is sometimes referred to as the "rise" (the amount the line goes up from left to right) and $\Delta x$ is referred to as the "run." In both graphs, the run is $\Delta x=4,$ but the rise $\Delta y$ is negative in the second graph. Notice also that switching the numbering of the two points results in the same quotient in either calculation (as both the numerator and denominator would change sign).][$\Delta y$ a veces se denomina "subida" (la cantidad que la línea sube de izquierda a derecha) y $\Delta x$ se denomina "corrida". En ambas gráficas, la corrida es $\Delta x = 4,$ pero la subida $\Delta y$ es negativa en la segunda gr´fica. Observa también que intercambiar la numeración de los dos puntos da como resultado el mismo cociente en cualquier cálculo (ya que tanto el numerador como el denominador cambiarían de signo).]#

#[Some for you][Algunos para ti]#
Getting familiar with some slopes

Now try some of the exercises in Section 1.3 in Applied Calculus or Section 1.3 in Finite Mathematics and Applied Calculus. or move ahead to the Part B of this tutorial by pressing "Next tutorial" on the sidebar.
Last Updated: March 2024
Copyright © 2019
Stefan Waner and Steven R. Costenoble

 

 

← Previous    Next →
Game version
All tutorials
Main page
Everything for calc
Everything for finite math
Everything
Español
Hide panel