Added inverse calculation method to Matrix class