The Lajnah (Permanent Committee For Scholarly Research And Ifta’) was asked:
Q 3: What is the ruling on receiving fees for teaching at schools and universities? What is the ruling on a Muslim who teaches Christian students at schools and universities? It is noteworthy that Muslims and non-Muslims live in our country.
A: First: It is permissible for teachers at schools and universities to receive fees for teaching students religious sciences and other branches of science like mathematics, geometry, calligraphy and different types of crafts like carpentry, smithery, textile and the like. Second: It is permissible for a Muslim to teach different subjects at schools which include Muslim and Christian students. However, it is prohibited for a Muslim to teach non-Muslims any branch of science that would be used in war against Muslims like instructing non-Muslims about military industries, training them in marksmanship and other military related works. May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.
This means that it is allowed to learn it and practice it. Allah Knows Best
Faisal Ibn Abdul Qaadir Ibn Hassan