No, it is not mandatory for everyone to stay in the hostels of IIT Madras. Students can choose any of the options, from hostels to other hostels, flats or PGs.