M.P.
I'm a teacher and can tell you this isn't too unusual but it definitely has to stop NOW or believe me it will continue through age 6 which is the age I teach most of the time.
Hit her back. I'm serious. Not hard-- just enough for her to realize how much it's hurting you. Often when kids as young as 31 months do something they just don't realize the gravity of what they're doing. I mean look at how they'll shove someone out of their way to be first going down the slide, or they'll yank a toy away from somebody without blinking an eye. They just don't get it till it happens to them. So if you (gently) do it back to them they'll figure it out.
my only other advice which works with most kids of all ages, baby through middle school at least, is mimicking them. So if she hits you and you pretend to cry and throw a tantrum she'll get it. With older kids thy even laugh and get embaressed as they recognize their own behavior. It makes a dent.