Relationship between quantum projector operator and projection of vectors In quantum mechanics, we define the projector operator 
$$\hat{P} = |\psi\rangle\langle\psi|$$
And we say that the action of this operator $\hat{P}$ over a ket $|\phi\rangle$ gives us the projection of this ket $|\phi\rangle$ over the ket $|\psi\rangle$ of the operator:
$$\hat{P}|\phi\rangle = |\psi\rangle\langle\psi|\phi\rangle$$
On the other hand, we define the projection of a vector $\vec a$ over a vector $\vec b$ this way:
$$\operatorname{proj}_{\vec b}\vec a = \frac {\vec a\cdot \vec b}{\|\vec b\|^2}$$
Do both operations have a similar sense?
 A: Yes, they are similar, but you want the vector projection:
$$\operatorname{proj}_{\mathbf b}\mathbf a = \frac {\mathbf a\cdot \mathbf b}{\|\mathbf b\|^2}\mathbf b=\hat{\mathbf b}(\hat{\mathbf b}\cdot\mathbf a)$$
Then the analogy becomes easy to see. Replace $\mathbf a$ with $|\phi\rangle$, $\hat{\mathbf b}$ with $|\psi\rangle$, and the dot product with the inner product. Then you get
$$\hat{P}|\phi\rangle = |\psi\rangle\langle\psi|\phi\rangle$$
In either case, the projection gives you a new vector in the direction of the vector you are taking the projection operation with respect to, and it's magnitude tells you "how much" of the projection vector ($|\psi\rangle$ or $\hat{\mathbf b}$) was "in" your original vector ($|\phi\rangle$ or $\mathbf a$).
A: $\boldsymbol{\S\:} \textbf{A. Projection of vectors in }\mathbb{R}^{3}$ 

Let a unit vector $\;\mathbf{n}\boldsymbol{=}(\rm n_1,n_2,n_3)\,, \Vert\mathbf{n}\Vert\boldsymbol{=}1$. Any vector $\;\mathbf{x}\boldsymbol{=}( x_1,x_2,x_3)\;$ could be decomposed in two components with respect to $\;\mathbf{n}$
\begin{equation}
   \mathbf{x}\boldsymbol{=}\mathbf{x}_{\boldsymbol{\|}}\boldsymbol{+}\mathbf{x}_{\boldsymbol{\bot}}
   \tag{A-01}\label{A-01}
\end{equation} 
one parallel and the other normal to the $\:\mathbf{n-}$axis respectively
\begin{align}
   \mathbf{x}_{\boldsymbol{\|}} &\boldsymbol{=}\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{x}\right)\mathbf{n}\boldsymbol{=}\mathbf{n}\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{x}\right)\stackrel{\textbf{def}}{\boldsymbol{\equiv\!\!\equiv}}\mathrm P_{\!\rm n}\,\mathbf{x} 
   \tag{A-02.1}\label{A-02.1}\\
   \mathbf{x}_{\boldsymbol{\bot}} & \boldsymbol{=}\left(\mathbf{n}\boldsymbol{\times}\mathbf{x}\right)\boldsymbol{\times}\mathbf{n}\boldsymbol{=} \mathbf{x}\boldsymbol{-}(\mathbf{n}\boldsymbol{\cdot}\mathbf{x})\mathbf{n}\boldsymbol{=}\left(\mathrm I\boldsymbol{-}\mathrm P_{\!\rm n}\right)\mathbf{x}
   \tag{A-02.2}\label{A-02.2}
\end{align}
that is
\begin{equation}
   \mathbf{x}=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{x}\right)\mathbf{n}+\left(\mathbf{n}\boldsymbol{\times}\mathbf{x}\right)\boldsymbol{\times} \mathbf{n}
   \tag{A-03}\label{A-03}
\end{equation}
see Figure-01.
For the linear transformation $\:\mathrm P_{\!\rm n}\,$, the projection of real 3-vectors on the $\:\mathbf{n-}$axis, we have
\begin{equation}
   \mathrm P_{\!\rm n}\,\mathbf{x}\boldsymbol{=}\mathbf{n}\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{x}\right)\boldsymbol{=}
