  Originally considered for van der Waals fluids and charged black holes [Phys.
Rev. Lett. 123, 071103 (2019)], we extend and generalize our approach to
higher-dimensional charged AdS black holes. Beginning with thermodynamic
fluctuations, we construct the line element of the Ruppeiner geometry and
obtain a universal formula for the scalar curvature $R$. We first review the
thermodynamics of a van der Waals fluid and calculate the coexistence and
spinodal curves. From this we are able to clearly display the phase diagram.
Notwithstanding the invalidity of the equation of state in the coexistence
phase regions, we find that the scalar curvature is always negative for the van
der Waals fluid, indicating that attractive interactions dominate amongst the
fluid microstructures. Along the coexistence curve, the scalar curvature $R$
decreases with temperature, and goes to negative infinity at a critical
temperature. We then numerically study the critical phenomena associated with
the scalar curvature. We next consider four-dimensional charged AdS black
holes. Vanishing of the heat capacity at constant volume yields a divergent
scalar curvature. In order to extract the corresponding information, we define
a new scalar curvature that has behaviour similar to that of a van der Waals
fluid. We analytically confirm that at the critical point of the small/large
black hole phase transition, the scalar curvature has a critical exponent 2,
and $R(1-\tilde{T})^{2}C_{v}=1/8$, the same as that of a van der Waals fluid.
However we also find that the scalar curvature can be positive for the small
charged AdS black hole, implying that repulsive interactions dominate among the
black hole microstructures. We then generalize our study to higher-dimensional
charged AdS black holes.
