Adeimantus says the guardians' simple lifestyle won't make them happy, given the luxuries enjoyed by rulers elsewhere. Socrates says despite Thrasymachus's view, the goal of the city is not to make one group happy at the expense of another.
Socrates assumes each person will be happy engaging in the occupation that suits him best. If the city as a whole is happy, then individuals are happy.
Since the goal is happiness for the city as a whole, the guardians must ensure that the residents of the city live neither in extreme wealth nor in poverty. Wealth leads to laziness, and poverty to rebellion.
The guardians must protect the education system since it determines the quality of the citizens and the city. Wives and children of guardians are held in common. With properly educated citizens, and the guardians to make decisions, the city won't need many laws. Religion may be left to Apollo.
Having established the city, Socrates turns to the question of virtue. Since it is the best city possible, it contains all the virtues. Wisdom is the virtue of the guardians because of their education, courage is the virtue of the warriors who fight for the city, and the virtue of moderation is in each residents' happiness with his occupation. Justice lies in each person performing his own role properly, and not interfering with others performing theirs. Injustice is the opposite, people interfering with others' ability to perform their role.
Finally Socrates defines justice. Cephalus defined justice as being honest and paying what is owed, Polemarchus as legal obligations and helping friends and harming foes. Both emphasize giving what is owed as appropriate. For Plato and Socrates, justice is fulfilling one's appropriate role, and consequently giving to the city what is owed.
Socrates turns from justice on a large scale in the city, to justice in the individual. Just as the city has in its residents the virtues of wisdom, courage and moderation, the individual soul has three parts. That which measures, calculates and thinks is the rational part. That which lusts and hungers is the irrational or appetitive part. The third part is the spirit, which should control the appetites. Balance between the three results in the just man.
Socrates' argument rests on the existence of the three parts, which he supports by suggesting that there are three kinds of human "appetite" or desire. Socrates, in giving the soul three parts, created a concept of justice that works for all people in the city regardless of their role.
Balance or moderation in the individual occurs when the rational part of the soul rules the appetite and the spirit, just as moderation in the city results when the guardians rule. Such a ruler is a just man, and such a city is a just city. Injustice is the disorder and imbalance that occurs when the appetites and spirit rebel against the rational soul.
Socrates creates an analogy between the just city and the just man—both are defined by their different parts each performing its specific function.