Nobody does anything without any reason.
There must be something, try to find out.
Are you good at math?
Do you do your home work regularly?
Are you obedient & keep good discipline in the class?
Remove the word hate from your dictionary, this life is too short for love, how can we hate someone.
Try to forgive your teacher & think positively for her.
Pray 5 times &read Quran daily may be one page with translation. Allah will help you.