I usually know how to manipulate bras and kets. But I probably found difficulty because of the double summation. How did Sakurai manage to go from the second line to the ird line in the attachment?
It is equal to 1 if a=a'' and 0 otherwise if we take orthogonality into consideration.. It implies that the summation = 1 when a'' = a' and 0 for all the other summations. Right?