Q:

How can quantum operators be expressed as a matrices?

I have just started quantum mechanics with Shankar. In my understanding, quantum operators are linear operators in infinite-dimensional Hilbert spaces. 
Shankar has repeatedly treated quantum operators as matrices. 
I wonder how it is possible if the space of state vectors is infinite-dimensional.

A:

If the Hilbert space is infinite-dimensional, representing operators in terms of finite matrices is not possible. You can however use cumbersome infinite matrices which are not very useful...  In any case some of the properties of matrices survive the passage to the (separable) infinite-dimensional case, at least dealing with bounded operators.  Sometimes the space is infinite-dimensional because it is the Hilbert tensor product $H\otimes K$, where $K$ is finite-dimensional and $H$ is not. In those cases, operators acting in $K$, thus of the form $I\otimes A$, have the same properties as matrices ($A$). That is the case in quantum information where the qubits are referred to $K$, typically the polarization/spin space of an elementary particle and $H$ is infinite-dimensional, typically a $L^2$ space.

