I am trying to get used to Hochschild cohomology of algebras by proving its properties. I am currently trying to show that the cup product is graded-commutative (because I heard this somewhere); however, my trouble is that I have no idea what the exact conditions are for this to hold.

As always in Hochschild cohomology, we start with an algebra A and an A-bimodule M. Is A supposed to be unital? In the original article by Hochschild, it is not, and the proofs would even become harder if we suppose it to be. On the other hand, I have some troubles working with non-unital algebras - they seem just so uncommon to me. Is it still standard to use non-unital algebras 60 years after Hochschild's articles?

Anyway, this is not the main problem. The main problem is that I have no idea what we require from A and M. Of course, M should be an A-algebra, not just a module, for the cup product to make sense. Now:

Must A be commutative?

Must M be commutative?

Must M be a symmetric A-bimodule? (That is, am = ma for all a in A and m in M.)

I have some doubts that if we require this all, then we still get something useful (in fact, the most common particular case of Hochschild cohomology is group cohomology, and it is as far from the "symmetric A-bimodule" case as it can be), but I may be completely mistaken.

As there seem to be different definitions of Hochschild cohomology in literature, let me record mine:

For a k-algebra A and an A-bimodule M, we define the n-th chain group $C^n \left(A, M\right)$ as $\mathrm{Hom}\left(A^{\otimes n}, M\right)$, with differential map

$\delta : C^n \left(A, M\right) \to C^{n+1} \left(A, M\right)$,

$\left(\delta f\right) \left(a_1 \otimes ... \otimes a_{n+1}\right) = a_1 f\left(a_2 \otimes ... \otimes a_{n+1}\right)$ $ + \sum\limits_{i=1}^{n} f\left(a_1 \otimes ... \otimes a_{i-1} \otimes a_{i}a_{i+1} \otimes a_{i+2} \otimes ... \otimes a_{n+1}\right) + \left(-1\right)^{n+1} f\left(a_1 \otimes ... \otimes a_n\right) a_{n+1}$.

The cohomology is then the homology of the resulting complex, and if M is an A-algebra, the cup product is given by

$\left(f\cup g\right)\left(a_1 \otimes ... \otimes a_{n+m}\right) = f\left(a_1 \otimes ... \otimes a_n\right) g\left(a_{n+1} \otimes ... \otimes a_{n+m}\right)$.

I am aware of this article by Arne B. Sletsjøe, but it defines Hochschild cohomology differently (by using $\left(-1\right)^{n+1} a_{n+1} f\left(a_1 \otimes ... \otimes a_n\right)$ in lieu of $\left(-1\right)^{n+1} f\left(a_1 \otimes ... \otimes a_n\right) a_{n+1}$); this definition is only equivalent to mine if M is a symmetric A-module, so it won't help me find out whether this is necessary to assume.

Thanks for any help, and sorry if the counterexamples are so obvious that I am an idiot not to find them on my own...