Jan, it is indeed written into the Constitution and is the Second Amendment behind Freedom of Religeon (IN MY OPINION an indication of how vital the Founders, States, and People felt this right was/is). The problem is, that in a day where things were written, copied, and re-written there exist many different versions all differing in capitalization and punctuation. There are even differences between the drafted and ratified versions.
As adopted by Congress: A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.
As presented to the States, ratified by them, and accepted by Thomas Jefferson (Sec of State): A well regulated militia being necessary to the security of a free state, the right of the people to keep and bear arms shall not be infringed.
Those words have been disected and interpreted in many different ways. Most debate is over the three phrases: "well regulated militia"; "the right of the People"; and "keep and bear arms". These phrases have been debated over and over and various Supreme Courts have ruled on their meaning. The problem is that no one Supreme Court ruling can bind another Court. So one Court can rule that "People" means an individual right and 10years later a second court can rule it means a "collective" right.
The English Bill of Rights dating back to 1689 codified the long held "right of self-defence". It removed the King's (James II) right to disarm his subjects as individuals. The US Supreme Court refered to this passage in a 2008 case involving the interpretation of "People"
IN MY OPINION the Framers of the Constitution were very much concerned with the power of their new government to become as tyranical as the British King had been. As spoken by Mather Byles: "Which is better - to be ruled by one tyrant three thousand miles away or by three thousand tyrants one mile away?"
As written by Alexander Hamilton: If circumstances should at any time oblige the government to form an army of any magnitude, that army can never be formidable to the liberties of the people while there is a large body of citizens, little, if at all, inferior to them in discipline and the use of arms, who stand ready to defend their own rights and those of their fellow-citizens."