The law of demand is one of the foundational principles in microeconomics. It is one of the most basic laws of economics. The law of demand states that given all the other variables are constant, as the price of the good increases, the quantity demanded decreases, and conversely, as the price of the good decreases, the quantity demanded increases. Similarly, if all the other variables do not change, with a decrease in demand, the price increases, and vice versa. Basically, the law of demand establishes an inverse relationship between the price and demand of any good. If you are selling a good, the law of demand says that if you increase the price of the good, the demand for it decreases and similarly, if you decrease the price, the demand will increase but the pitfall here is, one must always find the right price to get the profit. In order to get the highest demand, the good cant is sold at the least price.
In the above plot, price is taken on the Y-axis and the quantity demanded is taken on the X-axis. Here, observe the red lines, as the price decreases, the slope is going down and demand increases. These goods follow the law of demand. But, not all goods do so. Take the blue line, for example, the commodity corresponding to the blue curve clearly does not follow the law of demand as its demand is increasing with an increase in price. Some exceptions to the law of demand are Giffen goods and Veblen goods. They do not follow the law of demand.
Take antiques, for example, a lamp owned in the 6th century is probably worth very less now for its usage but due to its an antiquity, the price goes up, and as the price goes up, the demand for it too goes up. Antiques are a perfect example of goods that do not follow the law of demand. There are many such goods in the real world. Such goods are generally bought not for their intrinsic value but generally for the extrinsic value or the emotional attachment to it. But for most of the products, the law of demand is applicable and is used very often in cost analysis.
The Law of demand is a very crucial principle in economics. Although it is only used in microeconomics, the principle has been a foundation to the modern-day economy and how companies operate to get the best profits. The cost or price of any product is estimated through what is known as a cost analysis. Basically, the idea is the fix a price in order to yield the most profits. The general way of doing this is to find the intersection between quantity demanded and profit. The highest profit is then calculated, and the price is estimated. This might not always be achievable especially when a lot of variables are to be considered, but this is the foundation for doing so. Many companies have benefitted from such analysis and the law of demand still continues to help companies and also to bring up new economic theories.