**Introduction**

The primary supply and demand model is the workhorse of microeconomic and macroeconomic models. The model is not without problems and shortcomings. Still, the predictive power of the model remains one of its most exceptional properties.

The model consists of a system of linear equations which we are going to set up in its most general form with the equilibrium equation that supply equals demand and two behavioral equations for both the consumers and producers of a generic good. The law of demand and supply are in the coefficients, and matrix algebra can solve the system.

**Useful Books on Topic: **

- Fundamental Methods of Mathematical Economics
- Introduction to Linear Algebra
- Principles of Microeconomics

**Solving the System**

The supply and demand system below; all constants are positive.

The matrix form of the system places all constants on one side and the variables on the other side:

Solving the system requires taking the inverse of the A matrix using the adjoint, or transposing the cofactor matrix. The solution is verified to eliminate linear dependence between equations:

**Summary**

Supply equals demand, and the relationships between the variables can be verified to be consistent with what we see happening in markets between consumers and producers. An increase in price encourages production and discourages consumption holding all other things constant. Increasing fixed cost for the supply function reduces the quantity supplied and increases the equilibrium price in the market. Many other relationships are intuitively correct for what we see in terms of market dynamics. Quantifying this intuition involves taking the derivatives of the demand, supply, and solution results concerning the four constants in the model: a, b, c, and d. The following Excel diagram is a pretty good interactive spreadsheet to create that will be a great way to understand supply and demand dynamics.

**Further Reading Materials: **