While Euclidean geometry, named after the Greek mathematician Euclid, includes some of the oldest known mathematics, non-Euclidean geometries were not widely accepted as legitimate until the 19th century.

The debate that eventually led to the discovery of the non-Euclidean geometries began almost as soon as Euclid's work *Elements* was written. In the *Elements*, Euclid began with a limited number of assumptions (23 definitions, five common notions, and five postulates) and sought to prove all the other results (propositions) in the work. The most notorious of the postulates is often referred to as "Euclid's Fifth Postulate," or simply the "parallel postulate", which in Euclid's original formulation is:

If a straight line falls on two straight lines in such a manner that the interior angles on the same side are together less than two right angles, then the straight lines, if produced indefinitely, meet on that side on which are the angles less than the two right angles.

Other mathematicians have devised simpler forms of this property. Regardless of the form of the postulate, however, it consistently appears to be more complicated than Euclid's other postulates:

1. To draw a straight line from any point to any point.

2. To produce [extend] a finite straight line continuously in a straight line.

3. To describe a circle with any centre and distance [radius].

4. That all right angles are equal to one another.

For at least a thousand years, geometers were troubled by the disparate complexity of the fifth postulate, and believed it could be proved as a theorem from the other four. Many attempted to find a proof by contradiction, including Ibn al-Haytham (Alhazen, 11th century), Omar Khayyám (12th century), Nasīr al-Dīn al-Tūsī (13th century), and Giovanni Girolamo Saccheri (18th century).

The theorems of Ibn al-Haytham, Khayyam and al-Tusi on quadrilaterals, including the Lambert quadrilateral and Saccheri quadrilateral, were "the first few theorems of the hyperbolic and the elliptic geometries." These theorems along with their alternative postulates, such as Playfair's axiom, played an important role in the later development of non-Euclidean geometry. These early attempts at challenging the fifth postulate had a considerable influence on its development among later European geometers, including Witelo, Levi ben Gerson, Alfonso, John Wallis and Saccheri. All of these early attempts made at trying to formulate non-Euclidean geometry however provided flawed proofs of the parallel postulate, containing assumptions that were essentially equivalent to the parallel postulate. These early attempts did, however, provide some early properties of the hyperbolic and elliptic geometries.

Khayyam, for example, tried to derive it from an equivalent postulate he formulated from "the principles of the Philosopher" (Aristotle): "*Two convergent straight lines intersect and it is impossible for two convergent straight lines to diverge in the direction in which they converge.*" Khayyam then considered the three cases right, obtuse, and acute that the summit angles of a Saccheri quadrilateral can take and after proving a number of theorems about them, he correctly refuted the obtuse and acute cases based on his postulate and hence derived the classic postulate of Euclid which he didn't realize was equivalent to his own postulate. Another example is al-Tusi's son, Sadr al-Din (sometimes known as "Pseudo-Tusi"), who wrote a book on the subject in 1298, based on al-Tusi's later thoughts, which presented another hypothesis equivalent to the parallel postulate. "He essentially revised both the Euclidean system of axioms and postulates and the proofs of many propositions from the *Elements*." His work was published in Rome in 1594 and was studied by European geometers, including Saccheri who criticised this work as well as that of Wallis.

Giordano Vitale, in his book *Euclide restituo* (1680, 1686), used the Saccheri quadrilateral to prove that if three points are equidistant on the base AB and the summit CD, then AB and CD are everywhere equidistant.

