We have worked with supply and demand equations separately, but they can also be combined to find market equilibrium. We have already established that at equilibrium, there is one price, and one quantity, on which both the buyers and the sellers agree. Graphically, we see that as a single intersection of two curves. Mathematically, we will see it as the result of setting the two equations equal in order to find equilibrium price and quantity.

If we are looking at the market for cans of paint, for instance, and we know that the supply equation is as follows:

\(q_S  = -5 + 2p\)

And the demand equation is:

\(q_D  = 10 - p\)

Then to find the equilibrium point, we set the two equations equal. Notice that quantity is on the left-hand side of both equations. Because quantity supplied is equal to quantity demanded at equilibrium, we can set the right-hand sides of the two equations equal.

\(q_S  = q_D\)
\(-5 + 2p = 10 - p\)
\(3p = 15\)
\(p = 5\)

At equilibrium, paint will cost $5 a can. To find out the equilibrium quantity, we can just plug the equilibrium price into either equation and solve for q. Let’s use the supply equation:

\(q* = q_S\)
\(q_S  = -5 + 2(5)\)
\(q_S  = q* = 5\) cans

Shifts up and down supply and demand curves are represented by plugging different prices into the supply and demand equations: different prices yield different quantities. For example, changing the price to $6 a can would decrease quantity demanded from 5 cans to 4 cans, as we can see when we plug the two prices into the demand function:

\(p = 5\)
\(q_D  = 10 - 5 = 5\) cans

\(p = 6\)
\(q_D  = 10 - 6 = 4\) cans

The equivalent of shifting supply and demand curves is changing the actual supply and demand equations. Let's say that everyone in a small town just recently painted their houses, and therefore no longer need any paint. This means that they will be less willing to buy paint, even if the price doesn't go up. Their new demand function might be:

\(q_D  = 7 - p\)

We can see that for any price, they will demand fewer cans of paint. At the old equilibrium price of $5, they will only buy:

\(q_D  = 7 - 5 = 2\) cans of paint

This new equation, representing a shift in demand, also causes a shift in market equilibrium, which we can find by setting the new demand equation equal to supply:

\(q_S  = q_D\)
\(-5 + 2p = 7 - p\)
\(3p = 12\)
\(p = $4\) per can

Now to solve for the equilibrium quantity:

\(q* = q_S\)
\(q_S  = -5 + 2p = -5 + 2(4)\)
\(q_S  = q* = 3\) cans of paint

At the new equilibrium, 3 cans of paint will be sold at $4 each.