created a class to hold the matrix and perform some operations on it.
later the kongrad class will inherit from this class