  We introduce the notion of a rank function on a triangulated category
$\mathcal{C}$ which generalizes the Sylvester rank function in the case when
$\mathcal{C}=\operatorname{Perf}(A)$ is the perfect derived category of a ring
$A$. We show that rank functions are closely related to functors into simple
triangulated categories and classify Verdier quotients into simple triangulated
categories in terms of particular rank functions called localizing. If
$\mathcal{C}=\operatorname{Perf}(A)$ as above, localizing rank functions also
classify finite homological epimorphisms from $A$ into differential graded
skew-fields or, more generally, differential graded Artining rings. To
establish these results, we develop the theory of derived localization of
differential graded algebras at thick subcategories of their perfect derived
categories. This is a far-reaching generalization of Cohn's matrix localization
of rings and has independent interest.
