# Matrix Representation of Operators (Finite Dimension)

This one is stumping my novice understanding. Can a (quantum mechanical) operator be represented by a matrix of finite dimension? How would one prove that this is (or is not) the case?

Beyond that I am asked about specifically the position operator $\hat{x}=x$ and the momentum operator $\hat{p}_x=-i\hbar\frac{\partial}{\partial x}$. An additional hint is given to consider the properties of matrix traces.

The position and momentum operators $\hat{x}$ and $\hat{p}$ cannot be represented in finite dimensions as in finite dimensions $Tr(\hat{x}\hat{p})=Tr(\hat{p}\hat{x})$, so $Tr(\hat{x}\hat{p}-\hat{p}\hat{x})=0\neq Tr(i\hbar I_n)=i\hbar n$