A geometrical description of the virial theorem (VT) of statistical mechanics is presented using the symplectic formalism. The character of the Clausius virial function is determined for second-order differential equations of the Liénard type. The explicit dependence of the virial function on the Jacobi last multiplier is illustrated. The latter displays a dual role, namely, as a position-dependent mass term and as an appropriate measure in the geometrical context.