Intermediate price theory

Supply and Demand Equilibrium

A linear supply-and-demand model with demand and supply shifts, baseline comparisons, and surplus calculations.

Microeconomics Price theory Intermediate EasyEcon / Marimo Price theory to strategic interaction
Focus

Competitive equilibrium, comparative statics, and surplus

Track how intercepts and shocks shift equilibrium price, quantity, and total surplus in a competitive market.

Interactive diagram

Supply and Demand — explore it instantly

Loads immediately, works on any phone, and is fully readable by search engines.

Supply and demand equilibrium The downward-sloping demand line and upward-sloping supply line cross at the equilibrium price and quantity. The upper shaded triangle is consumer surplus; the lower one is producer surplus. 0 5 11 16 22 27 0 5 10 14 19 24 Quantity (Q) Price (P)
Demand Supply Equilibrium Consumer surplus Producer surplus

How to read this

A competitive market settles where the quantity buyers want equals the quantity sellers offer. The downward demand line shows how much buyers will purchase at each price; the upward supply line shows how much sellers will provide. They cross at the equilibrium — the price P* and quantity Q* at which the market clears.

The two shaded triangles measure the gains from trade. Consumer surplus is the area between the demand line and the price: buyers who would have paid more get a bargain. Producer surplus is the area between the price and the supply line: sellers who would have accepted less earn extra. Together they are the total surplus the market creates.

Reshape the curves with the intercept and slope sliders, then use the shift sliders to push demand or supply. When you apply a shift, the faint baseline curves and old equilibrium stay on screen so you can read off the comparative statics — how P* and Q* respond when the market moves.

What to explore

Change parameters and watch the model adjust.

  • Demand and supply intercepts and slopes
  • Demand and supply shifts relative to a baseline market

Core ideas

Interpret the mechanics before you chase the graphs.

  • Demand and supply shifts can move price and quantity in the same or opposite directions.
  • Welfare can be decomposed into consumer surplus, producer surplus, and total surplus.
  • Comparative statics become easier to interpret when baseline and current equilibria are shown together.

Learning goals

What this model should help students internalize.

  • Solve for equilibrium price and quantity in a linear market.
  • Compare baseline and shifted equilibria after demand or supply shocks.
  • Interpret how changes in curves affect consumer and producer surplus.

Prerequisites

Concepts to review before diving in.

  • Basic graph reading for linear demand and supply
  • Comfort with solving two linear equations
Open the full interactive notebook (Python · loads on demand)

EasyEcon interactive

Supply and Demand notebook

EasyEcon / Marimo

On phones, the full-screen view gives the cleanest notebook reading experience.

Open full screen

Deferred notebook load

Competitive equilibrium, comparative statics, and surplus

Track how intercepts and shocks shift equilibrium price, quantity, and total surplus in a competitive market.

Open full screen
The EasyEcon Marimo/WASM bundle loads only when requested or when the panel scrolls near view on fast connections.

Next models to study

Keep moving through the track.