We have the linear operator $\mathcal{O}$ acting on an arbitrary vector $\vec{a}$ which can be written in terms of the set of orthonormal basis vectors {$\vec{e_i}$}: $\vec{a} = \sum\limits_i \vec{e_i} a_i$. It is also given that
\begin{equation} \mathcal{O} \vec{e_i} = \sum\limits_j \vec{e_j} O_{ji} \end{equation}
Now, show that $O_{ji} = \vec{e_i} \cdot \mathcal{O}\vec{e_j} $
I can "show" this just substituting into the centered equation above and using the completeness relation., but that is not the same as deriving it from basic relations. How to proceed?