It's one of the most commonly asked questions about yoga practice, and the answer is a resounding no. Yoga is not contained within your mat's perimeters as it is a free-flowing component of your everyday life. Your practice is about how you center yourself and commit to the goals you've set forth. It's also about your everyday attitude and the way you approach every challenge that comes your way.
Yoga is something we do regularly, and it shows in how we conduct ourselves and the choices we make.
As for ayoga mat being mandatory in your practice, it can help with grip and balance and should be used for performing many poses where a hard floor would be too uncomfortable or pose a potential injury risk.