Slope · Equations of lines · Linear functions · Cost, revenue & profit · Supply, demand & equilibrium
Calculus is, at its core, the study of change. Before we can measure how a curving quantity changes, we master the simplest case: quantities that change at a constant rate. These are modeled by linear functions, and the single number that captures their rate of change, the slope, is the direct ancestor of the derivative. Everything in this course grows out of this one idea.
Section 1.1
Slopes and Equations of Lines
Slope of a Line
The slope measures steepness: how much the output rises (or falls) for each unit of horizontal movement. It is the prototype of every rate of change in calculus, "rise over run."
Definition: Slope
The slope of the line through points $(x_1, y_1)$ and $(x_2, y_2)$, where $x_1 \neq x_2$, is
$$m = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}.$$
The slope is the same no matter which two points on the line you choose. A vertical line has $x_1 = x_2$, so its slope is undefined. A horizontal line has $y_1 = y_2$, so its slope is $0$.
Drag the slider to change the slope. Watch the "rise" and "run" triangle and the sign of $m$. Positive slopes rise left-to-right; negative slopes fall; zero is flat.
📘 Example 1.1: Finding a Slope from Two Points
Find the slope of the line through $(-2, 5)$ and $(3, -1)$.
Apply the slope formula
$$m = \frac{-1 - 5}{3 - (-2)} = \frac{-6}{5} = -1.2$$
The negative slope tells us the line falls as we move right: each step of $5$ to the right drops the line $6$ units.
$m = -\dfrac{6}{5}$
Equations of Lines, Every Form
A line can be written several ways. Each form is best suited to the information you start with.
Form
Equation
Use when you know…
Slope-intercept
$y = mx + b$
slope $m$ and $y$-intercept $b$
Point-slope
$y - y_1 = m(x - x_1)$
slope $m$ and one point $(x_1,y_1)$
Standard
$Ax + By = C$
a tidy integer form; intercepts
Vertical line
$x = k$
slope is undefined
Horizontal line
$y = k$
slope is $0$
The Workhorse: Point-Slope Form
If you know any point on a line and its slope, you can write its equation instantly:
$$y - y_1 = m(x - x_1).$$
Most line problems reduce to: (1) find the slope, (2) plug in one point. Everything else is algebra.
📘 Example 1.2: Equation Through Two Points
Find the equation of the line through $(4, 3)$ and $(6, 7)$ in slope-intercept form.
Find the line through $(2, -1)$ perpendicular to $y = \tfrac{1}{3}x + 4$.
Negative reciprocal of the slope
The given slope is $\tfrac{1}{3}$, so the perpendicular slope is $m = -3$. Point-slope with $(2,-1)$:
$$y - (-1) = -3(x - 2) \Rightarrow y + 1 = -3x + 6 \Rightarrow y = -3x + 5.$$
$y = -3x + 5$
A linear function is a function of the form
$$f(x) = mx + b,$$
where $m$ and $b$ are constants. Its graph is a straight line of slope $m$ and $y$-intercept $(0, b)$. The defining feature: a constant rate of change. Equal steps in $x$ always produce equal steps in $y$.
In applications, $b$ is often a fixed (start-up) amount and $m$ is a per-unit rate. The variable $x$ usually counts items, hours, or years.
Cost, Revenue, and Profit
The central business model of the course. Let $x$ be the number of items produced and sold.
The Three Functions
Function
Linear model
Meaning of the slope
Cost $C(x)$
$C(x) = mx + b$
$m$ = marginal cost (cost per extra item); $b$ = fixed cost
Revenue $R(x)$
$R(x) = px$
$p$ = price per item
Profit $P(x)$
$P(x) = R(x) - C(x)$
slope = price − marginal cost
The break-even point is where $R(x) = C(x)$, i.e. $P(x) = 0$, the production level at which the firm stops losing money and starts to profit.
Cost (orange) vs. Revenue (blue). Their intersection is the break-even point. Drag the price slider, a higher price tilts revenue up and moves break-even earlier. The shaded region is profit.
📘 Example 1.4: Break-Even Analysis
A company has fixed costs of \$2400 and a marginal cost of \$4 per item. Each item sells for \$10. Find the cost, revenue, and profit functions, and the break-even quantity.
Cost: $C(x) = 4x + 2400$.
Revenue: $R(x) = 10x$.
Profit: $P(x) = 10x - (4x + 2400) = 6x - 2400$.
Break-even: set $P(x) = 0 \Rightarrow 6x = 2400 \Rightarrow x = 400$.
The firm must sell 400 items to break even; each item beyond that adds \$6 of profit.
$C=4x+2400,\;R=10x,\;P=6x-2400$; break-even at $x = 400$
Supply, Demand, and Market Equilibrium
Price $p$ drives two opposing behaviors. Demand falls as price rises (consumers buy less); supply rises as price rises (producers make more). The two linear models cross at the equilibrium price, the market-clearing price where quantity supplied equals quantity demanded.
⚠ Economists' Axis Convention
In economics, price $p$ is placed on the vertical axis and quantity $q$ on the horizontal axis, the opposite of the usual "input on the $x$-axis" rule. A demand line therefore slopes downward, and supply slopes upward.
📘 Example 1.5: Market Equilibrium
Demand: $p = -\tfrac{1}{2}q + 40$. Supply: $p = \tfrac{1}{4}q + 10$. Find the equilibrium quantity and price.
Set supply equal to demand
$$-\tfrac{1}{2}q + 40 = \tfrac{1}{4}q + 10$$
$$30 = \tfrac{3}{4}q \Rightarrow q = 40.$$
Then $p = \tfrac{1}{4}(40) + 10 = 20$.
Equilibrium: $q = 40$ units at $p = \$20$
Section 1.3
The Least Squares Line
Real data rarely falls exactly on a line. The least squares line (or regression line) is the single straight line that best fits a scatter of points by minimizing the total squared vertical distance from the points to the line.
Definition: Least Squares Line
For $n$ data points $(x_i, y_i)$, the best-fit line $y = mx + b$ has
$$m = \frac{n\sum xy - (\sum x)(\sum y)}{n\sum x^2 - (\sum x)^2}, \qquad b = \frac{\sum y - m\sum x}{n}.$$
The line passes through the point of averages $(\bar{x}, \bar{y})$.
Correlation Coefficient $r$
The number $r$, between $-1$ and $1$, measures how well the line fits. $r$ near $\pm 1$ means a strong linear relationship; $r$ near $0$ means little linear association. The sign of $r$ matches the sign of the slope.
📘 Example 1.6: Fitting a Line to Data
Fit a least squares line to the three points $(1, 1)$, $(2, 3)$, $(3, 4)$.
Build the sums ($n = 3$)
$\sum x = 6,\;\sum y = 8,\;\sum xy = 1 + 6 + 12 = 19,\;\sum x^2 = 1 + 4 + 9 = 14.$
Slope and intercept
$$m = \frac{3(19) - 6\cdot 8}{3(14) - 6^2} = \frac{57 - 48}{42 - 36} = \frac{9}{6} = 1.5$$
$$b = \frac{8 - 1.5(6)}{3} = \frac{8 - 9}{3} = -\tfrac{1}{3}.$$
Best-fit line: $y = 1.5x - \tfrac{1}{3}$
Slope is "rate of change" for straight lines. But most real quantities, population, profit, position, drug concentration, curve. To measure their instantaneous rate of change, we need the slope of a curve at a single point. That requires the limit (Chapter 3), which leads to the derivative, the centerpiece of calculus. First, though, we need a richer library of functions: Chapter 2.