Muwatta Malik, Book 17, Hadith 25 (USC-MSA)

Yahya said that Malik said, concerning two associates, "If they share one herdsman, one male animal, one pasture and one watering place then the two men are associates, as long as each one of them knows his own property from that of his companion If someone cannot tell his property apart from that of his fellow, he is not an associate, but rather, a co-owner " Malik said, "It is not obligatory for both associates to pay zakat unless both of them have a zakatable amount (of livestock). If, for instance, one of the associates has forty or more sheep and goats and the other has less than forty sheep and goats, then the one who has forty has to pay zakat and the one who has less does not. If both of them have a zakatable amount (of livestock) then both of them are assessed together (i.e the flock is assessed as one) and both of them have to pay zakat. If one of them has a thousand sheep, or less, that he has to pay zakat on, and the other has forty, or more, then they are associates, and each one pays his contribution according to the number of animals he has - so much from the one with a thousand, and so much from the one with forty. Malik said, "Two associates in camels are the same as two associates in sheep and goats, and, for the purposes of zakat, are assessed together if each one of them has a zakatable amount (of camels). That is because the Messenger of Allah, may Allah bless him and grant him peace, said, 'There is no zakat on less than five head of camels,' and Umar ibn al-Khattab said, 'On grazing sheep and goats, if they come to forty or more - one ewe.' " Yahya said that Malik said, "This is what I like most out of what I have heard about the matter." Malik said that when Umar ibn al-Khattab said, "Those separated should not be gathered together nor should those gathered together be separated in order to avoid paying zakat," what he meant was the owners of livestock. Malik said, "What he meant when he said, 'Those separated should not be gathered together' is, for instance, that there is a group of three men, each of whom has forty sheep and goats, and each of whom thus has to pay zakat. Then, when the zakat collector is on his way,they gather their flocks together so that they only owe one ewe between them. This they are forbidden to do. What he meant when he said, 'nor should those gathered together be separated,' is, for instance, that there are two associates, each one of whom has a hundred and one sheep and goats, and each of whom must therefore pay three ewes. Then, when the zakat collector is on his way, they split up their flocks so that they only have to pay one ewe each. This they are forbidden to do. And so it is said, 'Those separated should not be gathered together nor should those gathered together be separated in order to avoid paying zakat.' " Malik said, "This is what I have heard about the matter."

sunnah.com