A simple and direct derivation of necessary conditions for optimality of output feedback gains for a linear time-invariant system is presented. The dependence of the cost on the initial state

is eliminated by the well-known technique of averaging the initial state over the surface of the

-dimensional unit sphere.