The eigenvalues of a self-adjoint nxn matrix A can be put into a decreasing sequence $\lambda=(\lambda_1,\dots,\lambda_n)$, with repetitions according to multiplicity, and the diagonal of A is a point of $R^n$ that bears some relation to $\lambda$. The Schur-Horn theorem characterizes that relation in terms of a system of linear inequalities. We give a new proof of the latter result for positive trace-class operators on infinite dimensional Hilbert spaces, generalizing results of one of us on the diagonals of projections. We also establish an appropriate counterpart of the Schur inequalities that relate spectral properties of self-adjoint operators in $II_1$ factors to their images under a conditional expectation onto a maximal abelian subalgebra.