(Group theory:)

The commutator of two elements a,b of a group is defined as

[a,b] = a-1b-1ab;
if a and b commute then [a,b]=1.

The subgroup generated by all commutators of the group is the commutator subgroup. Note the word "generated": the set of all commutators of the group is, generally, not a group (in any interesting case). While clumsily defined, the commutator subgroup is important.

An abelian group has only trivial commutators, as a⋅b⋅a-1⋅b-1=1. Hence its commutator subgroup is {1}. The converse is also (trivially) true.

A commutator is used in a dynamo and in a direct current motor to reverse the flow of electricity through the coils a number of times per revolution of the armature. It generally consists of a cylinder that has several contacts on it. These contacts are brushed on either side by graphite contacts. As the cylinder rotates, different contacts on the cylinder form a circuit with the graphite, hence producing the desired reversal effect.

In quantum mechanics, define the commutator of two operators A and B to be [ A,B ] = AB-BA. It's essentially a way of stating how two operators fail to commute.
If they do commute, then [ A,B ] = 0 ie AB = BA and the operators are said to be simultaneously diagonalizable - that is, their eigenspaces coincide and kets can be labeled by eigenvalues of both operators.

The relationship between this definition and the one given by ariels comes from Lie algebras: suppose we approximate a as 1+δA and b as 1+εB. Then to first order in δ and ε,

aba-1b-1 goes to (1+δA)(1+εB)(1-δA)(1+εB) = 1+(AB-BA)δε = 1+[ A,B ]δε
so as a->A and b->B, [ a,b ]->[ A,B ].

When using matrices, one defines the commutator of two n x n matrices A and B to be AB-BA

A property of the commutator is that it is never the identity (or a non null multiple thereof). This is proved easily enough using the trace operator (noted tr).
Suppose that AB-BA = I
then tr(AB-BA) = tr I. The properties of trace tell us that tr(AB-BA)=tr(AB)-tr(BA)=0
but tr I = n (since I is the n x n identity matrix), hence (AB-BA) cannot be the identity.

Com"mu*ta`tor (?), n. Elec.

A piece of apparatus used for reversing the direction of an electrical current; an attachment to certain electrical machines, by means of which alternating currents are made to be continuous or to have the same direction.