In the Renaissance one of the most important reasons for learning maths was to do with war. Upper class gentlemen and working class artisans were both taught how to use maths to get the answers to practical problems that needed to be solved during battles.
Gentlemen were taught about the maths behind fortification, which means how to use maths to work out the best shapes for forts, castles and walls used to protect towns. For example, they were taught how to work out what angles to make the corners of castle walls so that they were as strong as possible and wouldn't collapse during attacks. Fortification was a good subject for gentlemen because it wasn't too messy: it only really meant drawing plans on paper and so it could be taught in comfort inside school rooms.
Working class artisans on the other hand tended to concentrate on the maths of gunnery, which means how to use maths to work out the best angle to fire guns and cannons. For example, they were taught what angle to point a cannon at so that the cannon ball travelled the right distance to hit the target being aimed at. Gunnery was a much more dirty subject than fortification because it had to be taught 'hands on' by actually learning how to use guns and ammunition in the field.
Many famous mathematicians worked on the maths of warfare. Galileo for example invented a 'geometric and military compass' and gave lessons in fortification. Many other mathematical instruments were invented in the Renaissance to help with the practical problems that warfare created. There were even instruments for automatically doing the maths to work out what shapes of formations soldiers ought to march in, make camps in, and attack in.
This picture shows a mathematical instrument being used on a battlefield. The town in the background is under attack and is burning out of control, with clouds of smoke rising from its destroyed buildings. In the front a gun is being set up for another attack. A mathematical instrument called a 'geometrical gunnery instrument' is being put down the barrel of the gun so that the angle it should be fired at could be worked out. This saved a lot of time because the intrument automatically did what would otherwise involve lots of calculations being done. The 'geometrical gunnery instrument' was invented and made in about 1608 by someone called Leonard Zubler, who lived and worked in Zurich in Switzerland. Zubler even wrote a whole book about his invention to tell people how good it was.
Mathematical instruments like Zubler's were still being used in World War II to solve exactly the same maths problem of what angle to point guns at so that they hit their targets when they were fired. These were things like 'gunner's gauges' and 'gunner's sights and levels'. Only very recently have these instruments been replaced by computers.