S. Ramanujan's father, Srinavasa was a petty clerk in a saree shop in Kumbhakonam that is about 320 kilometers southwest of Madras. The inhabitants of the Kumbhakonam were mainly craftsmen and metal-workers. S. Ramanujan was brought up in a small hut-like house on the Sarangapani Sannidhi Street of this little known town. The highly religious nature, faith in astrology, psychic powers and superstitions of his mother, Komalatammal, had a strong hold on S. Ramanujan from his childhood. While growing up, Ramanujan also became a firm practitioner of religious customs, a believer in astrology and palmistry. He attributed his entire mathematical prowess to the blessings of the Goddess Namagiri, as well.
S. Ramanujan was unlike most of the other children of his age, during his childhood. He was never that much naughty, rather he was quiet, meditative and also had an extraordinary memory. He was a self-willed child and always did what and when he liked doing. The most unique thing about Ramanujan was that he was very fond of mathematics and curious about the world, right from his childhood. He always had the habit of questioning his mother about the world. His love for mathematics started with an incidence, when he came home crying, as one of his classmates scored more marks than him in mathematics. Though, Ramanujan paid attention to all the subjects in the early years of his schooling, he started to show his precocity in mathematics, while growing up. He would often mentally solve a mathematical question before the teacher could do that on the blackboard. Sometimes, he would also offer an alternative method of solving the same question or give an easier or quicker way of doing the same, to the teacher. He also used to finish his mathematics paper within half the time, during examinations.
Because of this strange nature and his extraordinary talent, the teachers of S. Ramanujan's school liked him very much and they also praised him openly in class. Ramanujan was bothered about several questions like 'What is the highest truth in mathematics?' right from his early age. He would often quiz his mathematics teachers on the same. Ramanujan got admitted in the Town High School in Kumbhakonam in January 1898. Ramanujan's genius was revealed for the first time during a mathematics class in the Town High School, where the students were being taught the simple sums of division. It was in this class, where Ramanujan started to develop a life-long fascination for zero and infinity, as anything that is divided by zero is infinite. He could also often rattle off the value of pi (n), e, square root of two etc., up to any places of decimals, at any time. Apart from his love for mathematics, Ramanujan was also well educated in the ancient Indian philosophical books like Vedas, Upanishads and Hindu scriptures. He could also recite shlokas from those books, along with a running commentary on their meaning.
S. Ramanujan received the prestigious K. Ranganatha Rao Prize for standing first in Mathematics in a school examination, during his childhood. After that, he also became successful to win the Junior Subrahmanyam Scholarship in a school competitive examination for standing first in Mathematics and English. While winning those prizes, S. Ramanujan was also introduced to S. L. Loney's book Trigonometry, through one of the college boarders in his house. The book was recommended as a textbook in colleges at that time. Though Ramanujan was only thirteen years old then, he did not take much time to master the subject. However, he faced some problems while studying the other subjects like English, Greek and Roman History, and Physiology, in the higher classes. He could not pay due attention to those subjects for his great love for Mathematics and hence, he started to score badly in those subjects.
The difficulties of S. Ramanujan increased once he passed the Matriculation and entered into the F.A. (First Arts) in the Government College, Kumbhakonam. He was overwhelmed by Mathematics and mathematics stated to come in a flood to him by that time and that caused a huge loss for Ramanujan's study of the other subjects. Ramanujan became more and more interested in Mathematics after he came across George Shoobridge Carr's book titled "A Synopsis of Elementary Results in Pure and Applied Mathematics", published in 1886. The book contained about 6,000 problems in algebra, trigonometry, calculus and analytical geometry and it did not discuss any of the problems adequately or give step-by-step proofs. Rather on some occasions it simply gave hints to solve the problems. The book had a huge effect on Ramanujan and it actually changed his outlook and life forever. He made every problem mentioned in the book, a research project for him. It was this book that led Ramanujan to such a condition, where he could not think of anything else but mathematics, whether he was sleeping or awake.
As S. Ramanujan did not have the proper training and guidance in higher mathematics, he used to look at every problem given in the book Synopsis, with 'fresh' eyes. Though the problems described in Carr's book had already been solved more than 150 years ago in Europe, Ramanujan started to solve them in his own ingenious way. As a result, though sometimes he solved them just in the way they were solved earlier by European mathematicians, he occasionally solved them through altogether novel methods. He also often used to go far beyond into new realms of mathematics, where no European mathematician had gone before, in seeking solutions of the problems. He also made wonderful discoveries in mathematics, during the course of time, almost unknowingly. He also had the habit of hiding some of the mathematical calculations, when he came to know that what he had discovered was already a part of a higher mathematics text-book.
S. Ramanujan used to sit on the pial (steps) of his house during leisure period, with a slate and a notebook and think about mathematics and also play with numbers. Whenever he solved a problem or he felt he had reached an important result, he would immediately write down in his ledger-like notebook. He had also sometimes re-made the brilliant discoveries of European mathematicians and sometimes made original contributions to mathematics, while playing with numbers. However, as Ramanujan neglected the other subjects due to this mathematical outpouring, he failed miserably in his F.A. examination. Although he did very well in mathematics, he could hardly obtain 20 to 30 per cent marks in all the other subjects. He got a huge shock from this failure and in shame, he ran away from home. However, his father travelled from here to there to search Ramanujan and eventually became successful to get Ramanujan back at home.
After finding him out, S. Ramanujan's father sent him to Madras, where he impressed the Principal of the Pachaiappa College and got admission in F.A. class again in 1903. However, he once again failed miserably in the examinations and that was the end of formal education for Ramanujan. S. Ramanujan's mother did not like this at all and she soon arranged for his marriage, with an intention to get Ramanujan back into normal life. She came across the nine-year-old Janaki during a visit to a neighbouring town and talked with Janaki's parents for getting her as daughter-in-law. Ramanujan got married on 14 July 1909. The marriage changed Ramanujan almost completely, as he became more responsible and actively started to look for a job to meet the needs of the family. That was the time; when Ramanujan started to get less time for playing with numbers and fulfilling his desires of solving mathematical problems. The situation also eventually led him get his first job in the Madras Port Trust.