Why do I feel other people's emotions?

P̶o̶s̶i̶t̶i̶v̶i̶t̶y̶.

Idk why other people's emotions affect me so much like for example I was with a friend and idk I kinda felt sad like he didn't look sad or anything I just for no reason felt sad and then I noticed when I started talking to someone else I felt like kinda better I felt happy I don't think it's cuz I don't like the person cuz I do they are both really nice and stuff but idk why is that