The validity of Euclidean geometry was not questioned till the eighteenth century. Kant went to the extent of supporting his philosophical doctrine that space is a necessary representation a priori, on the basis of Euclidean geometry by considering the geometry of space as independent of experience. But, Saccheri (1667-1773) was the first man who tried to propound certain laws about 'angles' other than those laid down by Euclid. However he did not succeed fully in his efforts. In any way, the history of non-Euclidean geometry begins with Saccheri. In 1799, mathematician Gauss made a little progress in this field. He showed that it is possible that the sum of the three angles of a triangle, which should be equal to 180° according to the laws of Euclidean geometry, may be less than 180°. To decide this question, Gauss actually measured the triangle having for its vertices Inselsberg, Brocken, and Hoher Hagen (near Gottingen), using methods of the greatest refinement, but the deviation of the sum of the angles from 180° was found to lie within the limits of errors of observation.^{[1]} Thus, though it was not definitely decided whether Euclidean or non-Euclidean geometry held in the actual space, the above experiment served a great deal in the development of non-Euclidean geometry.

The honour of the discovery of non-Euclidean geometry went to Nikolai Ivanovich Lobachevsky (1793-1856), Professor of Mathematics at Kazan (in Russia), and Bolyai Janos (John) (1802-1860), a young Hungarian soldier, who during the period 1823-1829, worked on the subject, independently of each other. They showed that Euclidean geometry is neither necessary nor is it universally true. It is not necessary, because Euclid's axioms are not self-evident, but may be replaced by other axioms which are incompatible with them and which have as good a claim to acceptance from the point of view of logic: and on these alternative axioms it is possible to build up other systems of geometry. In the geometries invented by them, the postulate of Euclid concerning the parallel lines was modified and altogether new laws were propounded. This type of geometry was then known as 'hyperbolic geometry'. There are striking differences between hyperbolic and Euclidean geometry which become manifest when very large figures are concerned: parallel lines in hyperbolic geometry are not equidistant, but approach each other asymptotically at one end, and diverge to infinite separation at the other; and this is such a fundamental property that the unlikeness to Euclidean geometry becomes very pronounced: in fact, nearly all the more important characteristics of Euclidean parallelism are lost. The sum of the angles of a triangle is less than two right angles, but the deficiency is proportional to the area of the triangle, and is inappreciable for the triangles we draw in diagrams, which are small compared to the dimensions of the universe.^{[2]}

Later on, in 1954, Bernard Riemann (1826-1866) developed systematically the whole branch and in 1870, Felix Klein gave the strict and simplest proof of consistency of non-Euclidean geometry.^{[3]} Riemann also developed another kind of non-Euclidean geometry, which was then called as 'elliptic geometry'. In elliptic geometry, the assumption that the length of a straight line is infinite (which was accepted by Lobachevsky and Bolyai) was given up. Instead of this, Riemann conceived that all straight lines return into themselves, and are of the same length. In elliptic geometry, the sum of the angles of a triangle is always greater than two right angles, the excess being proportional to the area of the triangle, exactly as with triangles formed by great circles on the surface of a sphere in Euclidean space: indeed, the formula connecting the sides and angles of a tringle are the same as the formula of spherical triangle geometry; there are no parallels, as all straight lines intersect each other.^{[4]}