I'm having trouble seeing how an operator can be written in matrix representation. In Sakurai, for an operator X, we have: X = [itex]\sum[/itex] [itex]\sum[/itex] |a''> <a''| X |a'> <a'| since of course [itex]\sum[/itex] |a> <a| is equal to one. Somehow, this all gets multiplied out and you get a square matrix with the elements of form <a''| X |a'> ... where a'' correspond with rows and a' columns. For the part at the middle of the expression for X at the top, which is just an inner product, and hence a number, we can move it through the rest of the expression. So then, we can just work out [itex]\sum[/itex] [itex]\sum[/itex] |a''> <a'| ( an outer product) which will be a square matrix, and multiply each element of this matrix by the corresponding number from the inner product. But when working out this matrix, it turns out to be a diagonal matrix if we are talking about orthogonal eigenvectors (Sakurai has elements off the diagonal?). What's more, how do we interpret multiplication of two state functions? Since the bras and kets are nothing more that column and row matrix representations of the state functions, and we are not talking about inner products here (which would be zero of course), just normal multiplication, I don't know how to interpret simply multiplying two state functions together. Anyway, I cant get out what Sakurai has written out nicely. Anyone care to show me how to work out the expression at the very top? Thanks!