Let be an nonnegative matrix, with row-sums and column-sums . We show that providing the function meets certain conditions. When is the identity function, this inequality is one proven by Atkinson, Watterson, and Moran in 1960. We also prove another inequality, of similar type, that refines a result of Ajtai, Komlós, and Szemerédi (1981).