# What operator gives the mass of a particle?

Talking about why a particle and its antiparticle have the same mass, my professor said the Hamiltonian commutes with TCP, so mass is conserved. I don't understand that.

The operator associated with the mass is $P^2$. Say, for example, you have a single particle state $|\mathbf{k}\rangle$, this is an eigenvector of $P^2$ with eigenvalue $m^2$, the mass (squared) of the particle.
The identity that you want to obtain comes indeed from the fact that $H$ commutes with $\mathsf{CPT}$. In the rest frame, in fact, $m= \langle\mathbf{k}|H|\mathbf{k}\rangle$. If you then act with $(\mathsf{CPT})^{-1}(\mathsf{CPT})$ on both sides of $H$, you find the same mass $m$ for the $\mathsf{CPT}$-conjugate of your single-particle state.