Sheikh Muhammad al-Sarî`, professor at al-Imâm University in Riyadh
There are two kinds of knowledge: Islamic knowledge and worldly knowledge, such as the sciences of physics, medicine, and engineering.
A certain level of Islamic knowledge is obligatory on every Muslim. He must know matters of faith, how to pray, how to fast, how to buy and sell, and how to treat others... etc.
Studying the worldly sciences is a voluntary pursuit on the individual level, as long as a sufficient number of people in society study these fields to fulfill the needs of humanity. However, if an insufficient number of people are interested in such sciences and the Muslim nation is in need of specialists in those fields, it becomes obligatory on people to embark on such studies. Whoever has the aptitude and opportunity to study a certain field will be Islamically required to do so.
A Muslim will be rewarded for gaining such knowledge if he has the sincere intention to do so for the sake of Allah and to help the Islamic society. His reward will increase when he teaches his science to other Muslims.
Source: Islam Today