It is Duke Senior who most enjoys the company of Jacques, especially when Jacques is in a melancholy humor. In Act 2, Scene 1, when the Duke learns that Jacques has been thrown into one of his melancholy moods because of seeing a wounded deer abandoned by the rest of the herd, the Duke wants to visit Jacques immediately because, as he says, "I love to cope him [i.e. argue with him] in these sullen fits, / For then he's full of matter." It is evident from the questions the Duke asks about Jacques that he is fond of the man mainly because he is a philosopher like the Duke himself. It is also apparent from this early introduction to these two characters that they have little to do but commune with nature and engage in philosophical discussions, not unlike Socrates and his friends in ancient Athens. We never see this particular meeting between the Duke and Jacques. The purpose of Act 2, Scene 1 seems mainly to be to introduce Duke Senior and a few of his loyal followers.
It was Duke Ferdinand who enjoyed the company of Melancholy Jaques.
As whenever Jaques is in a melancholy mood he is full of matter of interest and Duke Senior in Act 2 Scene 1 was trying to enter into a conversation with him at the end of this Scene. At that time Jaques was molarising true facts between the worldly creatures and the Stag which standing on the verge of death.