For the canonical commutation relation $[\hat{x},\hat{p}]=i\hbar\hat{\mathbb{1}}$ to be true, the operators $\hat{x}$ and $\hat{p}$ are to be described by infinite dimensional matrices only, cf. e.g. this Phys.SE post. Consequently other operators representing physical quantities must also be of infinite dimension (when represented in discrete base). But the matrix for total angular momentum squared $J^2$ turns out to be finite-dimensional in some cases. I know this happens because $j$ is bounded and finite, so we need $2m+1$ dimensional matrices to describe $J$ (or if talking about spin, if it is a spin-1 particle, 3x3 matrix for $S^2$). And not only $J^2$ or $S^2$, I have seen problems where Hamiltonian $H$ is being represented by finite dimensional matrices (2 level systems or other similar restricted energy spectrum). Does the finite dimensional nature of matrix representation of these operators somehow violate the commutation relation? If not (I hope this is true), how are the dimensions of these operators consistent?
1 Answers
I think the confusion arises because, while the Hilbert space of states is often infinite dimensional, this space decomposes into a sum of $J$-invariant subspaces (cf. Peter-Weyl theorem). The commutation relations holds in every subspace.
There will be some $L$ subspaces that are infinite-dimensional, but those rarely rarely appear in practical problems.
For instance, the largest $L$-value of hydrogen atom eigenstates $L= n-1$ so that, unless one works with arbitrary large $n$'s and thus arbitrary small energy differences one need not consider very very very large values of $L$ (on which the commutation relations would hold anyways).
Another example would be the $3D$ harmonic oscillator, where the possible value of $L$ go as $L,L-2,L-4,\ldots$ until one reaches $0$ or $1$. Again, unless one is interested in states of arbitrary large energies, only finite values of $L$ will appear and the commutation relations will hold on all the subspaces.

- 45,515
-
Though not exactly what I was asking,this is a valid reasoning and a good one too...Accepting it with a +1! – Manas Dogra May 17 '20 at 17:26
-
@ManasDogra One effect of working with energy and angular momenta as a good quantum number is precisely that it usually allows one to truncate the Hilbert space from an infinite-dimensional one to a finite dimensional one (albeit sometimes large). The skill is in truncating to a physically meaningful finite dimensional subspace that will include all the physics of interest. Of course if you technically require the computation of the commutator of $x$ and $p$, you can so either symbolically or by using very very large matrices where the commutator will only approximately be $i\hbar$. – ZeroTheHero May 17 '20 at 17:43
This is done in a lot of books,including Exploring Quantum Mechanics by Galitski Karnakov,Kogan,Galitski, Jr.
– Manas Dogra May 17 '20 at 17:14