Implemented matrix functions for inverse, multiply, scalar multiply and addition.