In economics, demand is the consumer's need or desire to own goods or services. Many factors influence demand. In an ideal world, economists would have a way to graph demand versus all these factors at once. In reality, however, economists are limited to two-dimensional diagrams, so they have to choose one determinant of demand to graph against quantity demanded.

### Price vs. Quantity Demanded

Economists generally agree that price is the most fundamental determinant of demand. In other words, price is likely the most important thing that people consider when they are deciding whether they can buy something. Therefore, the demand curve shows the relationship between price and quantity demanded.

In mathematics, the quantity on the y-axis (vertical axis) is referred to as the dependent variable and the quantity on the x-axis is referred to as the independent variable. However, the placement of price and quantity on the axes is somewhat arbitrary, and it shouldn't be inferred that either is a dependent variable in a strict sense.

Conventionally, a lowercase q is used to denote individual demand and an uppercase Q is used to denote market demand. This convention isn’t universal, so it’s important to check whether you're looking at individual or market demand. It will be market demand in most cases.

### Slope of Demand Curve

The law of demand states that, all else being equal, the quantity demanded of an item decreases as the price increases, and vice versa. The “all else being equal” part is important here. It means that individuals’ incomes, the prices of related goods, tastes, and so on are all held constant with only the price changing.

The vast majority of goods and services obey the law of demand, if for no other reason than fewer people are able to purchase an item when it becomes more expensive. Graphically, this means that the demand curve has a negative slope, meaning it slopes down and to the right. The demand curve doesn’t have to be a straight line, but it’s usually drawn that way for simplicity.

Giffen goods are notable exceptions to the law of demand. They exhibit demand curves that slope upward rather than downward, but they don't occur very often.

### Plotting Downward Slope

If you're still confused as to why the demand curve slopes downward, plotting the points of a demand curve may make things clearer.

In this example, start by plotting the points in the demand schedule on the left. With price on the y-axis and quantity on the x-axis, plot out the points given the price and quantity. Then, connect the dots. You'll notice that the slope is going down and to the right.

Essentially, demand curves are formed by plotting the applicable price/quantity pairs at every possible price point.

### Calculating Slope

Since slope is defined as the change in the variable on the y-axis divided by the change in the variable on the x-axis, the slope of the demand curve equals the change in price divided by the change in quantity.

To calculate the slope of a demand curve, take two points on the curve. For example, use the two points labeled in this illustration. Between those points, the slope is (4-8)/(4-2), or -2. Note again that the slope is negative because the curve slopes down and to the right.

Since this demand curve is a straight line, the slope of the curve is the same at all points.

### Change in Quantity Demanded

A movement from one point to another along the same demand curve, as illustrated here, is referred to as a "change in quantity demanded." Changes in quantity demanded are the result of changes in price.

### Demand Curve Equations

The demand curve can also be written algebraically. The convention is for the demand curve to be written as quantity demanded as a function of price. The inverse demand curve, on the other hand, is the price as a function of quantity demanded.

These equations correspond to the demand curve shown earlier. When given an equation for a demand curve, the easiest way to plot it is to focus on the points that intersect the price and quantity axes. The point on the quantity axis is where price equals zero, or where the quantity demanded equals 6-0, or 6.

The point on the price axis is where the quantity demanded equals zero, or where 0=6-(1/2)P. This occurs where P equals 12. Because this demand curve is a straight line, you can then just connect these two points.

You will most often work with the regular demand curve, but in a few scenarios, the inverse demand curve is very helpful. It's fairly straightforward to switch between the demand curve and the inverse demand curve by solving algebraically for the desired variable.