Create functions to calculate inverse for a Matrix