It is not compulsory unless your teacher makes it. Textbooks can be really helpful in providing you with knowledge but you can also do that with the help of the internet which will save you a lot of money.