If a substance is in contact with two different phases then, in general, it will have a different affinity for each phase. Part of the substance will be absorbed or dissolved by one and part by the other, the relative amounts depending on the relative affinities. The substance is said to be partitioned between the two phases. For example, if two immiscible liquids are taken and a third compound is shaken up with them, then an equilibrium is reached in which the concentration in one solvent differs from that in the other. The ratio of the concentrations is the partition coefficient of the system. The partition law states that this ratio is a constant for given liquids.