This article proposes a method for constructing the luminosity function of galaxies, which gives a result that is consistent with other methods, is as accurate as other methods, and is simple. Using this method, we constructed the luminosity function of Arakelian galaxies with different morphological types in different environments, included in the CfA2 catalog. The proposed method of identifying groups of galaxies is physically grounded and simple. It was found that both the bright and weak parts of the normalized luminosity function of Arakelian galaxies are higher than the bright and weak parts of the similar function of the total sample CfA2. A similar phenomenon is observed separately for members of groups, as well as for single galaxies. This also applies to small groups with 2 or 3 galaxies, and more populated groups. Spiral galaxies obey these laws. For elliptical galaxies, the picture is not very clear (due to the small number of well-known elliptical Arakelian galaxies). The spatial density of the number of ArG in the M≤-17 range is 0.00068 ± 0.00005 Mpc^-3, which corresponds to 2.7% of the entire sample in this range (for CfA2 (M≤-17) = 0.0254 ± 0.0002 Mpc^-3).