"Perhaps there are fifty righteous people in the midst of the city…" (Genesis 18:24)
A close reading of the verse reveals that Avraham isn’t merely in search of fifty Tzaddikim. No, he inquires as to whether there are fifty righteous people “in the midst of the city.”
What’s the difference?
Ibn Izra and R. Shamshon Raphael Hirsch explain that Avraham’s criterion of righteousness is very precise.
He was not impressed by someone who lived a holy-but-isolated lifestyle. Such a personage has little chance of influencing his surroundings and inspiring those around him towards holiness. Instead, Avraham was in search of “fifty righteous people in the midst of the city.”
Ibn Ezra understands this term as referring to people who are openly Yirei Shamayim. R. Hirsch understands this term as referring to a person who scales the heights of Kedusha (holiness) and is also involved with his fellow man – for this person has a reasonable chance of inspiring others to Teshuva.
These were the types of people Avraham was in search of, and sadly, not even ten were to be found in all of Sodom or its surrounding cities.