In economics, two goods whose demand is linked in this way are called substitute goods.
Substitutes serve similar purposes, so consumers can switch between them. If the price of coffee rises, for example, some consumers may buy more tea, increasing tea’s demand. The relationship is measured through cross-price elasticity of demand, which is positive for substitutes.
Substitution does not require products to be identical. Bus travel and train travel, butter and margarine, and competing brands may all be substitutes to some degree. The strength of the relationship depends on consumer preferences, location, timing, and available alternatives.
Substitute goods are different from complementary goods, which are commonly used together. A rise in the price of printers may reduce demand for printer ink, whereas a rise in the price of one soft-drink brand may increase demand for another.