"Besides the advantage of being armed, which the Americans possess over the people of almost every other nation, the existence of subordinate governments, to which the people are attached, and by which the militia officers are appointed, forms a barrier against the enterprises of ambition, more insurmountable than any which a simple government of any form can admit of. Notwithstanding the military establishments in the several kingdoms of Europe, which are carried as far as the public resources will bear, the governments are afraid to trust the people with arms." (emphasis supplied).
For Americans of that era, the effectiveness of a well-armed populace as an essential guarantee of freedom was a self-evident lesson of the Revolution. Without the American people being armed, there could not have been a Revolution, or at least not a successful one.
As it was, the lack of a Bill of Rights was a potent criticism by opponents of the proposed Constitution, with a guarantee of the right to keep and bear arms frequently cited as needed. To secure ratification, leading advocates agree to offer a bill of rights in the first Congress under the Constitution.
As proposed and adopted, the bill of rights therefore included a guarantee of the right of the people to keep and bear arms. In that manner, Madison's reasoning and popular opinion of the time was incorporated into the bill of rights.
Hamilton rocks the subject around 30 or 32.