Did Ramanujan have any formal training in mathematics? I read that he did not. Then how did he learn to do mathematics? Mathematics does not come from instinct. You have to learn the basic facts. How did Ramanujan manage to solve hard mathematical problems with so little knowledge of theorems?
First hand testimony and insightful thoughts on Ramanujan's background and way of doing mathematics can be found in Hardy's lecture Indian Mathematician Ramanujan. Hardy is the British mathematician who first appreciated the full extent of Ramanujan's talent, knew him well personally, and had a fruitful mathematical collaboration with him.
Here is Hardy's review of Ramanujan's mathematical education:"He was sent at 7 to the High School of Kumbakonam, and remained there nine years. His exceptional abilities had begun to show themselves before he was 10, and by the time that he was 12 or 13 he was recognised as a quite abnormal boy. His biographers tell some curious stories of his early years. They say for example that, soon after he had begun the study of trigonometry, he discovered for himself "Euler's theorems for the sine and cosine" (by which I understand the relations between the circular and exponential functions), and was very disappointed when he found later, apparently from the second volume of Loney's Trigonometry, that they were known already. Until he was 16 he had never seen a mathematical book of any higher class... He had had no real teaching at all; there was no one in India from whom he had anything to learn. He can have seen at the outside three or four books of good quality, all of them English. There had been periods in his life when he had access to the library in Madras, but it was not a very good one".
What Ramanujan lacked in education however he made up for with his natural knack for mathematics, especially his ability to recognize and relate highly non-obvious abstract and symbolic patterns. These abilities while not instinctive likely have an underlying biological component. However, it was not just natural ability that distinguished Ramanujan, but also hard work and intensity of concentration:"he was so absorbed in the study of Mathematics that in all lecture hours-whether devoted to English, History, or Physiology - he used to engage himself in some mathematical investigation, unmindful of what was happening in the class".
And there was a book that made a difference:"It was a book of a very different kind, Carr's Synopsis, which first aroused Ramanujan's full powers... The book is not in any sense a great one, but Ramanujan has made it famous, arid there is no doubt that it influenced him profoundly and that his acquaintance with it marked the real starting point of his career... Carr has sections on the obvious subjects, algebra, trigonometry, calculus and analytical geometry, but some sections are developed disproportionally, and particularly the formal side of the integral calculus. This seems to have been Carr's pet subject, and the treatment of it is very full and in its way definitely good. There is no theory of functions... What is more surprising, in view of Carr's own tastes and Ramanujan's later work, is that there is no elliptic functions. However Ramanujan may have acquired his very peculiar knowledge of this theory, it was not from Carr. On the whole, considered as an inspiration for a boy of such abnormal gifts, Carr was not too bad, and Ramanujan responded amazingly."
Nonetheless the lack of education had obvious adverse effects on Ramanujan's mathematical accomplishments:"He worked, for most of his life, in practically complete ignorance of modern European mathematics, and died when he was a little over 30 and when his mathematical education had in some ways hardly begun... Whittaker's Modern Analysis had not yet spread so far, and Bromwich's Infinite Series did not exist. There can be no doubt that either of these books would have made a tremendous difference to him if they could have come his way... He had been carrying an impossible handicap, a poor and solitary Hindu pitting his brains against the accumulated wisdom of Europe... It was impossible to teach him systematically, but he gradually absorbed new points of view. In particular he learnt what was meant by proof, and his later papers, while in some ways as odd and individual as ever, read like the works of a well-informed mathematician. His methods and his weapons, however, remained essentially the same." But we can also never know how originality of his thought would have been affected had he been educated more traditionally.
Ramanujan was mainly self-taught, he took good use of this book whose name is "A Synopsis of Elementary Results in Pure and Applied Mathematics" by George Shoobridge Carr, and was well inspired by it.
Read the book from the link below.