\begin{bmatrix}
\rm n_1 \\
\rm n_2 \vphantom{\dfrac{a}{b}}\\
\rm n_3 
\end{bmatrix}
\begin{bmatrix}
\rm n_1 & \rm n_2 & \rm n_3 \vphantom{\dfrac{a}{b}}
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2 \vphantom{\dfrac{a}{b}}\\
x_3 
\end{bmatrix}
\boldsymbol{=}
\begin{bmatrix}
\rm n^2_1 & \rm n_1 n_2 & \rm n_1 n_3\\
\rm n_2 n_1 & \rm n^2_2 & \rm n_2 n_3 \vphantom{\dfrac{a}{b}}\\
\rm n_3 n_1 & \rm n_3 n_2 & \rm n^2_3
\end{bmatrix}
\begin{bmatrix}
x_1 \\
x_2 \vphantom{\dfrac{a}{b}}\\
x_3 
\end{bmatrix}
   \tag{A-04}\label{A-04}
\end{equation}
so
\begin{equation}
      \mathrm P_{\!\rm n}\boldsymbol{=}
\begin{bmatrix}
\rm n_1 \\
\rm n_2 \vphantom{\dfrac{a}{b}}\\
\rm n_3 
\end{bmatrix}
\begin{bmatrix}
\rm n_1 & \rm n_2 & \rm n_3 \vphantom{\dfrac{a}{b}}
\end{bmatrix}
\boldsymbol{=}
\begin{bmatrix}
\rm n^2_1 & \rm n_1 n_2 & \rm n_1 n_3\\
\rm n_2 n_1 & \rm n^2_2 & \rm n_2 n_3 \vphantom{\dfrac{a}{b}}\\
\rm n_3 n_1 & \rm n_3 n_2 & \rm n^2_3
\end{bmatrix}
 \tag{A-05}\label{A-05}
\end{equation}
To make a connection with the symbols used in $\boldsymbol{\S\:}\textbf{B}$ we define
\begin{equation}
  \boldsymbol{|}\rm n\boldsymbol{\rangle}\boldsymbol{\equiv}\begin{bmatrix}
\rm n_1 \\
\rm n_2 \vphantom{\dfrac{a}{b}}\\
\rm n_3 
\end{bmatrix}\,,\quad \boldsymbol{\langle}\rm n\boldsymbol{|}\boldsymbol{\equiv}
\begin{bmatrix}
\rm n_1 & \rm n_2 & \rm n_3 \vphantom{\dfrac{a}{b}}
\end{bmatrix}
   \tag{A-06}\label{A-06}
\end{equation}
so that equation \eqref{A-05}  yields
\begin{equation}
\boxed{\:\:   \mathrm P_{\!\rm n}\boldsymbol{=}\boldsymbol{|}\rm n\boldsymbol{\rangle}\boldsymbol{\langle}\rm n\boldsymbol{|}\vphantom{\dfrac{a}{b}}\:\:}
   \tag{A-07}\label{A-07}
\end{equation}
For the projection on the axis of a (not necessarily unit) vector $\;\mathbf{a}\boldsymbol{=}(\rm a_1,a_2,a_3)\:$ we have
\begin{equation}
\boxed{\:\:\:\mathrm P_{\!\rm a}\boldsymbol{=}\dfrac{\boldsymbol{|}\rm a\boldsymbol{\rangle}\boldsymbol{\langle}\rm a\boldsymbol{|}}{\boldsymbol{\Vert}\mathbf{a}\boldsymbol{\Vert}^2} \boldsymbol{=} \left |\dfrac{\mathbf{a}}{\boldsymbol{\Vert}\mathbf{a}\boldsymbol{\Vert}}\right\rangle\left\langle\dfrac{\mathbf{a}}{\boldsymbol{\Vert}\mathbf{a}\boldsymbol{\Vert}}\right |\boldsymbol{=}  \dfrac{\boldsymbol{|}\rm a\boldsymbol{\rangle}\boldsymbol{\langle}\rm a\boldsymbol{|}}{\boldsymbol{\langle}\rm a \boldsymbol{|}\rm a\boldsymbol{\rangle}}\vphantom{\dfrac{\dfrac{a}{b}}{\dfrac{a}{b}}}\:\:\:}  
   \tag{A-08}\label{A-08}  
