Bolyai was born in Kolozsvár, Transylvania, Austro-Hungarian Empire (today Cluj-Napoca, Romania). When he was 13, he had mastered the calculus and other forms of analytical mechanics, his father Farkas Bolyai giving him instructions.
He studied at the Royal Engineering College in Vienna from 1818 to 1822. Between 1820 and 1823 he prepared a treatise on a complete system of non-Euclidean geometry. Bolyai's work was published in 1832 as an Appendix to an essay by his father.
Gauss, on reading the Appendix, wrote to a friend saying "I regard this young geometer Bolyai as a genius of the first order". In 1848 Bolyai discovered not only that Lobachevsky had published a similar piece of work in 1829, but also a generalisation of this theory. So as we know, Lobachevsky published his work a few years earlier then Bolyai, but it contained only hyperbolic geometry. Bolyai and Lobachevsky didn't known each other or each other's works.
In addition to his work in geometry, Bolyai developed a rigorous geometric concept of complex numbers as ordered pairs of real numbers. Although he never published more than the 24 pages of the Appendix, he left more than 20000 pages of manuscript of mathematical work when he died. These are now in the Bolyai-Teleki library in Targu-Mures, Romania.