SonyaB

From the definition of work, explain why only the vertical height of the stairs is measured.

$W = \int\limits { \vec F} \, \boldsymbol{\cdot} d \vec x$ Work is an integral of a dot product of two vectors. The dot product only counts the amount of force, that is applied in the direction of the displacement. In the case of gravity, it acts vertically only. The only displacement that matters, is the vertical part of the movement, which is given by measuring the height of the stairs.