The setting of To Sir, With Love is the East End of London. We learn this from the very first sentence when the author and narrator talks about the traffic surrounding the bus that he is riding in Aldgate.
The author, Edward Ricardo Braithwaite, wrote about his personal experience teaching in London’s East End. Although the movie version that starred Sidney Poitier updated the story to the 1960s, the book is set during post-war London when the author took the teaching position because he found that racial discrimination prevented him from obtaining other jobs for which he was qualified.
The other passengers on the bus remind the narrator of “peasants,” so we can presume that the neighborhood is not affluent. He writes that
they dressed like peasants, they looked like peasants, and they talked like peasants.
Their speech is peppered with “lewd” remarks. This parallels the speech and general attitudes of the students when we later learn about them. As Mr. Braithwaite gets frustrated with the students' lack of respect for him, as well as for themselves, and with their rude conduct, he decides to take a stern approach to the classroom, telling the students that
As from today, there are certain courtesies which will be observed at all times in this classroom.
He decides that they will address him as “Sir,” hence the title of the book. They will address the female students as “Miss” and the male students by their last names. This is intended to create a more structured and respectful environment in his classroom.