Omar Khayyam's full name was Ghiyath al-Din Abu'l-Fath Umar ibn Ibrahim Al-Nisaburi al-Khayyami.
Khayyam studied philosophy at Naishapur. He lived in a time that did not make life easy for learned men unless they had the support of a ruler at one of the many courts.
However Khayyam was an outstanding mathematician and astronomer and he did write several works including *Problems of Arithmetic*, a book on music, and one on algebra before he was 25 years old.

In the latter, Khayyam considered the problem of finding a right triangle having the property that the hypotenuse equals the sum of one leg plus the altitude on the hypotenuse.
This problem led Khayyam to solve the cubic equation x^{3} + 200x = 20x^{2} + 2000 and he found a positive root of this cubic by considering the
intersection of a rectangular hyperbola and a circle. An approximate numerical solution was then found by interpolation in trigonometric tables. Perhaps even
more remarkable is the fact that Khayyam states that the solution of this cubic requires the use of conic sections and that it cannot be solved by ruler and
compass methods, a result which would not be proved for another 750 years.

In 1070 he moved to Samarkand in Uzbekistan,
one of the oldest cities of Central Asia. There Khayyam was supported by a prominent jurist of Samarkand, and this allowed him to write his most
famous algebra work, *Treatise on Demonstration of Problems of Algebra*.
This contained a complete classification of cubic
equations with geometric solutions found by means of intersecting conic sections. In fact, Khayyam gives an interesting historical account in which he claims
the contributions by earlier writers such as Al-Mahani and
Al-Khazin were to translate geometric problems of the Greeks into algebraic equations, something which was essentially impossible before the work of Al-Khwarizmi.
However, Khayyam himself seems to have been the first to conceive a general theory of cubic equations. Another achievement in the algebra text is Khayyam's realisation that a cubic equation can have more than one solution. He demonstrated the existence of
equations having two solutions, but unfortunately he does not appear to have found that a cubic can have three solutions.

Also in his algebra book, Khayyam refers to another
work of his which is now lost. In the lost work, Khayyam discusses the Pascal triangle but he was not the first to do so since al-Karaji discussed the Pascal
triangle before this date. In fact we can be fairly sure that Khayyam used a method of finding n^{th} roots based on the binomial expansion, and therefore on the
binomial coefficients.

In another book, Khayyam made a contribution to non-euclidean geometry, although this was not his intention. In trying to prove the parallels postulate he accidentally proved properties of figures in non-euclidean geometries. Khayyam also gave important results on ratios in this book, extending Euclid's work to include the multiplication of ratios.

A powerful sultan then invited Khayyam to go to Esfahan to set up an Observatory there. Other leading astronomers were also brought to the Observatory in Esfahan and for 18 years Khayyam led the scientists and produced work of outstanding quality. It was a period of peace during which the political situation allowed Khayyam the opportunity to devote himself entirely to his scholarly work. During this time, Khayyam led work on compiling astronomical tables and he also contributed to calendar reform in 1079. Khayyam measured the length of the year as 365.24219858156 days. This shows an incredible confidence to attempt to give the result to this degree of accuracy, and it is amazingly accurate. We know now that the length of the year is changing in the sixth decimal place over a person's lifetime. The length of the year in 1900 was 365.242196 days, while in 2000 it was 365.242190 days.

In 1092 political events ended Khayyam's period of peaceful existence. Funding to run the Observatory ceased and Khayyam's calendar reform was put on hold. Khayyam also came under attack from the orthodox Muslims who felt that Khayyam's questioning mind did not conform to the faith. Despite being out of favour on all sides, Khayyam remained at the Court and tried to regain favour. He wrote a work in which he described former rulers in Iran as men of great honour who had supported public works, science and scholarship. Another empire rose in 1118, this time with Merv, Turkmenistan as its capital. The shah created a great center of Islamic learning in Merv where Khayyam wrote further works on mathematics.

Outside the world of mathematics, Khayyam is best known as a result of Edward Fitzgerald's popular translation in 1859 of nearly 600 short four line poems the Rubaiyat. Khayyam's fame as a poet has caused some to forget his scientific achievements which were much more substantial. Of all the verses that can be attributed to him with certainty, the best known is the following:

The Moving Finger writes, and, having writ,

Moves on: nor all thy Piety nor Wit

Shall lure it back to cancel half a Line,

Nor all thy Tears wash out a Word of it.