Opportunity cost (Opportunity Cost) is easiest to see with money. If you have a fixed budget and two things to buy, every combination you can afford in full lies on one line, and that line is an equation in Standard Form and Intercepts.
Key idea
With income $I$ and prices $P_x$ and $P_y$, the bundles that spend the whole budget satisfy $$P_x\,x + P_y\,y = I.$$ The intercepts are $I/P_x$ (all on $x$) and $I/P_y$ (all on $y$). With $y$ on the vertical axis the slope is $-P_x/P_y$: each extra unit of $x$ costs $P_x/P_y$ units of $y$. That ratio is the opportunity cost of $x$.
Why it works
Solve the budget equation for $y$: $$y = \frac{I}{P_y} - \frac{P_x}{P_y}\,x.$$ The vertical intercept $I/P_y$ is what you can buy if you spend everything on $y$. Buying one more unit of $x$ uses $P_x$ dollars, and those dollars would have bought $P_x/P_y$ units of $y$. So the slope is a price ratio, and it measures what one good costs in units of the other.
Worked example: Intercepts and slope
Lia has \$60 for burgers (\$6 each) and movie tickets (\$12 each). Find both intercepts and the opportunity cost of one burger.
- All burgers: $60/6 = 10$ burgers. All movies: $60/12 = 5$ movies.
- The line runs from $(0, 5)$ to $(10, 0)$. Slope $= \dfrac{0 - 5}{10 - 0} = -\dfrac{1}{2}$.
- One burger costs \$6, half the price of a movie, so it costs $\tfrac{1}{2}$ movie.
Answer: Intercepts 10 burgers and 5 movies; one burger costs $\tfrac{1}{2}$ movie.
Worked example: Can she afford it?
With the same budget, is 4 burgers and 3 movies affordable? What about 6 burgers and 3 movies?
- $4(\$6) + 3(\$12) = \$24 + \$36 = \$60$: exactly the budget, a point on the line.
- $6(\$6) + 3(\$12) = \$36 + \$36 = \$72 > \$60$: outside the line, not affordable.
Answer: The first is affordable (on the line); the second is not.
Common mistake
Putting the wrong intercept on an axis, such as $I/P_y$ on the $x$-axis, or flipping the ratio and saying a burger costs 2 movies. Check an intercept by multiplying back: 10 burgers $\times$ \$6 = \$60. Check the ratio with common sense: the cheaper good must cost less than one unit of the pricier good.
If the price of one good changes, the line pivots around the other good's intercept. If income changes, the whole line shifts in parallel, because the price ratio, and so the slope, stays the same.