Why did my ex smile at me today?

We broke up about 1 month ago on bad terms and we last spoke around 1 month ago. When I passed him today at school he simply just smiled and waved at me, and it wasn't sarcastic. I kinda smiled back at him back. He hold me not to talk to him again and now all the sudden he smiled at me. What does this mean?
Why did my ex smile at me today?
Post Opinion