In the Debates of the Virginia Convention, volume 3, page 77, Mr. Madison says, speaking of the mode of electing the President:

“As to the eventual voting by States, it has my approbation. The lesser States and some larger States will be generally pleased by that mode. The Deputies from the small States argued, and there is some force in their reasoning, that, when the people voted, the large States evidently had the advantage over the rest, and, without varying the mode, the interests of the little States might be neglected or sacrificed. Here is a compromise. For in the eventual election, the small States will have the advantage.”

Abridgement of the Debates of Congress, from 1789 to 1856, Vol. 3 (of 16) — Part 57

After this view of the constitution, let us inquire, what is the direct object of the proposed alteration in the choice of President?

Abridgement of the Debates of Congress, from 1789 to 1856, Vol. 3 (of 16) — Part 57

To render more practicable and certain the choice by Electors--and for this reason: that the people at large, or in other words, that the great States, ought to have more weight and influence in the choice. That it should be brought nearer to the popular and carried further from the federative principle. This claim we find was made at the formation of the constitution. The great States naturally wished for a popular choice of First Magistrate. This mode was sanctioned by the example of many of the States in the choice of Governor. The small States claimed a choice on the federative principle, by the Legislatures, and to vote by States; analogies and examples were not wanting to sanction this mode of election. A consideration of the weight and influence of a President of this Union, must have multiplied the difficulties of agreeing upon the mode of choice. But as I have before said, by mutual concession, they agreed upon the present mode, combining both principles and dividing between the two parties, thus mutually jealous, as they could, this important privilege of electing a Chief Magistrate.

Abridgement of the Debates of Congress, from 1789 to 1856, Vol. 3 (of 16) — Part 57

This mode then became established, and the right of the small States to elect upon the federative principle, or by States, in case of the contingency of electoral failure of choice, cannot with reason and fairness be taken from them, without their consent, and on a full understanding of its operation; since it was meant to be secured to them by the constitution, and was one of the terms upon which they became members of the present confederacy; and for which privilege they gave an equivalent to the great States in sacrificing so much of the federative principle, or State equality.