linguistic:paraphrasing
Armament

The success of the submarine is inextricably linked to the development of the torpedo, invented by Robert Whitehead in 1866. His invention (essentially the same now as it was 140 years ago), allowed the submarine make the leap from novelty to a weapon of war. Prior to the development and miniaturization of sonar sensitive enough to track a submerged submarine, attacks were exclusively restricted to ships and submarines operating near or at the surface. Targeting of unguided torpedoes was initially done by eye, but by World War II analog targeting computers began to proliferate, being able to calculate basic firing solutions. Nonetheless, multiple "straight-running" torpedoes could be required to ensure a target was hit. With at most 20 to 25 torpedoes stored on board, the number of attacks a submarine could make was limited. To increase combat endurance starting in World War I submarines also functioned as submersible gunboats, using their deck guns against unarmed targets, and diving to escape and engage enemy warships. The initial importance of these deck guns encouraged the development of the unsuccessful Submarine Cruiser such as the French Surcouf and the Royal Navy 's X1 and M-class submarines. With the arrival of anti-submarine warfare (ASW) aircraft, guns became more for defense than attack. A more practical method of increasing combat endurance was the external torpedo tube, loaded only in port.

The ability of submarines to approach enemy harbours covertly led to their use as minelayers. Minelaying submarines of World War I and World War II were specially built for that purpose. Modern submarine-laid mines, such as the British Mark 5 Stonefish and Mark 6 Sea Urchin, can be deployed from a submarine's torpedo tubes.

After World War II, both the US and the USSR experimented with submarine-launched cruise missiles such as the SSM-N-8 Regulus and P-5 Pyatyorka. Such missiles required the submarine to surface to fire its missiles. They were the forerunners of modern submarine-launched cruise missiles, which can be fired from the torpedo tubes of submerged submarines, for example, the US BGM-109 Tomahawk and Russian RPK-2 Viyuga and versions of surface-to-surface anti-ship missiles such as the Exocet and Harpoon, encapsulated for submarine launch. Ballistic missiles can also be fired from a submarine's torpedo tubes, for example, missiles such as the anti-submarine SUBROC. With internal volume as limited as ever and the desire to carry heavier warloads, the idea of the external launch tube was revived, usually for encapsulated missiles, with such tubes being placed between the internal pressure and outer streamlined hulls. Guided torpedoes also proliferated extensively during and after World War II, even further increasing the combat endurance and lethality of submarines and allowing them to engage other submarines at depth (with the latter now being one of the primary missions of the modern attack submarine).

The strategic mission of the SSM-N-8 and the P-5 was taken up by submarine-launched ballistic missile beginning with the US Navy's Polaris missile, and subsequently the Poseidon and Trident missiles.

Germany is working on the torpedo tube-launched short-range IDAS missile, which can be used against ASW helicopters, as well as surface ships and coastal targets.