In a work titled *Euclides ab Omni Naevo Vindicatus* (*Euclid Freed from All Flaws*), published in 1733, Saccheri quickly discarded elliptic geometry as a possibility (some others of Euclid's axioms must be modified for elliptic geometry to work) and set to work proving a great number of results in hyperbolic geometry.

He finally reached a point where he believed that his results demonstrated the impossibility of hyperbolic geometry. His claim seems to have been based on Euclidean presuppositions, because no *logical* contradiction was present. In this attempt to prove Euclidean geometry he instead unintentionally discovered a new viable geometry, but did not realize it.

In 1766 Johann Lambert wrote, but did not publish, *Theorie der Parallellinien* in which he attempted, as Saccheri did, to prove the fifth postulate. He worked with a figure that today we call a *Lambert quadrilateral*, a quadrilateral with three right angles (can be considered half of a Saccheri quadrilateral). He quickly eliminated the possibility that the fourth angle is obtuse, as had Saccheri and Khayyam, and then proceeded to prove many theorems under the assumption of an acute angle. Unlike Saccheri, he never felt that he had reached a contradiction with this assumption. He had proved the non-Euclidean result that the sum of the angles in a triangle increases as the area of the triangle decreases, and this led him to speculate on the possibility of a model of the acute case on a sphere of imaginary radius. He did not carry this idea any further.

At this time it was widely believed that the universe worked according to the principles of Euclidean geometry.

The beginning of the 19th century would finally witness decisive steps in the creation of non-Euclidean geometry. Circa 1813, Carl Friedrich Gauss and independently around 1818, the German professor of law Ferdinand Karl Schweikart had the germinal ideas of non-Euclidean geometry worked out, but neither published any results. Then, around 1830, the Hungarian mathematician János Bolyai and the Russian mathematician Nikolai Ivanovich Lobachevsky separately published treatises on hyperbolic geometry. Consequently, hyperbolic geometry is called Bolyai-Lobachevskian geometry, as both mathematicians, independent of each other, are the basic authors of non-Euclidean geometry. Gauss mentioned to Bolyai's father, when shown the younger Bolyai's work, that he had developed such a geometry several years before, though he did not publish. While Lobachevsky created a non-Euclidean geometry by negating the parallel postulate, Bolyai worked out a geometry where both the Euclidean and the hyperbolic geometry are possible depending on a parameter *k*. Bolyai ends his work by mentioning that it is not possible to decide through mathematical reasoning alone if the geometry of the physical universe is Euclidean or non-Euclidean; this is a task for the physical sciences.

Bernhard Riemann, in a famous lecture in 1854, founded the field of Riemannian geometry, discussing in particular the ideas now called manifolds, Riemannian metric, and curvature. He constructed an infinite family of geometries which are not Euclidean by giving a formula for a family of Riemannian metrics on the unit ball in Euclidean space. The simplest of these is called elliptic geometry and it is considered to be a non-Euclidean geometry due to its lack of parallel lines.

By formulating the geometry in terms of a curvature tensor, Riemann allowed non-Euclidean geometry to be applied to higher dimensions.

It was Gauss who coined the term "non-Euclidean geometry". He was referring to his own work which today we call *hyperbolic geometry*. Several modern authors still consider "non-Euclidean geometry" and "hyperbolic geometry" to be synonyms.

Arthur Cayley noted that distance between points inside a conic could be defined in terms of logarithm and the projective cross-ratio function. The method has become called the Cayley-Klein metric because Felix Klein exploited it to describe the non-euclidean geometries in articles in 1871 and 73 and later in book form. The Cayley-Klein metrics provided working models of hyperbolic and elliptic metric geometries, as well as Euclidean geometry.

Klein is responsible for the terms "hyperbolic" and "elliptic" (in his system he called Euclidean geometry "parabolic", a term which generally fell out of use). His influence has led to the current usage of the term "non-Euclidean geometry" to mean either "hyperbolic" or "elliptic" geometry.

There are some mathematicians who would extend the list of geometries that should be called "non-Euclidean" in various ways.

Euclidean geometry can be axiomatically described in several ways. Unfortunately, Euclid's original system of five postulates (axioms) is not one of these as his proofs relied on several unstated assumptions which should also have been taken as axioms. Hilbert's system consisting of 20 axioms most closely follows the approach of Euclid and provides the justification for all of Euclid's proofs. Other systems, using different sets of undefined terms obtain the same geometry by different paths. In all approaches, however, there is an axiom which is logically equivalent to Euclid's fifth postulate, the parallel postulate. Hilbert uses the Playfair axiom form, while Birkhoff, for instance, uses the axiom which says that "there exists a pair of similar but not congruent triangles." In any of these systems, removal of the one axiom which is equivalent to the parallel postulate, in whatever form it takes, and leaving all the other axioms intact, produces absolute geometry. As the first 28 propositions of Euclid (in *The Elements*) do not require the use of the parallel postulate or anything equivalent to it, they are all true statements in absolute geometry.

To obtain a non-Euclidean geometry, the parallel postulate (or its equivalent) *must* be replaced by its negation. Negating the Playfair's axiom form, since it is a compound statement (... there exists one and only one ...), can be done in two ways:

Either there will exist more than one line through the point parallel to the given line or there will exist no lines through the point parallel to the given line. In the first case, replacing the parallel postulate (or its equivalent) with the statement "In a plane, given a point P and a line *ℓ* not passing through P, there exist two lines through P which do not meet *ℓ*" and keeping all the other axioms, yields hyperbolic geometry.
The second case is not dealt with as easily. Simply replacing the parallel postulate with the statement, "In a plane, given a point P and a line *ℓ* not passing through P, all the lines through P meet *ℓ*", does not give a consistent set of axioms. This follows since parallel lines exist in absolute geometry, but this statement says that there are no parallel lines. This problem was known (in a different guise) to Khayyam, Saccheri and Lambert and was the basis for their rejecting what was known as the "obtuse angle case". In order to obtain a consistent set of axioms which includes this axiom about having no parallel lines, some of the other axioms must be tweaked. The adjustments to be made depend upon the axiom system being used. Among others these tweaks will have the effect of modifying Euclid's second postulate from the statement that line segments can be extended indefinitely to the statement that lines are unbounded. Riemann's elliptic geometry emerges as the most natural geometry satisfying this axiom.
Two dimensional Euclidean geometry is modelled by our notion of a "flat plane."

The simplest model for elliptic geometry is a sphere, where lines are "great circles" (such as the equator or the meridians on a globe), and points opposite each other (called antipodal points) are identified (considered to be the same). This is also one of the standard models of the real projective plane. The difference is that as a model of elliptic geometry a metric is introduced permitting the measurement of lengths and angles, while as a model of the projective plane there is no such metric.

In the elliptic model, for any given line *ℓ* and a point *A*, which is not on *ℓ*, all lines through *A* will intersect *ℓ*.

Even after the work of Lobachevsky, Gauss, and Bolyai, the question remained: "Does such a model exist for hyperbolic geometry?". The model for hyperbolic geometry was answered by Eugenio Beltrami, in 1868, who first showed that a surface called the pseudosphere has the appropriate curvature to model a portion of hyperbolic space and in a second paper in the same year, defined the Klein model which models the entirety of hyperbolic space, and used this to show that Euclidean geometry and hyperbolic geometry were equiconsistent so that hyperbolic geometry was logically consistent if and only if Euclidean geometry was. (The reverse implication follows from the horosphere model of Euclidean geometry.)

In the hyperbolic model, within a two-dimensional plane, for any given line *ℓ* and a point *A*, which is not on *ℓ*, there are infinitely many lines through *A* that do not intersect *ℓ*.

In these models the concepts of non-Euclidean geometries are being represented by Euclidean objects in a Euclidean setting. This introduces a perceptual distortion wherein the straight lines of the non-Euclidean geometry are being represented by Euclidean curves which visually bend. This "bending" is not a property of the non-Euclidean lines, only an artifice of the way they are being represented.

In three dimensions, there are eight models of geometries. There are Euclidean, elliptic, and hyperbolic geometries, as in the two-dimensional case; mixed geometries that are partially Euclidean and partially hyperbolic or spherical; twisted versions of the mixed geometries; and one unusual geometry that is completely anisotropic (i.e. every direction behaves differently).

Euclidean and non-Euclidean geometries naturally have many similar properties, namely those which do not depend upon the nature of parallelism. This commonality is the subject of absolute geometry (also called *neutral geometry*). However, the properties which distinguish one geometry from the others are the ones which have historically received the most attention.

Besides the behavior of lines with respect to a common perpendicular, mentioned in the introduction, we also have the following:

A Lambert quadrilateral is a quadrilateral which has three right angles. The fourth angle of a Lambert quadrilateral is acute if the geometry is hyperbolic, a right angle if the geometry is Euclidean or obtuse if the geometry is elliptic. Consequently, rectangles exist (a statement equivalent to the parallel postulate) only in Euclidean geometry.
A Saccheri quadrilateral is a quadrilateral which has two sides of equal length, both perpendicular to a side called the *base*. The other two angles of a Saccheri quadrilateral are called the *summit angles* and they have equal measure. The summit angles of a Saccheri quadrilateral are acute if the geometry is hyperbolic, right angles if the geometry is Euclidean and obtuse angles if the geometry is elliptic.
The sum of the measures of the angles of any triangle is less than 180° if the geometry is hyperbolic, equal to 180° if the geometry is Euclidean, and greater than 180° if the geometry is elliptic. The *defect* of a triangle is the numerical value (180° - sum of the measures of the angles of the triangle). This result may also be stated as: the defect of triangles in hyperbolic geometry is positive, the defect of triangles in Euclidean geometry is zero, and the defect of triangles in elliptic geometry is negative.
Before the models of a non-Euclidean plane were presented by Beltrami, Klein, and Poincaré, Euclidean geometry stood unchallenged as the mathematical model of space. Furthermore, since the substance of the subject in synthetic geometry was a chief exhibit of rationality, the Euclidean point of view represented absolute authority.

The discovery of the non-Euclidean geometries had a ripple effect which went far beyond the boundaries of mathematics and science. The philosopher Immanuel Kant's treatment of human knowledge had a special role for geometry. It was his prime example of synthetic a priori knowledge; not derived from the senses nor deduced through logic — our knowledge of space was a truth that we were born with. Unfortunately for Kant, his concept of this unalterably true geometry was Euclidean. Theology was also affected by the change from absolute truth to relative truth in the way that mathematics is related to the world around it, that was a result of this paradigm shift.

Non-Euclidean geometry is an example of a scientific revolution in the history of science, in which mathematicians and scientists changed the way they viewed their subjects. Some geometers called Lobachevsky the "Copernicus of Geometry" due to the revolutionary character of his work.

The existence of non-Euclidean geometries impacted the intellectual life of Victorian England in many ways and in particular was one of the leading factors that caused a re-examination of the teaching of geometry based on Euclid's Elements. This curriculum issue was hotly debated at the time and was even the subject of a book, *Euclid and his Modern Rivals*, written by Charles Lutwidge Dodgson (1832–1898) better known as Lewis Carroll, the author of *Alice in Wonderland*.

In analytic geometry a plane is described with Cartesian coordinates : *C* = { (*x,y*) : *x*, *y* ∈ ℝ }. The points are sometimes identified with complex numbers *z* = *x* + *y* ε where ε^{2} ∈ {-1, 0, 1}.

The Euclidean plane corresponds to the case ε^{2} = −1 since the modulus of *z* is given by

z
z
∗
=
(
x
+
y
ϵ
)
(
x
−
y
ϵ
)
=
x
2
+
y
2
and this quantity is the square of the Euclidean distance between *z* and the origin. For instance, {*z* | *z z** = 1} is the unit circle.

For planar algebra, non-Euclidean geometry arises in the other cases. When ε^{2} = +1, then *z* is a split-complex number and conventionally **j** replaces epsilon. Then

z
z
∗
=
(
x
+
y
j
)
(
x
−
y
j
)
=
x
2
−
y
2
and {*z* | *z z** = 1} is the unit hyperbola.

When ε^{2} = 0, then *z* is a dual number.

This approach to non-Euclidean geometry explains the non-Euclidean angles: the parameters of slope in the dual number plane and hyperbolic angle in the split-complex plane correspond to angle in Euclidean geometry. Indeed, they each arise in polar decomposition of a complex number z.

Hyperbolic geometry found an application in kinematics with the physical cosmology introduced by Hermann Minkowski in 1908. Minkowski introduced terms like worldline and proper time into mathematical physics. He realized that the submanifold, of events one moment of proper time into the future, could be considered a hyperbolic space of three dimensions. Already in the 1890s Alexander Macfarlane was charting this submanifold through his Algebra of Physics and hyperbolic quaternions, though Macfarlane did not use cosmological language as Minkowski did in 1908. The relevant structure is now called the hyperboloid model of hyperbolic geometry.

The non-Euclidean planar algebras support kinematic geometries in the plane. For instance, the split-complex number *z* = e^{aj} can represent a spacetime event one moment into the future of a frame of reference of rapidity a. Furthermore, multiplication by *z* amounts to a Lorentz boost mapping the frame with rapidity zero to that with rapidity *a*.

Kinematic study makes use of the dual numbers
z
=
x
+
y
ϵ
,
ϵ
2
=
0
,
to represent the classical description of motion in absolute time and space: The equations
x
′
=
x
+
v
t
,
t
′
=
t
are equivalent to a shear mapping in linear algebra:

(
x
′
t
′
)
=
(
1
v
0
1
)
(
x
t
)
.
With dual numbers the mapping is
t
′
+
x
′
ϵ
=
(
1
+
v
ϵ
)
(
t
+
x
ϵ
)
=
t
+
(
x
+
v
t
)
ϵ
.

Another view of special relativity as a non-Euclidean geometry was advanced by E. B. Wilson and Gilbert Lewis in *Proceedings of the American Academy of Arts and Sciences* in 1912. They revamped the analytic geometry implicit in the split-complex number algebra into synthetic geometry of premises and deductions.

Non-Euclidean geometry often makes appearances in works of science fiction and fantasy.

In 1895 H. G. Wells published the short story "The Remarkable Case of Davidson’s Eyes". To appreciate this story one should know how antipodal points on a sphere are identified in a model of the elliptic plane. In the story, in the midst of a thunderstorm, Sidney Davidson sees "Waves and a remarkably neat schooner" while working in an electrical laboratory at Harlow Technical College. At the story’s close Davidson proves to have witnessed H.M.S. *Fulmar* off Antipodes Island.
Non-Euclidean geometry is sometimes connected with the influence of the 20th century horror fiction writer H. P. Lovecraft. In his works, many unnatural things follow their own unique laws of geometry: In Lovecraft's Cthulhu Mythos, the sunken city of R'lyeh is characterized by its non-Euclidean geometry. It is heavily implied this is achieved as a side effect of not following the natural laws of this universe rather than simply using an alternate geometric model, as the sheer innate wrongness of it is said to be capable of driving those who look upon it insane.
The main character in Robert Pirsig's *Zen and the Art of Motorcycle Maintenance* mentioned Riemannian Geometry on multiple occasions.
In *The Brothers Karamazov*, Dostoevsky discusses non-Euclidean geometry through his main character Ivan.
Christopher Priest's novel *Inverted World* describes the struggle of living on a planet with the form of a rotating pseudosphere.
Robert Heinlein's *The Number of the Beast* utilizes non-Euclidean geometry to explain instantaneous transport through space and time and between parallel and fictional universes.
Alexander Bruce's *Antichamber* uses non-Euclidean geometry to create a minimal, Escher-like world, where geometry and space follow unfamiliar rules.
Zeno Rogue's *HyperRogue* is a roguelike game set on the hyperbolic plane, allowing the player to experience many properties of this geometry. Many mechanics, quests, and locations are strongly dependent on the features of hyperbolic geometry.
In the Renegade Legion science fiction setting for FASA's wargame, role-playing-game and fiction, faster-than-light travel and communications is possible through the use of Hsieh Ho's Polydimensional Non-Euclidean Geometry, published sometime in the middle of the 22nd century.
In Ian Stewart's *Flatterland* the protagonist Victoria Line visit all kinds of non-Euclidean worlds.
In Jean-Pierre Petit's *Here's looking at Euclid (and not looking at Euclid)* Archibald Higgins stumbles upon spherical geometry