# Commutators in bra-ket notation

2-d Hilbert space, with 2 (orthogonal) kets $|a\rangle$ and $|b\rangle$

Operator $A=|a\rangle\langle b| + |b\rangle\langle a|$

Operator $B=-i|a\rangle\langle b| +i|b\rangle\langle a|$

Commutator $[A,B]=AB-BA$

When I try to compute the commutator I end up getting expressions like $|a\rangle\langle a|$ , i.e a bra multiplied by a ket. How am I meant to calculate this?

• If the operators are already a multiplication of a bra with a ket, why does it trouble you that the resulting commutator (which has the same nature as its constituent elements) is of the same kind? – Ignacio Vergara Kausel Jan 24 '14 at 14:44
• $A$ and $B$ are just two of the Pauli matrices, and you (should) know their commutation relations. From that, you can find directly the result, and write it in the $a,b$ basis (to verify your direct calculation). – Adam Jan 24 '14 at 14:53
• @IgnacioVergaraKausel This still leaves the question of if he is supposed to simplify further. He should have two terms like that in his answer and it can't be simplified further. – Brian Moths Jan 24 '14 at 14:55
• @Adam I would think whether or not he should know the commutation relations of pauli matrices depends on whether or not he has been taught them. My guess is that this is the beginning of a course on QM and this is a simple exercise in bra-ket notation, which usually comes before spin and pauli matrices. – Brian Moths Jan 24 '14 at 14:56
• Yes I am just starting a course on QM. So there is no way to simplify further a bra times a ket? – user1887919 Jan 24 '14 at 14:59

Everything is alright, there is no way to further simplify expressions (operators) like $|a\rangle\langle a|,|b\rangle\langle a|,|b\rangle\langle b|,|a\rangle\langle b|$. You could write linear combinations of them as matrix in the basis of the states $a$ and $b$, but that is no simplification, but a matter for notation. Your final result should be:
$$\left[A,B \right]=2 i\,|a\rangle\langle a|+2 i\,|b\rangle\langle b|$$