In astrophysics, the Lomb–Scargle method is widely used to analyse time series observations of stellar objects. The method allows us to detect periodic variations in the light intensity of a star, which may be due to its rotation, pulsations or interaction with a companion. In this paper, we describe the mathematical modelling of the Lomb–Scargle method and its applications in astrophysics. The Lomb–Scargle method is based on a spectral analysis of the time series of the star’s light intensity. In particular, it uses a periodogram, a function of the power of the spectrum of the time series, which reflects the contribution of each frequency to the total variance of the series. The periodogram can be obtained from the time series using a Fourier transform.