# How do you know if a good is a complement or a substitute from given demand and supply functions? [closed]

QD1 = 190 - 2P1 - 2P2

QS1 = - 10 + 2P1

QD2 = 240 - 2P1 - 4P2

QS2 = - 40 + P2

Are these goods substitutes or complements?

You don't actually need the supply functions at all. You can determine whether two goods are complements or substitutes based on their demand functions alone. All you need to do is look at the coefficient (number in front of) on $P_1$ and $P_2$ in each of the demand functions. In the first demand function $QD_1$, the coefficient on $P_2$ is -2. What this means is that, holding $P_1$ constant, a one-dollar increase in $P_2$ causes the quantity demanded of good 1 $QD_1$ to decrease by 2 units. The important thing here to keep in mind is that this is a negative coefficient. Otherwise, $QD_1$ would increase rather than decrease.
As for $QD_2$, you have a similar situation. Because the coefficient on $P_1$ is -2, if you hold $P_2$ constant, a one-dollar increase in $P_1$ causes the quantity demanded of good 2 to decrease by 2 units.