Add inverse method to matrix 3 class.