Precise meaning of composition of ket and bra, e.g. $|\psi\rangle\langle\psi|$ I'm currently studying density matrices, and have been frequently coming across the construction
$$|\psi\rangle\langle\psi| \,.$$
What is the formal meaning of this composition? I understand $\langle \psi|$ to be an element of the dual space (to that vector space for which $|\psi\rangle$ is a member) but I don't quite understand what it means to put them together. 
I have been treating this object as a linear operator on the space of ket vectors, and assuming a certain associativity to its composition, such that
$$\bigg(|\psi\rangle \langle \psi|\bigg) |\phi\rangle = |\psi\rangle \bigg(\langle \psi|\phi\rangle \bigg)  = \alpha |\psi\rangle \,,$$
but is there a way to make this more formal? Thank you.
 A: I suggest to think of it like this:
$$\left|\psi\right.\rangle = 
\left(\begin{array}{c}\psi_1\\\psi_2\\\cdots\\\psi_n\end{array}\right)\;,\qquad
\langle\left.\psi\right| =
\left(\begin{array}{c}\psi_1^*\,\psi_2^*\,\cdots\,\psi_n^*\end{array}\right)
$$
And using standard rule ("every element in row per every element in column") for matrix multiplication. This way you get:
$$
\langle\left.\psi\right.\left|\,\psi\right.\rangle =
\left(\begin{array}{c}\psi_1^*\,\psi_2^*\,\cdots\,\psi_n^*\end{array}\right)\left(\begin{array}{c}\psi_1\\\psi_2\\\cdots\\\psi_n\end{array}\right)
=\left|\psi_1\right|^2 +\left|\psi_2\right|^2+\cdots+\left|\psi_n\right|^2
$$
And for your question:
$$
\left|\,\psi\right.\rangle \langle\left.\psi\right|=
\left(\begin{array}{c}\psi_1\\\psi_2\\\cdots\\\psi_n\end{array}\right)
\left(\begin{array}{c}\psi_1^*\,\psi_2^*\,\cdots\,\psi_n^*\end{array}\right)
=\left(\begin{array}{ccc}
\psi_1\psi_1^* & \psi_1\psi_2^* & \cdots & \psi_1\psi_n^*\\
\psi_2\psi_1^* & \psi_2\psi_2^* & \cdots & \psi_2\psi_n^*\\
\cdots & \cdots & \cdots & \cdots\\
\psi_n\psi_1^* & \psi_n\psi_2^* & \cdots & \psi_n\psi_n^*\\
\end{array}\right)
$$
A: It is easy. Assume that $\psi \in \cal H$ is normalized to $1$. In this case,  $|\psi\rangle\langle\psi|$ it is nothing but the orthogonal projector $P_\psi$ onto the one-dimensional linear space generated by the vector $\psi$.
Putting $|\psi\rangle$ and $\langle\psi|$ together simply means to exploit the tensor product. 
If $\phi' \in \cal H'$ the (topological) dual space of $\cal H$ and $\psi \in \cal H$, it is well defined $\psi \otimes \phi' \in \cal H \otimes \cal H'$ as a (bounded)
linear operator from $\cal H$ to $\cal H$.
When $\psi' \in \cal H'$ is the image of $\psi \in \cal H$ under the Riesz' (anti)-isomorphism which identifies $\cal H$ with $\cal H'$, and $||\psi||=1$, then  $P_\psi :=\psi \otimes \psi' \in \cal H \otimes \cal H'$ is the orthogonal projector onto the closed subspace generated by $\psi$. Another way to write down it is just $|\psi\rangle\langle\psi|$.
