# Basic bra-ket algebra

1. Mar 11, 2012

### jrand26

Hi guys, I'm having some trouble with bra-ket algebra.

For example, our lecturer did on the board, <Sx+|Sz|Sx+>

So what I would do is, ignoring any factors of 1/sqrt(2) or 1/2 or hbar.

Sx+ = |+> + |->
Sz = |+><+|-|-><-|

=> ( |+> + |-> )(|+><+|-|-><-|)( |+> + |->)

This is where I get stuck, the lecturer goes straight from this to,

(<+| + <-|)(|+> - |->)

When I try to expand it out, for the first two terms, I get stuck at

|+> * |+><+|-|-><-| = |+>|+> <+|-|-> <-|+> ??

I can see that the |+> can go with the <-| at the end, but does it go onto the expectation as well? How does that work?

Does |+> <+|-|-> = <+|+>|-|-> ?

That doesn't look right to me. Any help is appreciated.

2. Mar 11, 2012

### Chopin

I'm going to change your notation slightly to make it a little easier on the eyes (all the +'s and -'s inside the bras/kets get hard to distinguish from normal addition and subtraction.) We have:

$$|x_+\rangle = |z_+ \rangle + |z_- \rangle\\ S_z = |z_+\rangle\langle z_+ | - |z_-\rangle\langle z_-|\\ \langle x_+|S_z|x_+\rangle = (\langle z_+ | + \langle z_- |)(|z_+\rangle\langle z_+ | - |z_-\rangle\langle z_-|)(|z_+\rangle + |z_-\rangle)$$

Note the difference between my third line and yours--in the first term, the kets have to become bras, because we're putting the $x_+$ into a bra. I think this may be the source of some of your confusion.

To crack this, focus just on the last two terms, i.e. $S_z|x+\rangle$. We have:

$$(|z_+\rangle\langle z_+ | - |z_-\rangle\langle z_-|)(|z_+\rangle + |z_-\rangle)\\ = |z_+\rangle\langle z_+ |z_+\rangle + |z_+\rangle\langle z_+ |z_-\rangle - |z_-\rangle\langle z_-|z_+\rangle - |z_-\rangle\langle z_-|z_-\rangle\\ = |z_+\rangle \cdot 1 + |z_+\rangle \cdot 0 - |z_-\rangle \cdot 0 - |z_-\rangle \cdot 1\\ = |z_+\rangle - |z_-\rangle$$

Now just substitute that back into the full expression to get:

$$(\langle z_+| + \langle z_-|)(|z_+\rangle - |z_-\rangle)\\ =\langle z_+|z_+\rangle - \langle z_+|z_-\rangle + \langle z_-|z_+\rangle - \langle z_-|z_-\rangle\\ =\langle z_+|z_+\rangle - \langle z_-|z_-\rangle\\ = 1 - 1\\ = 0$$

Whenever you see an outer product of bras and kets like $|x\rangle\langle y|$, you should think of it as saying that it maps $|y\rangle$ to $|x\rangle$, and maps any ket orthogonal to $|y\rangle$ to 0. Then it just becomes a matter of finding the combinations of terms which don't cancel, and using them to build your new state.

Alternatively, thinking about this in the matrix representation can also make it easier to follow, because then the whole song and dance I just did above becomes regular old matrix multiplication.

Last edited: Mar 11, 2012
3. Mar 12, 2012

### jrand26

Thanks Chopin, that helps a lot.