Presumably, the compass was invented in China during the Song dynasty and was used to indicate the direction of travel in deserts. In the 3rd century BC. the Chinese philosopher Hen Fei-tzu described the device of his modern compass: it looked like a pouring spoon made of magnetite with a thin handle and a spherical, carefully polished convex part. With this convex part, the spoon was installed on an equally carefully polished copper or wooden plate, so that the handle did not touch the plate, but hung freely above it, and at the same time the spoon could easily rotate around the axis of its convex base. The plate was marked with the designations of the countries of the world in the form of cyclic zodiacal signs. After pushing the handle of the spoon, it was set in a rotational motion. Having calmed down, the compass pointed with a handle (which played the role of a magnetic needle) exactly to the south. This was the most ancient device for determining the cardinal points. In the 11th century, a floating compass needle made of an artificial magnet first appeared in China. Usually it was made in the shape of a fish. This fish was dipped into a vessel with water. Here she swam freely, pointing her head in the direction where the south was. The Chinese ships were equipped with floating compasses. They were usually installed on the bow and stern of ships, so that the captains in any weather could keep the correct course, in accordance with their instructions. In this form, the Arabs borrowed the Chinese compass in the XII century. At the beginning of the 13th century, the "floating needle" became known to Europeans. Italian sailors were the first to adopt it from the Arabs. From them the compass passed to the Spaniards, Portuguese and French, and later to the Germans and British. At first, the compass consisted of a magnetized needle and a piece of wood (cork) floating in a vessel of water. They soon guessed to close this vessel with glass to protect the float from the wind. In the middle of the XIV century, they came up with the idea of placing a magnetic arrow on a point in the middle of a paper circle (cards). At the beginning of the XIV century. the Italian Flavio Joya significantly improved the compass. He put the magnetic needle on a vertical hairpin, and attached a light circle to the arrow - a card, broken around a circle into 16 points. In the XVI century. introduced the division of the card into 32 points and the box with the arrow was placed in a gimbal to eliminate the influence of the ship's rocking on the compass. In the XVII century. The compass was equipped with a direction finder - a rotating diametrical ruler with sighting devices at the ends, fixed with its center on the box lid above the arrow.
The word "compass", apparently, comes from the old English word compass, which meant in the XIII-XIV centuries. "a circle".
Source: Wikipedia, Rusactive.ru