EconGraphs Logo BETA
Note: This work is under development and has not yet been professionally edited.
If you catch a typo or error, or just have a suggestion, please submit a note here. Thanks!
Chapter 2 / Wednesday, September 25 | Math Review

2.4 A Special Case: Linear Functions


A special case of a univariate function is a line.

The most familiar equation of a line is the one from elementary algebra: \(y = mx + b\) This is the “slope-intercept” form: it’s a line with a slope of $m$ and a y-intercept of $b$. Let’s define those terms carefully.

The $y$-intercept is the height of the line when $x = 0$; visually, this is the point along the vertical ($y$) axis where the line crosses the axis.

The slope is a measure of the steepness of the line, indicating how $y$ changes per unit change in $x$. One way of thinking about this is that every time $x$ increases by 1, $y$ increases by $m$. Put another way, between any two points $A = (x_A, y_A)$ and $B = (x_B, y_B)$, the slope will be the “rise” (change in the $y$ coordinate, or $\Delta y$) divided by the “run” (change in the $x$ coordinate ,or $\Delta x$): \(\text{slope} = \frac{\text{rise}}{\text{run}} = \frac{\Delta y}{\Delta x} = \frac{y_B - y_A}{x_B - x_A}\) The interactive graph below illustrates these features of the line. Try playing with it and seeing how the graph changes when $m$ and $b$ change:

[ See interactive graph online at https://www.econgraphs.org/graphs/math/comparative_statics/point_slope ]

One way of thinking of the point-slope formula is that $y$ is a function of $x$: \(y = f(x) = mx + b\) We could also define a line, of course in which $x$ is a function of $y$: \(x = g(y) = my + b\) In this case, $b$ is the $x$ intercept (the point at which the line intersects the $x$ axis), and $m$ is the inverse slope, defined as the “run” over the “rise” (that is, $\Delta x / \Delta y$) rather than the “rise” over the “run” ($\Delta y / \Delta x$):

[ See interactive graph online at https://www.econgraphs.org/graphs/math/comparative_statics/inverse_point_slope ]

In fact, many of the graphs you’ll see in economics have this format, because the convention in a supply and demand diagram is to show the quantity on the horizontal axis, and the price on the vertical axis. In this graphs, though, the quantity be a function of the price, meaning that the independent variable is on the vertical axis!

Implicit differentiation

Yet another way we could write the equation of a line is \(ax + by = c\) It’s easy to see that we can solve for either $x$ or $y$ to get to the forms we saw above: \(\begin{aligned} ax + by &= c & ax + by &= c\\ by &= c - ax & ax &= c - by\\ y(x) &= {c \over b} - {a \over b}x & x(y) &= {c \over a} - {b \over a}y \end{aligned}\) We could take the derivative of either one of these, and find the slope or the inverse slope of the line: \(y^\prime(x) = {dy \over dx} = -{a \over b}\) \(x^\prime(y) = {dx \over dy} = -{b \over a}\) There is a slightly more elegant way to do it, though; which we’ll see more in a week or so. It’s called implicit differentiation.

Let’s assert that the equation \(ax + by = c\) implicitly defines a function $y(x)$. In this case we can rewrite the function as \(ax + by(x) = c\) If we take the derivative of both sides with respect to $x$, we get \(a + b \times y^\prime(x) = 0\) since the derivative of $ax$ with respect to $x$ is just $a$; the derivative of $by(x)$ with respect to $x$ is $by^\prime(x)$; and the derivative of $c$ with respect to $x$ is 0. We can then solve for $y^\prime(x)$: \(\begin{aligned} a + b \times y^\prime(x) &= 0\\ b \times y^\prime(x) &= -a\\ y^\prime(x) &= -{a \over b} \end{aligned}\) which is just what we had when we did this before!

This will get a bit more complicated when we look at non-linear functions, but the theory will still hold. It’s a good idea to review implicit differentiation, if you haven’t seen it in a while.

Previous: The Chain Rule
Next: Sketching a Function: Critical Points, Asymptotes, and Curvature
Copyright (c) Christopher Makler / econgraphs.org