\end{equation} 
where
\begin{equation}
  \boldsymbol{|}\rm a\boldsymbol{\rangle}\boldsymbol{\equiv}\begin{bmatrix}
\rm a_1 \\
\rm a_2 \vphantom{\dfrac{a}{b}}\\
\rm a_3 
\end{bmatrix}\,,\quad \boldsymbol{\langle}\rm a\boldsymbol{|}\boldsymbol{\equiv}
\begin{bmatrix}
\rm a_1 & \rm a_2 & \rm a_3 \vphantom{\dfrac{a}{b}}
\end{bmatrix}
   \tag{A-09}\label{A-09}
\end{equation}
$\boldsymbol{\S\:}\textbf{B. Projection of states in their Hilbert space }\mathbb{H}$
In analogy with the projection of vectors in $\boldsymbol{\S\:}\textbf{A}$ let a normalized state $\:\psi\:$, $\:\boldsymbol{\Vert}\psi\boldsymbol{\Vert}^2\boldsymbol{=}\boldsymbol{\langle}\psi\boldsymbol{|}\psi\boldsymbol{\rangle}\boldsymbol{=}1$. Any state $\:\phi\:$ could be projected on the $\:\psi\boldsymbol{-}$ray
\begin{equation}
   \phi_{\boldsymbol{\|}} \boldsymbol{=}\boldsymbol{\langle}\psi\boldsymbol{|}\phi\boldsymbol{\rangle}\boldsymbol{|}\psi\boldsymbol{\rangle}\boldsymbol{=}\boldsymbol{|}\psi\boldsymbol{\rangle}\boldsymbol{\langle}\psi\boldsymbol{|}\phi\boldsymbol{\rangle}\stackrel{\textbf{def}}{\boldsymbol{\equiv\!\!\equiv}}\mathrm P_{\! \psi}\,\boldsymbol{|}\phi\boldsymbol{\rangle}
   \tag{B-01}\label{B-01} 
\end{equation}
so that
\begin{equation}
\boxed{\:\:\mathrm P_{\! \psi}\boldsymbol{=}\boldsymbol{|}\psi\boldsymbol{\rangle}\boldsymbol{\langle}\psi\boldsymbol{|}\,, \quad \boldsymbol{\Vert}\psi\boldsymbol{\Vert}^2\boldsymbol{=}\boldsymbol{\langle}\psi\boldsymbol{|}\psi\boldsymbol{\rangle}\boldsymbol{=}1\vphantom{\dfrac{a}{b}}\:\:} 
   \tag{B-02}\label{B-02}
\end{equation}
If $\:\psi\:$ is not normalized then
\begin{equation}
\boxed{\:\:\:\mathrm P_{\! \psi}\boldsymbol{=}\dfrac{\boldsymbol{|}\psi\boldsymbol{\rangle}\boldsymbol{\langle}\psi\boldsymbol{|}}{\boldsymbol{\Vert}\psi\boldsymbol{\Vert}^2} \boldsymbol{=}\left |\dfrac{\psi}{\boldsymbol{\Vert}\psi\boldsymbol{\Vert}}\right\rangle\left\langle\dfrac{\psi}{\boldsymbol{\Vert}\psi\boldsymbol{\Vert}}\right |\boldsymbol{=}\dfrac{\boldsymbol{|}\psi\boldsymbol{\rangle}\boldsymbol{\langle}\psi\boldsymbol{|}}{\boldsymbol{\langle}\psi\boldsymbol{|}\psi\boldsymbol{\rangle}}\vphantom{\dfrac{\dfrac{a}{b}}{\dfrac{a}{b}}}\:\:\:} 
   \tag{B-03}\label{B-03}
\end{equation}
