In my book ''Ncert Class 12" It is written
We begin by considering the collision of one molecule with one of the walls of the container, oriented with a unit normal vector pointing out of the container in the positive $ˆi$-direction. Suppose the molecule has mass m and is moving with velocity $v=vxˆi+vyˆj+vzˆk$. Because the collision with the wall is elastic, the $y$-and $z$-components of the velocity of the molecule remain constant and the $x$-component of the velocity changes sign (Figure 29.2), resulting in a change of momentum of the gas molecule.
I can't understand why this thing will get due to elastic collision. How should I use conservation of kinetic energy and conservation of momentum?