implented matrix object methods