A super effective way to piss off a teacher?
If he/she just got mad at you, you know that moment when he/she just yelled at you and then makes a pause while like at you straight in the eyes? Well look at him/her straight in the eyes too. Keep an intense look, emotionless. And the teacher will be off-balance.
Just don't burst out laughing, 'cause although the teacher WILL get pissed-off, your situation might grow worse.