Hi wiwergoch, I had something similar happening to me some years ago in my philosophy class, though it was way more direct. The teacher started his class by asking me a question to which I answered "I don't know", then he "attacked" me telling me that I was declaring war to him by being quiet in the back of the class (I think he just had something against me because of my style), and that if I wouldn't sit there, working alone and talking to no one, maybe I would know the answer. Then he gave me the ultimatum of either sit in front of the class or leave. So I left.
The next day, he saw me in the hall and told me I should come back (I think he felt bad because I was actually one of the best student of this class... what a idiot).
I came back for the next class and gave him a 3 pages letter telling him (politely but firmly) in a very philosophical way how wrong he was, and why I would totally keep sitting in the back of the class, and keep working alone.
He never gave me anymore trouble, and I had 100% in all and every exams/homeworks for the rest of the semester.
If you feel that she attacked you and you have something smart to answer, I think writing is a good way to do it.