Matrix calculator that performs addition, subtraction, multiplication, scalar multiplication, and transpose