Most theoretical texts on high energy physics make statements like below:
$$[A_i , A_j] = i C^k_{i,j} A_k $$
(I suppose $\hbar$ may or may not be needed) and of course they describe this as being the Lie algebra over some group. I think in this case, what I have just describes is the general lie algebra.
Meanwhile, there is the standard relation found in quantum mechanics texts:
$$[\hat x, \hat p ] = i \hbar$$
My question is two-fold. First, I am confused about the second equation. The way I see it:
$$ [\hat x, \hat p ] = \hat x \hat p - \hat p \hat x $$ which in turn equals: $$ =\hat x \frac{\partial}{\partial x} - \frac{\partial}{\partial x} \hat x$$ $$ =\hat x \frac{\partial}{\partial x} - 1$$ I may be a bit unclear on that last line above but the way I see it, it sure doesn't equal $i \hbar$.
I guess my question is what gives?