How to write the position and momentum operators in matrix form for the Infinite Square Well? [closed]

I am having difficulty getting the operators: $$\hat{x}, \hat{p}, \hat{x} ^{2}$$ in matrix form for the Infinite Square Well problem.

Any help on this?

• You haven’t shown what you have tried. Have you tried to calculate the matrix elements of these operators using the energy eigenfunctions in the position basis? Commented Oct 11, 2022 at 3:40
• @Ghoster All I know is how to get that for the harmonic oscillator. but couldn't figure out how to do it for infinite well. For hours trying and searching, but no luck. Commented Oct 11, 2022 at 3:56
• $x_{mn}=\langle m|x|n\rangle=\int \psi_m(x)^*\,x\,\psi_n(x)\,dx$. Do the integral. Commented Oct 11, 2022 at 4:24

Intuitively, this corresponds to the fact that the ideal projective measurement $$\hat{x}$$ can take infinitely many values. This is in sharp contrast to the qubit (two-level) system where you only have two (finite!) possibilities as the measurement outcome. That is basically the reason why you can have a (finite dimension) matrix representation of the operators for qubit systems.
Here, because of the infinite possibility you have, the matrix representation (if you insist) would need to have infinite dimension as well. That is not really a well-defined concept unless you use more sophisticated mathematics like $$C^*$$-algebra. You would need to deal with commutation relations ($$[\hat{x},\hat{p}]=i\hbar$$) that cannot be achieved with finite-dimensional matrices.