I saw the post that this was on, and yeah, that comment was uncalled for. So I get that it may have been confusing or even made you angry.
That being said, you can't let some bitter person or some troll get to you on the internet like that, they'll just spew their bullshit and move on. You won't do yourself any good dwelling on it.
I'll add to that that seeing as you're studying for a maths PhD, chances are you are going to meet your fair share of insecure/competitive/self-important assholes who'll like nothing more than to belittle you just so they can feel good about themselves/eliminate the competition. This won't stop at academia either. So a good thing you can pick up during your PhD is to learn to not care when it's not worth it, and to bite back properly when it is.
Source: been there, done that. I am now out of the academic cesspool but still (very) occasionally run into an insecure twat with a PhD who feels threatened by the fact I also have one and tries to start the dick measuring contest. You'll make your life impossible if you give these people anymore attention than they deserve: none.