# Equations with bras and kets

1. Sep 14, 2014

### dyn

When re-arranging equations with bras and kets I was under the impression that the order of the bras and kets had to be maintained unless they formed an inner product ie. just a complex number in which case they could be moved around ? Is this the case ? As I am confused about the following equation I found
Tr |u><u|v><v| = <v|u><u|v>
In this example the bra <v| seems to have jumped from the end to the start.

2. Sep 14, 2014

### Fredrik

Staff Emeritus
$$\operatorname{Tr}|u\rangle\langle u|v\rangle\langle v| =\sum_i \langle i|u\rangle\langle u|v\rangle\langle v|i\rangle = \sum_i \langle u|v\rangle\langle v|i\rangle\langle i|u\rangle = \langle u|v\rangle\langle v|\bigg(\sum_i |i\rangle\langle i\bigg)|u\rangle =\langle u|v\rangle\langle v|u\rangle$$

3. Sep 14, 2014

### dyn

Thanks for that but i'm confused about the first step. At first I thought I was the imaginary number but it looks like an integer you are summing over but I don't understand how it can be brought into the equation.

4. Sep 14, 2014

### Fredrik

Staff Emeritus
Sorry about that. Yes, it's an integer. I should at least have started with this statement: Let $\{|i\rangle\}_{i=1}^\infty$ be any orthonormal basis.

If the Hilbert space is finite-dimensional, replace $\infty$ with $\dim\mathcal H$ (where $\mathcal H$ denotes the Hilbert space). The first step in that calculation is just the definition of the trace of a linear operator.

You may want to also take a look at https://www.physicsforums.com/showthread.php?t=694922 [Broken] about the relationship between linear operators and matrices.

Last edited by a moderator: May 6, 2017
5. Sep 14, 2014

### dyn

Thanks. I understand it now. Could you just confirm for me that my original statement is correct , ie the order of bras and kets does matter and they can only be rearranged in order if they form an inner product ?

6. Sep 15, 2014

### Fredrik

Staff Emeritus
Yes, it's correct. If you move them around, you may end up with an entirely different object than the one you started with, as in this case, where |u><u|v><v| is a linear operator and <u|v><v|u> is a number.