Using the relativistic distribution function, we have derived a new form of the general relativistic virial relation for a spherical structure within an expanding universe based on an exact solution of Einstein equations without any ad hoc assumptions. The results are written in the familiar form known from Newtonian gravity. We then have applied it to the case of static spherically symmetric and asymptotically Minkowskian structure, and also within a static star calculating the mass-temperature relation for a relativistic gas model. To be as realistic as possible, we have also applied our virial relation to a structure within a cosmological expanding background (for the relevance and more exact formulation of such structures at large scales see [1]}, [2]}, [3]}). A new term due to the impact of the expansion of the universe on the structure arise which has been neglected so far in the literature.
