Why is ex acting cold towards me after being friendly afterwards?

We broke up and it was hard for both of us. We have a daughter so he came over but we had a argument where I cried in front of him. Since the argument things have been strange between us such as him being cold. I saw him at the store and we usually say hello and chat a little. this time he walked past me said hi in an angry way and looked angry. neither of us made rude remarks so I don't think I offended him. Why is he acting cold and distant after the argument?