Operators (or variables in quantum mechanics) do not necessarily commute.
We can compute the
commutator
of two variables, for example

Later we will learn to derive the uncertainty relation for two variables from their commutator. We will also use commutators to solve several important problems.

Jim Branson 2013-04-22