That is, quantity demanded is a function of price. The inverse demand equation, or price equation, treats price as a function g of quantity demanded: P = f(Q). To compute the inverse demand equation, simply solve for P from the demand equation.