 Rajam died of typhoid in 1939 . Her death affected Narayan deeply and he remained depressed for a long time ; he was also concerned for their daughter Hema , who was only three years old . The bereavement brought about a significant change in his life and was the inspiration behind his next novel , The English Teacher . This book , like his first two books , is autobiographical , but more so , and completes an unintentional thematic trilogy following Swami and Friends and The Bachelor of Arts . In subsequent interviews , Narayan acknowledges that The English Teacher was almost entirely an autobiography , albeit with different names for the characters and the change of setting in Malgudi ; he also explains that the emotions detailed in the book reflected his own at the time of Rajam 's death . 
