It is proved that the length of a minimal spanning tree, the length of a St
einer minimal tree, and the Steiner ratio regarded as functions of finite s
ubsets of a connected complete Riemannian manifold have directional derivat
ives in all directions. The derivatives of these functions are calculated a
nd some properties of their critical points are found. In particular, a geo
metric criterion for a finite set to be critical for the Steiner ratio is f
ound. This criterion imposes essential restrictions on the geometry of the
sets for which the Steiner ratio attains its minimum, that is, the sets on
which the Steiner ratio of the boundary set is equal to the Steiner ratio o
f the ambient space.