Magnetic materials point in particular directions, a property used to make orientation tools. Once employed at sea, the compass helped navigators find their bearings when land was out of sight.

Magnetic north and geographic north do not coincide exactly, making an understanding of magnetic declination useful. Ancient Chinese direction-finding technology took several different forms over time.

Geomancy and Feng Shui

The compass was invented in China during the Han dynasty between the 2nd century BC and 1st century AD where it was called the "south-governor" or "South Pointing Fish". The magnetic compass was not, at first, used for navigation, but for geomancy and fortune-telling by the Chinese. The earliest Chinese magnetic compasses were possibly used to order and harmonize buildings by the geomantic principles of feng shui. These early compasses were made with lodestone, a form of the mineral magnetite that is a naturally occurring magnet and aligns itself with the Earth's magnetic field. People in ancient China discovered that if a lodestone was suspended so it could turn freely, it would always point toward the magnetic poles. Early compasses were used to choose areas suitable for building houses, growing crops, and to search for rare gems. Compasses were later adapted for navigation during the Song dynasty in the 11th century.

Based on Krotser and Coe's discovery of an Olmec hematite artifact in Mesoamerica, radiocarbon dated to 1400–1000 BC, astronomer John Carlson has hypothesized that the Olmec might have used the geomagnetic lodestone earlier than 1000 BC for geomancy, a method of divination, which if proven true, predates the Chinese use of magnetism for feng shui by a millennium. Carlson speculates that the Olmecs used similar artifacts as a directional device for astronomical or geomantic purposes but does not suggest navigational usage. The artifact is part of a polished hematite bar with a groove at one end, possibly used for sighting. Carlson's claims have been disputed by other scientific researchers, who have suggested that the artifact is actually a constituent piece of a decorative ornament and not a purposely built compass. Several other hematite or magnetite artifacts have been found at pre-Columbian archaeological sites in Mexico and Guatemala.

China

Thus, the use of a magnetic compass by the military for land navigation occurred sometime before 1044, but incontestable evidence for the use of the compass as a maritime navigational device did not appear until 1117.

The typical Chinese navigational compass was in the form of a magnetic needle floating in a bowl of water. According to Needham, the Chinese in the Song dynasty and continuing Yuan dynasty did make use of a dry compass, although this type never became as widely used in China as the wet compass. Evidence of this is found in the Shilin Guang Ji ("Guide Through the Forest of Affairs"), published in 1325 by Chen Yuanjing, although its compilation had taken place between 1100 and 1250. The dry compass in China was a dry suspension compass, a wooden frame crafted in the shape of a turtle hung upside down by a board, with the lodestone sealed in by wax, and if rotated, the needle at the tail would always point in the northern cardinal direction.

Although the European compass-card in a box frame and dry pivot needle was adopted in China after its use was taken by Japanese pirates in the 16th century (who had, in turn, learned of it from Europeans), the Chinese design of the suspended dry compass persisted in use well into the 18th century. However, according to Kreutz there is only a single Chinese reference to a dry-mounted needle (built into a pivoted wooden tortoise) which is dated to between 1150 and 1250 and claims that there is no clear indication that Chinese mariners ever used anything but the floating needle in a bowl until the 16th century.

The first recorded use of a 48 position mariner's compass on sea navigation was noted in The Customs of Cambodia by Yuan dynasty diplomat Zhou Daguan, he described his 1296 voyage from Wenzhou to Angkor Thom in detail; when his ship set sail from Wenzhou, the mariner took a needle direction of “ding Wei” position, which is equivalent to 22.5 degree SW. After they arrived at Baria, the mariner took "Kun Shen needle", or 52.5 degree SW. Zheng He's Navigation Map, also known as the "Mao Kun Map", contains a large amount of detail "needle records" of Zheng He's expeditions.