The Babylonian astronomers kept detailed records on the rising and setting of stars, the motion of the planets, and the solar and lunar eclipses, all of which required familiarity with angular distances measured on the celestial sphere. Based on one interpretation of the Plimpton 322 cuneiform tablet (circa 1900 BC), some have even asserted that the ancient Babylonians had a table of secants. There is, however, much debate as to whether it is a table of Pythagorean triples, a solution of quadratic equations, or a trigonometric table.
The Egyptians, on the other hand, used a primitive form of trigonometry for building pyramids in the 2nd millennium BC. The Rhind Mathematical Papyrus, written by the Egyptian scribe Ahmes (circa 1680-1620 BC), contains the following problem related to trigonometry:
Ahmes' solution to the problem is the ratio of half the side of the base of the pyramid to its height, or the run-to-rise ratio of its face. In other words, the quantity he found for the seked is the cotangent of the angle to the base of the pyramid and its face.
Ancient Greek and Hellenistic mathematicians made use of the chord. Given a circle and an arc on the circle, the chord is the line that subtends the arc. A chord's perpendicular bisector passes through the center of the circle and bisects the angle. One half of the bisected chord is the sine of the bisected angle, that is, , and consequently the sine function is also known as the "half chord". Due to this relationship, a number of trigonometric identities and theorems that are known today were also known to Hellenistic mathematicians, but in their equivalent chord form.
Although there is no trigonometry in the works of Euclid and Archimedes, in the strict sense of the word, there are theorems presented in a geometric way (rather than a trigonometric way) that are equivalent to specific trigonometric laws or formulas. For instance, propositions twelve and thirteen of book two of the Elements are the laws of cosine for obtuse and acute angles, respectively. Theorems on the lengths of chords are applications of the law of sines. And Archimedes' theorem on broken chords is equivalent to formulas for sines of sums and differences of angles. To compensate for the lack of a table of chords, mathematicians of Aristarchus' time would sometimes use the well known theorem that, in modern notation, sin α/ sin β < α/β < tan α/ tan β whenever 0° < β < α < 90°, among other theorems.
The first trigonometric table was apparently compiled by Hipparchus of Nicaea (180 - 125 BC), who is now consequently known as "the father of trigonometry." Hipparchus was the first to tabulate the corresponding values of arc and chord for a series of angles.
Although it is not known when the systematic use of the 360° circle came into mathematics, it is known that the systematic introduction of the 360° circle came a little after Aristarchus of Samos composed On the Sizes and Distances of the Sun and Moon (ca. 260 B.C.), since he measured an angle in terms of a fraction of a quadrant. It seems that the systematic use of the 360° circle is largely due to Hipparchus and his table of chords. Hipparchus may have taken the idea of this division from Hypsicles who had earlier divided the day into 360 parts, a division of the day that may have been suggested by Babylonian astronomy. In ancient astronomy, the zodiac had been divided into twelve "signs" or thirty-six "decans". A seasonal cycle of roughly 360 days could have corresponded to the signs and decans of the zodiac by dividing each sign into thirty parts and each decan into ten parts. It is due to the Babylonian sexagesimal number system that each degree is divided into sixty minutes and each minute is divided into sixty seconds.
Menelaus of Alexandria (ca. 100 A.D.) wrote in three books his Sphaerica. In Book I, he established a basis for spherical triangles analogous to the Euclidean basis for plane triangles. He establishes a theorem that is without Euclidean analogue, that two spherical triangles are congruent if corresponding angles are equal, but he did not distinguish between congruent and symmetric spherical triangles. Another theorem that he establishes is that the sum of the angles of a spherical triangle is greater than 180°. Book II of Sphaerica applies spherical geometry to astronomy. And Book III contains the "theorem of Menelaus". He further gave his famous "rule of six quantities".
Later, Claudius Ptolemy (ca. 90 - ca. 168 A.D.) expanded upon Hipparchus' Chords in a Circle in his Almagest, or the Mathematical Syntaxis. The thirteen books of the Almagest are the most influential and significant trigonometric work of all antiquity. A theorem that was central to Ptolemy's calculation of chords was what is still known today as Ptolemy's theorem, that the sum of the products of the opposite sides of a cyclic quadrilateral is equal to the product of the diagonals. A special case of Ptolemy's theorem appeared as proposition 93 in Euclid's Data. Ptolemy's theorem leads to the equivalent of the four sum-and-difference formulas for sine and cosine that are today known as Ptolemy's formulas, although Ptolemy himself used chords instead of sine and cosine. Ptolemy further derived the equivalent of the half-angle formula . Ptolemy used these results to create his trigonometric tables, but whether these tables were derived from Hipparchus' work cannot be determined.
Neither the tables of Hipparchus nor those of Ptolemy have survived to the present day, although descriptions by other ancient authors leave little doubt that they once existed.
The next significant developments of trigonometry were in India. The Indian mathematician and astronomer, Aryabhata (476–550 AD), in his work Aryabhata-Siddhanta, first defined the sine as the modern relationship between half an angle and half a chord, while also defining the cosine, versine, and inverse sine. His works also contain the earliest surviving tables of sine values and versine (1 − cosine) values, in 3.75° intervals from 0° to 90°, to an accuracy of 4 decimal places. He used the words jya for sine, kojya for cosine, ukramajya for versine, and otkram jya for inverse sine. The words jya and kojya eventually became sine and cosine respectively after a mistranslation.
Other Indian mathematicians later expanded Aryabhata's works on trigonometry. In the 6th century, Varahamihira used the formulas
In the 7th century, Bhaskara I produced a formula for calculating the sine of an acute angle without the use of a table. He also gave the following approximation formula for sin(x), which had a relative error of less than 1.9%:
Later in the 7th century, Brahmagupta developed the formula as well as the Brahmagupta interpolation formula for computing sine values. Another later Indian author on trigonometry was Bhaskara II in the 12th century.
Madhava (c. 1400) made early strides in the analysis of trigonometric functions and their infinite series expansions. He developed the concepts of the power series and Taylor series, and produced the trigonometric series expansions of sine, cosine, tangent and arctangent. Using the Taylor series approximations of sine and cosine, he produced a sine table to 12 decimal places of accuracy and a cosine table to 9 decimal places of accuracy. He also gave the power series of π and the θ, radius, diameter and circumference of a circle in terms of trigonometric functions. His works were expanded by his followers at the Kerala School up to the 16th century.
The Indian works were later translated and expanded in the medieval Islamic world by Muslim mathematicians of mostly Arab and Persian descent. They enunciated a large number of theorems which freed the subject of trigonometry from dependence upon the complete quadrilateral, as was the case in Hellenistic mathematics due to the application of Menelaus' theorem. According to E. S. Kennedy, it was after this development in Islamic mathematics that "the first real trigonometry emerged, in the sense that only then did the object of study become the spherical or plane triangle, its sides and angles.
In the 9th century, Muhammad ibn Mūsā al-Khwārizmī produced accurate sine and cosine tables, and the first table of tangents. He was also a pioneer in spherical trigonometry. By the 10th century, in the work of Abū al-Wafā' al-Būzjānī, Muslim mathematicians were using all six trigonometric functions, after discovering the secant, cotangent and cosecant functions. Abu al-Wafa had sine tables in 0.25° increments, to 8 decimal places of accuracy, and accurate tables of tangent values. He also developed the following trigonometric formula:
Abū al-Wafā also established the angle addition identities, e.g. sin (a + b), and discovered the sine formula for spherical trigonometry:
Another 10th century mathematician, Muhammad ibn Jābir al-Harrānī al-Battānī (Albatenius), was responsible for establishing a number of important trigometrical relationships, such as:
Al-Jayyani (989–1079) of al-Andalus wrote The book of unknown arcs of a sphere, which is considered "the first treatise on spherical trigonometry" in its modern form, although spherical trigonometry in its ancient Hellenistic form was dealt with by earlier mathematicians such as Menelaus of Alexandria, who developed Menelaus' theorem to deal with spherical problems. However, E. S. Kennedy points out that while it was possible in pre-lslamic mathematics to compute the magnitudes of a spherical figure, in principle, by use of the table of chords and Menelaus' theorem, the application of the theorem to spherical problems was very difficult in practice. Al-Jayyani's work on spherical trigonometry "contains formulae for right-handed triangles, the general law of sines, and the solution of a spherical triangle by means of the polar triangle." This treatise later had a "strong influence on European mathematics", and his "definition of ratios as numbers" and "method of solving a spherical triangle when all sides are unknown" are likely to have influenced Regiomontanus.
The method of triangulation was first developed by Muslim mathematicians, who applied it to practical uses such as surveying and Islamic geography, as described by Abū Rayhān al-Bīrūnī in the early 11th century. In the late 11th century, Omar Khayyám (1048–1131) solved cubic equations using approximate numerical solutions found by interpolation in trigonometric tables. In the 13th century, Nasīr al-Dīn al-Tūsī was the first to treat trigonometry as a mathematical discipline independent from astronomy, and he developed spherical trigonometry into its present form. He listed the six distinct cases of a right-angled triangle in spherical trigonometry, and he also stated the law of sines and provided a proof for it.
In the 14th century, Jamshīd al-Kāshī gave trigonometric tables of values of the sine function to four sexagesimal digits (equivalent to 8 decimal places) for each 1° of argument with differences to be added for each 1/60 of 1°. Ulugh Beg also gives accurate tables of sines and tangents correct to 8 decimal places around the same time.
In the 16th century, Taqi al-Din contributed to trigonometry in his Sidrat al-Muntaha, in which he was the first mathematician to extract the precise value of Sin 1°. He discusses the values given by his predecessors, explaining how Ptolemy used an approximate method to obtain his value of Sin 1° and how Abū al-Wafā, Ibn Yunus, al-Kashi, Qāḍī Zāda al-Rūmī, Ulugh Beg and Mirim Chelebi improved on the value. Taqi al-Din then solves the problem to obtain the precise value of Sin 1°:
In China, Aryabhata's table of sines were translated into the Chinese mathematical book of the Kaiyuan Zhanjing, compiled in 718 AD during the Tang Dynasty. Although the Chinese excelled in other fields of mathematics such as solid geometry, binomial theorem, and complex algebraic formulas, early forms of trigonometry were not as widely appreciated as in the earlier Greek and then Indian and Islamic worlds. Instead, the early Chinese used an empirical substitute known as chong cha, while practical use of plane trigonometry in using the sine, the tangent, and the secant were known. However, this embryonic state of trigonometry in China slowly began to change and advance during the Song Dynasty (960–1279), where Chinese mathematicians began to express greater emphasis for the need of spherical trigonometry in calendrical science and astronomical calculations. The polymath Chinese scientist, mathematician and official Shen Kuo (1031–1095) used trigonometric functions to solve mathematical problems of chords and arcs. Victor J. Katz writes that in Shen's formula "technique of intersecting circles", he created an approximation of the arc of a circle s given the diameter d, sagita v, and length of the chord c subtending the arc, the length of which he approximated as s = c + 2v2/d. Sal Restivo writes that Shen's work in the lengths of arcs of circles provided the basis for spherical trigonometry developed in the 13th century by the mathematician and astronomer Guo Shoujing (1231–1316). As the historians L. Gauchet and Joseph Needham state, Guo Shoujing used spherical trigonometry in his calculations to improve the calendar system and Chinese astronomy. Along with a later 17th century Chinese illustration of Guo's mathematical proofs, Needham states that:
Guo used a quadrangular spherical pyramid, the basal quadrilateral of which consisted of one equatorial and one ecliptic arc, together with two meridian arcs, one of which passed through the summer solstice point...By such methods he was able to obtain the du lü (degrees of equator corresponding to degrees of ecliptic), the ji cha (values of chords for given ecliptic arcs), and the cha lü (difference between chords of arcs differing by 1 degree).
Despite the achievements of Shen and Guo's work in trigonometry, another substantial work in Chinese trigonometry would not be published again until 1607, with the dual publication of Euclid's Elements by Chinese official and astronomer Xu Guangqi (1562–1633) and the Italian Jesuit Matteo Ricci (1552–1610).
The Opus palatinum de triangulis of Georg Joachim Rheticus, a student of Copernicus, was probably the first to define trigonometric functions directly in terms of right triangles instead of circles, with tables for all six trigonometric functions; this work was finished by Rheticus' student Valentin Otho in 1596.
In the 18th century, Leonhard Euler's Introductio in analysin infinitorum (1748) was mostly responsible for establishing the analytic treatment of trigonometric functions in Europe, defining them as infinite series and presenting "Euler's formula" eix = cos(x) + i sin(x). Euler used the near-modern abbreviations sin., cos., tang., cot., sec., and cosec.
Also in the 18th century, Brook Taylor defined the general Taylor series and gave the series expansions and approximations for all six trigonometric functions. The works of James Gregory in the 17th century and Colin Maclaurin in the 18th century were also very influential in the development of trigonometric series.