I'm studying QM from the book 'Quantum Mechanics. Concepts and Applications' by Zettili. There's an example which gives us two state vectors $$ | \psi \rangle = 9i \ | \phi_1 \rangle + 2 | \phi_2 \rangle $$ and $$ \langle \chi | = \frac{1}{\sqrt{2}} \big( i \langle \phi_1 | + \langle \phi_2 | \big) $$ where $ | \phi_1 \rangle $ and $| \phi_2 \rangle $ form an orthonormal and complete basis. Now, the author wants to compute the trace of the operator $ | \psi \rangle \langle \chi | $, which he does as follows: $$ \text{Tr}\big( | \psi \rangle \langle \chi | \big) = \text{Tr} \big( \langle \chi | \psi \rangle \big) = \langle \chi | \psi \rangle $$ He says this follows from the fact that $\text{Tr}(AB) = \text{Tr}(BA)$, for matrices. Still, I don't understand how he derives the second equality though. As far as I understand, the expression $ | \psi \rangle \langle \chi | $ is an operator, which corresponds to a square matrix. But by writing $\text{Tr}\big( | \psi \rangle \langle \chi | \big) = \text{Tr} \big( \langle \chi | \psi \rangle \big)$, it seems to me the author treats them like separate state vectors which correspond to square matrices (which they do not: they correspond to column vectors, for which trace is undefined), so that he can interchange the order.
And still, even if I grant him the second equality, how does he derive the third equality? Because this means he reduces the trace to a scalar product?
Some clarifications would be appreciated!