## About the definition of fidelity in a mixed state. in terms of density matrix?

Uh, today I read some materials about quantum fidelity. In a pure state, which can be expressed by a wave function vector |f>. the fidelity can be defined directly and clearly by their inner product. But when it turns to the case of mixed state expressed by a density matrix. I cannot understand the definition directly.