# Basis and dual basis in the Dirac notations

In the book An Introduction to Tensors and Group Theory for Physicists by Nadir Jeevanjee, 2nd edition, the author introduced a 'Dirac dictionary':

(left standard notation and right Dirac notation)

$$T_i^j e^i \otimes e_j$$ relates to $$\sum_{ij} T_{ij} | j \rangle \langle i |$$ (I forgot $$\sum_{ij}$$ in the book previously, editted)

It seems $$e^i$$ belongs to bra and $$e_j$$ belones to ket. But, I can upper/lower indices by the metric tensor, e.g., $$e^i g_{ij} = e_j$$. It looks weird to me if the contraction with the metric tensor will change bra to ket, as $$\langle i| g_{ij} = |j \rangle$$.

Could the Dirac dictionary be written as, $$\sum_{ij} T_i^j e^i \otimes e_j$$ relates to $$T_{ij} | e_j \rangle \langle e_i |$$ and allow $$|e^j \rangle$$ and $$|e^i\rangle$$? Thus, $$e^i g_{ij} = e_j$$ may be related to $$\langle e_i| g_{ij} = \langle e^j |$$? Looks better to me.

Let us start at the beginning. In Einstein notation, we must fix a distinguished basis and the basis vectors are usually called $$e_i$$. In Dirac notation, we usually don't think of any basis as distinguished, but we may write the vector $$e_i$$ as $$|e_i\rangle$$ or just $$|i\rangle$$. Dirac notation only works if the space is equipped with an inner product, which I will for now write as $$(e_i, e_j)$$ or $$(|i\rangle, |j\rangle)$$. In the context where Einstein notation is used, the inner product is usually called the metric and written as $$g_{ij} = (e_i, e_j)$$.
The next step is to talk about the dual space, which is defined as the space of linear maps from the vector space to $$\mathbb C$$. It is isomorphic to the vector space, which means that we can identify each dual vector with a "regular" vector. However, there is no canonical isomorphism, i.e., no default choice of this identification. Fixing a basis provides one such identification: in Einstein notation, we define the dual basis vectors $$e^i$$ to be the linear maps satisfying $$e^i(e_j) = \delta^i_j$$. Fixing an inner product provides another such identification: in Dirac notation, we define the dual vectors $$\langle e_i|$$ such that $$\langle e_i| \bigl( |e_j\rangle \bigr) = (|e_i\rangle, |e_j\rangle) = g_{ij}$$. For convenience, we write that as $$\langle e_i | e_j \rangle$$ or just $$\langle i | j \rangle$$. Note that a notation $$\langle e^i|$$ does not make sense since $$\langle v|$$ denotes the dual vector of the regular vector $$v$$, but $$e^i$$ is not a regular vector.
What we have seen is that $$\langle i|$$ and $$e^i$$ are both dual vectors but in general not the same, since $$\langle i | j\rangle = g_{ij}$$ and $$e^i(e_j) = \delta^i_j$$. The "dictionary" therefore only works for an orthonormal basis where $$g_{ij} = \delta^i_j$$ and the position of upper/lower indices does not make a difference.
With this caveat, $$T^j_i$$ is the same as $$T_{ij}$$ and $$e^i$$ the same as $$\langle i|$$, therefore $$T^j_i e^i \otimes e_j = \sum_{ij} T_{ij} |j \rangle \langle i|$$. (It is not a good idea to leave out the sums in Dirac notation.) In Dirac notation, we would often just write $$\langle j | T | i \rangle$$ instead of $$T_{ij}$$.
Finally, I get to your $$e^i g_{ij} = e_j$$. Careful: that is not correct! On the left hand side, you have a dual vector; on the right hand side there is a regular vector. They can thus never be equal. The metric tensor can only be used to raise/lower the indices of components to convert between a vector and its dual (using the isomorphism provided by the metric, not the one provided by the dual basis!). To the vector $$v = v^i e_i$$ we associate the dual vector $$v^\flat = v_i e^i$$ with $$v_i = g_{ij} v^j$$. It is a useful exercise to show that $$v^\flat(w) = g_{ij} v^j w^i$$ using $$e^i(e_k) = \delta^i_k$$. (If the basis is not orthonormal, the bra $$\langle i|$$ thus corresponds to $$e_i^\flat$$ and not to $$e^i$$!) I hope that solves your remaining questions.
• Thanks. Actually the book used $\sum_{ij} T_{ij} | j \rangle \langle i|$, I forgot to add the summation symbol. Will edit in the question. Commented Jan 28, 2022 at 15:06