Under the effect of an electric and magnetic field the momentum in the Hamiltonian becomes the canonical momentum, p-qA where p is the linear momentum and A is the vector potential so H=(1/2m)(p-qA)^2 + qV where V is the scalar potential. I am trying to find [H,(p-qA)]. My main question arises because as I expand the commutator out in different ways I seem to be getting different answers. For example if I begin with [H,(p-qA)]=[H,p]-q[H,A] I get a different answer to when I use go [H, (p-qA)] = (1/2m)[(p-qA)^2,(p-qA)] + [qV,(p-qA)] and use the relation mentioned in the title to get (p-qA)[(p-qA),(p-qA)] + [(p-qA),(p-qA)](p-qA) which i'm pretty sure is zero. So what's going on? I can only assume that I have to expand out all the brackets for the operators first to get them individually and then use the relation in the title. If I'm right, then why?