constructor added to matrix class for particular initialization of all elements