Looking at the formations of the words gymnastics and gymnasium, you can see that they share a root in Ancient Greek gymno-. However, I have a friend who used to work at a mathnasium, slimnastics is a type of yoga workout, and people work out at the gym (a word that is now used four times as much as gymnasium in literature, and over a hundredfold more in online searches). It's rather interesting how the term was improperly rebracketed like that, but I guess we're stuck with it. Both gymnasium and gymnastics were borrowed around the seventeenth century from the verb gymnazein, meaning "to exercise naked", because Ancient Greek sports were done in the nude. Gymnazein comes from the root gymnos, which meant "naked", and that traces to Proto-Indo-European nogw, also "naked".
Adam Aleksic, a rising sophomore studying linguistics and government at Harvard University, has been described as the internet's sixth most famous etymologist. He also has disturbing interests in politics, vexillology, geography, board games, conlanging, and law.