Temperature and its relationship with the kinetic energy of molecules