This is a piece of code which provides all functionalities for matrix operations.