The first law of black hole mechanics is derived from the Einstein-Maxwell
(EM) Lagrangian by comparing two infinitesimally nearby stationary black holes.
With similar arguments, the first law of black hole mechanics in
Einstein-Yang-Mills (EYM) theory is also derived.Comment: Modified version, major changes made in the introduction. 14 pages,
no figur