Beams are the classic science fiction space weapon par excellence, ever since HG Wells' Martians zapped Edwardian England at the dawn of SF. For half a century they were almost pure magitech. Then came lasers, and laser weapons have now zapped targets in tests. What's more, they are almost precisely 'heat rays,' just like the ones in the pulps.
Over short distances, relative to the length of the laser itself, laser beams cheerfully ignore the inverse square law that governs ordinary light sources. But thanks to diffraction, over long distance they are effectively subject to it. The formula for the spread of a laser beam (via Atomic Rockets, of course) is a close cousin to the formula for telescope resolution:
RT = 0.61 * D * L / RL
where:
RT = beam radius at target (m)
D = distance from laser emitter to target (m)
L = wavelength of laser beam (m, see table below)
RL = radius of laser lens or reflector (m)
So an ideal diffraction-limited laser zapping in the near IR, with a wavelength of 1000 nanometers firing through a 2-meter telescope, has a spot size of 12.2 cm at a range of 100 km. (Before you break out your calculators, remember that the formula uses radii while my example uses diameters.) If your laser has an average power output of 1 megawatt, each square centimeter is getting hit with about 8.5 kilowatts – about 850,000 times the intensity of sunlight at Earth's surface. The target surface will get very hot, very quickly.
The most refractory material we currently know of, graphite, requires some 50 MW MJ [oops, energy = megajoules, not power = megawatts] to vaporize 1 kg – roughly the energy of 12 kg of TNT – and has a density of about 2.2 g/cm3. Cutting to the chase, our beam will burn through it at not quite a millimeter per second. Most metals are much less resistant to heat, so the laser will burn through metal hulls way faster). But if you substitute a 5 meter mirror – or a 400 nanometer beam, at the short end of the visible spectrum – you'll burn a smaller hole at half a centimeter per second. Or it will have the same spot size and burn rate at 250 km.
Lesson: For a given beam power, the bigger the mirror and shorter the wavelength, the greater the effective range. And lasers cannons, at least in the classical IR-visible-UV band, probably won't look much like guns, but perhaps more like a TV satellite dish.
Let's get a bit more SFnal about it and specify a 100 nanometer UV laser firing through a 10-meter telescope, with beam power of 1 gigawatt and range of 5000 km. Our spot size is unchanged, but each square centimeter is now getting hit with about 8.5 MW, and you'll burn through a meter of graphite in a second. This is some serious zapping. Or you can achieve a 1 mm/second burn rate at 160,000 km, more than half a light second.
Of course there is a tech challenge or two: Operating a laser cannon is loosely comparable to mounting a jet engine at the eyepiece of an observatory grade telescope. You will produce waste heat greater than beam power, probably several times beam power. But all this merely makes it difficult, not impossible. Real lasers presumably won't be as good as ideal ones, but there's no inherent reason why they couldn't come reasonably close to diffraction-limited performance.
Venturing further into SFness, if you make it a 0.1 nm X-ray laser with a 10-meter aperture you now achieve the same spot size and beam intensity at 10 million km. Since that is half a light minute, the target now can dodge, and because X-ray telescopes require an enormous focal length, your laser - and therefore the ship carrying it - may have to be, oh, perhaps 8 km long (see comment thread).
So much for laser basics. Now for the consequences.
If you can see it, you can zap it, and vice versa. As noted above, laser spot size is closely related to telescope resolution. If you can focus the beam to a couple of dozen centimeters, that is also the resolution your sensors can gain, simply by looking through the telescope between pulses. Which means that lasers of this precision don't just score random hits like World War I battleships; they fire at specific points on the target surface. (If mechanical or thermal limits preclude this precision, you won't get the penetrating burn-throughs described above, just scars burned along the hull surface.)
Thus the objective won't just be to blast an enemy ship but to mission kill it by zeroing in on critical systems – such as armament. In a laser battle, if you can hit the other guy effectively at all you can shoot the gun out his hand. But it gets better. What happens when two lasers are zapping each other? Their targeting optics are pointing straight at each other – so the optics concentrate the incoming beam right onto the laser itself. I have no idea what the effect is, but it could easily be dramatic. Laser engagements lend themselves to a mutual eyeball frying contest. Whoever zaps first, probably wins.
But there is another and even more curious implication of laser combat. So far I've been talking about beams concentrated down to blowtorch intensity, kilowatts or metawatts per square centimeter, able to burn right through refractory materials by heating the surface to thousands of degrees K. But what about mere scorch intensity? Say, the 50 watts/cm2 that causes primary thermal burns to humans and sets paper on fire. This won't burn through armor, but it will likely burn out delicate components such as sensor elements, or at any rate saturate and 'dazzle' them.
Thus laser weapons can blind the enemy, temporarily or permanently, at much greater range than they can do serious physical damage to structures. Our first modest laser has a scorch range of 1300 km; the more SFnal one a scorch range of 2 million km … and the jumbo X-ray laser has a scorch range of 2 billion km, about 14 AU. Spot size (and targeting resolution) is wider by the same proportion, dozens of meters. More rugged sensors are the solution, but it seems likely that weapon lasers can dazzle or blind targets at several times the range at which they can burn through armor.
Realistic [TM] laser combat thus has rather little in common with the Hollywood image of gyrating ships zapping each other at smoothbore-cannon range. I'd argue that laser warcraft, like tanks, will typically have a single main weapon in order to provide it with the largest cost-effective optics and thus longer range. This may well be 'keel-mounted,' aimed by orienting the spacecraft (though the optics will likely provide for vernier adjustments).
Yes, this precludes maneuver while firing – but unless you're fighting at Stupendous Range, more than a light second, you can't dodge a laser beam anyway, while at ranges of hundreds or thousands of km tactical maneuver won't make much difference on the time scale of zapping. Railroad guns don't fire while the train is moving, and laser cannons will plausibly have equivalent constraints.
So if you want the furball combat effect, or anything close to it, you will need a workaround - such as an engagement in the clutter of orbital space, where the challenge is distinguishing hostiles from civil craft and stations you do not want to zap. Or, long range sensor blinding might produce a strange battle of lasers concealed behind armored ports, taking potshots like spaghetti-Western riflemen shooting from the windows of a ranch house.