While submerged, submarines can travel faster than when they are on the surface. As water is more viscous and dense than air, causing more friction, how can it travel faster while travelling through a denser medium.
Its moving through water either way, the question is what drag dominates.
For surface ships you want a long and skinny hull so it cuts through the water at the front without creating a massive bow wave. The energy that [goes into making this wave](https://en.wikipedia.org/wiki/Wave-making_resistance) is actually the main source of drag for ships.
When fully submerged you need a smooth streamlined shape to let water flow over the surface because you’re not making waves anymore(fully submerged) and only care about skin drag which is the water flowing over the skin of the vehicle
Unfortunate you can’t really get both at the same time. WW2 era subs were optimized for surface operation and moved significantly faster when surfaced because they didn’t have the big bulbous nose of modern submarines which spend almost their entire time under water.
First go find a picture of an Ohio class submarine. Note how low it sits in the water, still mostly submerged even when surfaced. It’s also torpedo shaped, great for underwater use but poor roll stability.
This is typical of a modern submarine – they’re built to be submerged most of the time, with only periodic surfacing. They do most of their travel underwater and aren’t great at navigating the choppy surface waters.
Now go find a picture of a German U-boat from the world wars. Notice how boat-like it is? It’s built to sit high and cruise on the surface like a regular ship and only submerge for attack runs. It has much greater speed and stability when surfaced, since subs of that era could only run on batteries for a short while anyway.
You are right about the viscosity and density making water have more resistance then air. However the water surface is much worse. The surface tension cause a lot of the resistance when traveling through it. In addition to this a surface ship can only displace water to the sides and down, while a submarine can also displace the water upwards. So you get less bow pressure as the water can more easily move out of the way. And these two factors offsets the disadvantages of traveling through a denser and more viscous medium.
That is because it has nothing to do with the medium it travels through, but with the waves. The waves create an entirely different kind of drag than when the submarine travels underwater. A submarine is designed specifically for underwater operations, and so it has a round shape at the front. This round shape is very aerodynamic and so is perfect for use when completely submerged, but it isn’t ideal when dealing with waves. That is also the reason why normal ships have a more pointy hull. You might think that a round shape would improve aerodynamics and thus decrease drag, but the pointy hull breaks the waves way better.
Edit: mixed up hull and bow, I fixed it now
Hydrodynamics (shape). Submarines that are built to run on the surface, like U-boats in WWII, *are* faster on the surface than fully submerged. But that requires building a bow and hull that’s optimized for a surface wake.
All that stuff isn’t helpful underwater…it actually hurts. Optimum hydrodynamics underwater are a nice radially symmetric tube-ish thing, like a missile or torpedo (for the same reasons). But it sucks at the surface because the bow doesn’t split the water, the water goes up over the nose then falls off the sides. That’s why modern submarines at the surface have such a weird looking bow wave.
Here’s an example of a U-boat wake: [https://www.uboatarchive.net/U-161A/U-161-81976.jpg](https://www.uboatarchive.net/U-161A/U-161-81976.jpg)
And modern sub: [https://qph.cf2.quoracdn.net/main-qimg-12efafe3d27291abe4d48c185aca313a-lq](https://qph.cf2.quoracdn.net/main-qimg-12efafe3d27291abe4d48c185aca313a-lq)
See how the U-boat is cutting through the water and the modern sub is pushing that giant pile in front of it? That pile is draggy.