new memory allocation, new matrix multiplication friend function and elementwise +-*/ operations