Hamiltonian matrix written in a certain basis If I have a matrix H=$\left( \begin{array}{cc}
0 & b  \\
d & 0  \\ \end{array} \right)$ writen in the basis |1>=$\left( \begin{array}{c}
\frac{1}{\sqrt{2}}    \\
-\frac{1}{\sqrt{2}}   \\ \end{array} \right)$ and |2>=$\left( \begin{array}{c}
\frac{1}{\sqrt{2}}    \\
\frac{1}{\sqrt{2}}   \\ \end{array} \right)$ shouldn't the following be true: <1|H|1>=0 and <2|H|2>=0? Since they are the matrix elements. But if i calculate them directly by matrices multiplication i get the other element b and d. Where am i wrong? Thank you in advance.
 A: It sounds like you just need to make a distinction between the idea that the vector $|1\rangle$ has components (call them A-coordinates) $\begin{pmatrix}1\\0\end{pmatrix}$ in one set of coordinates, and components $\sqrt{\frac12} \begin{pmatrix}1\\-1\end{pmatrix}$ in a different set of coordinates (call them B-coordinates). Your attempt to write $\begin{pmatrix}0&b\\d&0\end{pmatrix}\begin{pmatrix}1\\-1\end{pmatrix}$ therefore doesn't calculate anything that you care about, because it is trying to multiply the A-coordinate representation for $H$ with the B-coordinate representation for $|1\rangle$ without a coordinate-change matrix between them.
We know that the transform from A-coordinates to B-coordinates is just given by adjoining your two vectors side-by-side:$$C_{BA} = \sqrt{\frac12} \begin{pmatrix}1&1\\-1&1\end{pmatrix},$$ to confirm this just multiply by the $|1\rangle$ and $|2\rangle$ vectors in A-coordinates and you'll get the corresponding right answers in B-coordinates. The 2x2 matrix inverse formula can then give you the inverse matrix, $$C_{AB} = \sqrt{\frac12} \begin{pmatrix}1&-1\\1&1\end{pmatrix}.$$
Given your expression for $\hat H$ in A-coordinates, call it $H_A = \begin{pmatrix}0&b\\d&0\end{pmatrix}$, the correct expression for $\hat H$ in B-coordinates is "transform to A-coordinates, perform $H_A$, transform back," or:$$H_B = C_{BA} ~ H_A ~ C_{AB}.$$ Calculate this matrix and you should get the right answers in the B-coordinates.
A: Your reasoning for why $<1|H|1>=0$ and $<2|H|2>=0$ should be true only works for: 
$ |1>=\left( \begin{array}{c} 1  \\0   \\ \end{array} \right)$ and $|2>=\left( \begin{array}{c} 0  \\1   \\ \end{array} \right)$. Because then the matrix multiplication will indeed give you the zero cells. No reason for it to hold in other bases.
A: It appears you don't understand the concept of coordinates being based on the basis you choose. And also the H you gave is ambiguous. Is it in the "f" basis, or the "e" basis? (see below)
$|1>_{f}$ = $ \begin{pmatrix} \frac{1}{\sqrt{2}}\\  \frac{-1}{\sqrt{2}} \end{pmatrix}_{e} $ and not $|1>_{f}$ = $ \begin{pmatrix} 1 \\  0 \end{pmatrix}_{e} $
So, assuming that your H is in the "e" basis:
<1|H|1> = $ \begin{pmatrix} \frac{1}{\sqrt{2}}  \frac{-1}{\sqrt{2}} \end{pmatrix}_{e} $ $  \begin{pmatrix} 0 & b\\ d & 0 \end{pmatrix}_{e} $$ \begin{pmatrix} \frac{1}{\sqrt{2}}\\  \frac{-1}{\sqrt{2}} \end{pmatrix}_{e} =  $ ... do at least this part yourself
Similarly, 
<2|H|2> = $ \begin{pmatrix} \frac{1}{\sqrt{2}}  \frac{1}{\sqrt{2}} \end{pmatrix}_{e} $ $  \begin{pmatrix} 0 & b\\ d & 0 \end{pmatrix}_{e} $$ \begin{pmatrix} \frac{1}{\sqrt{2}}\\  \frac{1}{\sqrt{2}} \end{pmatrix}_{e} $ = ... do at least this part yourself

Note:
<1|H|2> = $ \begin{pmatrix} \frac{1}{\sqrt{2}}  \frac{-1}{\sqrt{2}} \end{pmatrix}_{e} $ $  \begin{pmatrix} 0 & b\\ d & 0 \end{pmatrix}_{e} $$ \begin{pmatrix} \frac{1}{\sqrt{2}}\\  \frac{1}{\sqrt{2}} \end{pmatrix}_{e} $
and you can figure out <2|H|1> similarly.

Otherwise, if you gave H in the "f" basis, then yes, <1|H|1> = 0.
