This paper investigates the behavior of Hilbert-Samuel multiplicity and Hilbert-Kunz multiplicity in families of ideals. We show that Hilbert-Samuel multiplicity is upper semicontinuous and that Hilbert-Kunz multiplicity is upper semicontinuous in families of finite type. As a consequence, F-rational signature, an invariant defined by Hochster and Yao as the infimum of relative Hilbert-Kunz multiplicities, is, in fact, a minimum. This gives a different proof for its main property: F-rational signature is positive if and only if the ring is F-rational. The tools developed in this paper can be also applied to families over Z and yield a solution to Claudia Miller's question on reduction mod p of Hilbert-Kunz function.