Clusters of galaxies are mainly formed by merging of smaller structures, according to the standard cosmological scenario. If the mass of a substructure is ≳10 per cent of that of a galaxy cluster, the temperature distribution of the intracluster medium (ICM) in a merging cluster becomes inhomogeneous. Various methods have been used to derive the two-dimensional projected temperature distribution of the ICM. However, methods for studying temperature distribution along the line of sight through the cluster were absent. In this Letter, we present the first measurement of the temperature standard deviation along the line of sight, using as a reference case the multifrequency Sunyaev–Zel’dovich measurements of the Bullet Cluster. We find that the value of the temperature standard deviation is high and equals to (10.6 ± 3.8) keV in the Bullet Cluster. This result shows that the temperature distribution in the Bullet Cluster is strongly inhomogeneous along the line of sight and provides a new method for studying galaxy clusters in depth.