  We show that the free energy $\mathcal{F}$ and temperature $T$ of black
holes, considered as a thermodynamic system, can be viewed as an
$A$-discriminant of an appropriately-defined polynomial. As such, mathematical
results about $A$-discriminants may lead to implications about black hole
thermodynamics. In particular, for static spacetimes with spherical, planar, or
hyperbolic symmetry, the number of distinct thermodynamic phases depend on the
number of distinct terms in the metric component $g_{tt}$. We prove that if
$g_{tt}$ consists of $N_f$ distinct terms, then the $\mathcal{F}$-$T$ curve
consists of $N_f-2$ cusps, which in turn leads to $N_f-1$ distinct
thermodynamic phases. This result is applied to explicit examples of the
Schwarzschild-AdS, Reissner--Nordstr\"{o}m, power-law Maxwell, and
Euler--Heisenberg black holes.
