Its evolution can be traced to a certain extent to a fortuitous accident. In the mid-17th century irregular conflicts of rural France, the peasants of the Southern French town of Bayonne, having run out of powder and shot, rammed their long-bladed hunting knives into the muzzles of their primitive muskets to fashion impromptu spears, and by necessity created an ancillary weapon that was to influence Western European infantry tactics until the early 20th century.
The benefit of such a dual-purpose arm contained in one was soon apparent. The early muskets fired at a slow rate (about a round per minute when loading with loose powder and ball), and were unreliable. Bayonets provided a useful addition to the weapon-system when an enemy charging to contact could cross the musket's killing ground (a range of approx 100 yards/metres at the most optimistic) at the expense of perhaps only one volley from their waiting opponents. A foot long bayonet (extending to a regulation 17 inches (approx 43 centimetres) during the Napoleonic period, on a 6 foot (almost 2 meter) tall musket achieved a reach similar to the infantry spear, and later halberd, of earlier times.
Early bayonets were of the "plug" type. The bayonet had a round handle that fit directly into the musket barrel. This naturally prevented the gun from being fired.
Later "socket" bayonets offset the blade from the muzzle. The bayonet attached over the outside of the barrel with a ring-shaped socket, secured on later models by a spring-loaded catch on the muzzle of the musket barrel.
Many socket bayonets were triangular in order to provide sideways stability of the blade without much increase in weight. This design of bayonet did not include a handle to use the blade apart from the gun.
18th and 19th century military tactics included various massed bayonet charges and defences. The British Army was particularly known for its bayonet use, although towards the early 19th century and the flowering of Napoleonic warfare, the primacy of regular and speedy volley-fire saw the British eclipse their opponents in line to line infantry combat.
There are rumours among old (pre-World War I) soldiers of exotic bayonet techniques, almost as complex and involved as sword-fighting. Supposedly, rather than just the modern simplified blocks and thrusts, there were also cuts, counters and disarms, in which a sliding block would lead to an attack or disarmament. Supposedly, these techniques also taught use of edge and point, and special vulnerabilities such as wrists, ankles, neck, brachial and femoral arteries. Further, all types of moves are said to have been practised in every orientation, and relative position of the two fighters' weapons, in training methods similar to advanced sword-fighting. These techniques were possible because of the long periods of continued training of the professional armies before this period. Some old French training manuals from the 1850s survive to the present day and scans of them posted online do appear to support this contention.
In the Geneva Accords on Humane Warfare , triangular and cross-sectional bayonets were outlawed because the wounds they produce do not close easily, and were said to be inhumane, though such designs are, despite this, not uncommon even today.
Most modern bayonets have a fuller (visible on the top half of the blade shown above), which is a concave depression in the blade designed to reduce the weight and increase the stiffness of the blade; it also allows air into the wound it produces, breaking the vacuum and making the bayonet easier to withdraw after a stabbing attack with it and less prone to getting stuck in the wound.
(Actually the above is partially false. There is no "vacuum" effect. A fuller serves to lighten and stiffen the blade but has no effect on the ease with which is can be removed from a body. See http://www.agrussell.com/knife_information/knife_encyclopedia/articles/blood_groove.html for a more detailed discussion. Hopefully someone with more Wikipedia savvy than I will clean this up and put the link in an appropriate external links section.)
Even in modern warfare, bayonets are still used as weapons because, although most combat occurs at a distance, troops are always required to close with an enemy to "mop-up". A bayonet also remains useful as a utility knife, and as an aid to combat morale. Despite the limitations of the bayonet, it is still issued in most armies and most armies still train with them. The modern sawback U.S. M9 Bayonet, officially adopted in 1984, is issued with a special sheath designed to double as a wire cutter. Some production runs of the M9 have a fuller and some do not, depending upon which contractor manufactured that batch and what the military specs were at the time. The M9 Bayonet replaces the M7 Bayonet of the 1960s, though in US Marine Corps use, the Ka-bar fighting knife of WWII is still issued. As of summer 2004, the US Marine Corps is also issuing small quantities of new bayonets of a different design from the M9, with an 8" Bowie knife-style blade and no fuller, manufactured by Ontario Knife Company of Ontario, New York.
Modern bayonets are often knife-shaped with handle s and a socket, or permanently attached to the rifle as with the SKS. Depending on where and when a specific SKS was manufactured, it may have a permanently attached bayonet with a knife-shaped blade (Russian, Romanian, Yugoslavian, early Chinese), or a cruciform (late Chinese) or triangular (Albanian) spike-style bayonet of the type outlawed by the Geneva Accords, or no bayonet at all.
The push-twist motion of fastening the modern bayonet has given name to several connectors and contacts including the bayonet-fitting light bulb that is standard in the UK (as opposed to the continental screw-fitting type), and the BNC ("Bayonet Neill-Concelman") RF connector.