Matrix methods in quantum mechanics