calculator for matrix class introdused