How to write an apology letter for a professor?
one could say... implying... I also commented on... I may have gone too far... do you evaluate my reaction as provocative?...


Perhaps you're being a bit lenient on yourself?

I think the only right thing to do is to apologize, in person, and own your awful (truly awful!) behavior. You didn't perhaps offend and disrespect her, you absolutely offended and disrespected her. In my opinion, you were completely out of line (and unprofessional to boot.) Regardless of the opinion of others (including my own), I think you need to deal head on with this problem you have of lashing out at others for (real or perceived) slights. Part of dealing with a problem behavior is dealing with the consequences.

People are more likely to forgive an offense if the offender has actually apologized and asked for forgiveness. Though she may continue to harbor some residual ill-will towards you (and deservedly so), it will show the community to whom she belongs that you at least tried to do the civilized thing after exhibiting such poor judgement. Also, it will likely stop her from continuing to bad-mouth you if you have apologized appropriately. It doesn't sound good to the listener if she complains bitterly about you, then ends with, "...and then he apologized appropriately."

Don't send a letter or an email. Have the courage to do it in person, and to allow her the opportunity to tell you what you probably need to hear. It might also help you to read about real apologies lest you continue in the vein which started this.

However, if you want her continued ill-will and bad-mouthing to follow you around the start of your career (it may or may not hurt you, you never know), do nothing, or better yet, continue to ignore the better angels of your nature, and tell people she had it coming to her.