In the first book, two definitions of justice are proposed but deemed inadequate. Returning debts owed, and helping friends while harming enemies, are commonsense definitions of justice that, Socrates shows, are inadequate in exceptional situations, and thus lack the rigidity demanded of a definition. Yet he does not completely reject them, for each expresses a commonsense notion of justice that Socrates will incorporate into his discussion of the just regime in books II through V.
At the end of Book I, Socrates agrees with Polemarchus that justice includes helping friends, but says the just man would never do harm to anybody. Thrasymachus believes that Socrates has done the men present an injustice by saying this and attacks his character and reputation in front of the group, partly because he suspects that Socrates himself does not even believe harming enemies is unjust. Thrasymachus gives his understanding of justice and injustice as "justice is what is advantageous to the stronger, while injustice is to one's own profit and advantage". Socrates finds this definition unclear and begins to question Thrasymachus. Socrates then asks whether the ruler who makes a mistake by making a law that lessens their well-being, is still a ruler according to that definition. Thrasymachus agrees that no true ruler would make such an error. This agreement allows Socrates to undermine Thrasymachus' strict definition of justice by comparing rulers to people of various professions. Thrasymachus consents to Socrates' assertion that an artist is someone who does his job well, and is a knower of some art, which allows him to complete the job well. In so doing Socrates gets Thrasymachus to admit that rulers who enact a law that does not benefit them firstly, are in the precise sense not rulers. Thrasymachus gives up, and is silent from then on. Socrates has trapped Thrasymachus into admitting the strong man who makes a mistake is not the strong man in the precise sense, and that some type of knowledge is required to rule perfectly. However, it is far from a satisfactory definition of justice.
At the beginning of Book II, Plato's two brothers challenge Socrates to define justice in the man, and unlike the rather short and simple definitions offered in Book I, their views of justice are presented in two independent speeches. Glaucon's speech reprises Thrasymachus' idea of justice; it starts with the legend of Gyges, who discovered a ring (the so-called Ring of Gyges) that gave him the power to become invisible. Glaucon uses this story to argue that no man would be just if he had the opportunity of doing injustice with impunity. With the power to become invisible, Gyges is able to seduce the queen, murder the king, and take over the kingdom. Glaucon argues that the just as well as the unjust man would do the same if they had the power to get away with injustice exempt from punishment. The only reason that men are just and praise justice is out of fear of being punished for injustice. The law is a product of compromise between individuals who agree not to do injustice to others if others will not do injustice to them. Glaucon says that if people had the power to do injustice without fear of punishment, they would not enter into such an agreement. Glaucon uses this argument to challenge Socrates to defend the position that the just life is better than the unjust life. Adeimantus adds to Glaucon's speech the charge that men are only just for the results that justice brings one fortune, honor, reputation. Adeimantus challenges Socrates to prove that being just is worth something in and of itself, not only as a means to an end.
Socrates says that there is no better topic to debate. In response to the two views of injustice and justice presented by Glaucon and Adeimantus, he claims incompetence, but feels it would be impious to leave justice in such doubt. Thus the Republic sets out to define justice. Given the difficulty of this task as proven in Book I, Socrates in Book II leads his interlocutors into a discussion of justice in the city, which Socrates suggests may help them see justice not only in the person, but on a larger scale, "first in cities searching for what it is; then thusly we could examine also in some individual, examining the likeness of the bigger in the idea of the littler".
For over two and a half millennia, scholars have differed on the aptness of the city–soul analogy Socrates uses to find justice in Books II through V. The Republic is a dramatic dialogue, not a treatise. Socrates' definition of justice is never unconditionally stated, only versions of justice within each city are "found" and evaluated in Books II through Book V. Socrates constantly refers the definition of justice back to the conditions of the city for which it is created. He builds a series of myths, or noble lies, to make the cities appear just, and these conditions moderate life within the communities. The "earth born" myth makes all men believe that they are born from the earth and have predestined natures within their veins. Accordingly, Socrates defines justice as "working at that to which he is naturally best suited", and "to do one's own business and not to be a busybody" and goes on to say that justice sustains and perfects the other three cardinal virtues: Temperance, Wisdom, and Courage, and that justice is the cause and condition of their existence. Socrates does not include justice as a virtue within the city, suggesting that justice does not exist within the human soul either, rather it is the result of a "well ordered" soul. A result of this conception of justice separates people into three types; that of the soldier, that of the producer, and that of a ruler. If a ruler can create just laws, and if the warriors can carry out the orders of the rulers, and if the producers can obey this authority, then a society will be just.
The city is challenged by Adeimantus and Glaucon throughout its development: Adeimantus cannot find happiness in the city, and Glaucon cannot find honor and glory. This hypothetical city contains no private property, no marriage, or nuclear families. These are sacrificed for the common good and doing what is best fitting to one's nature. In Book V Socrates addresses the question of "natural-ness" of and possibility for this city, concluding in Book VI, that the city's ontological status regards a construction of the soul, not of an actual metropolis.
The rule of philosopher-kings appear as the issue of possibility is raised. Socrates never positively states what justice is in the human soul/city; it appears he has created a city where justice is not found, but can be lost. It is as though in a well-ordered state, justice is not even needed, since the community satisfies the needs of humans.
In terms of why it is best to be just rather than unjust for the individual, Plato prepares an answer in Book IX consisting of three main arguments. Plato says that a tyrant's nature will leave him with "horrid pains and pangs" and that the typical tyrant engages in a lifestyle that will be physically and mentally exacting on such a ruler. Such a disposition is in contrast to the truth-loving philosopher-king, and a tyrant "never tastes of true freedom or friendship". The second argument proposes that of all the different types of people, only the philosopher is able to judge which type of ruler is best since only he can see the Form of the Good. Thirdly, Plato argues, "Pleasures which are approved of by the lover of wisdom and reason are the truest". In sum, Plato argues that philosophical pleasure is the only true pleasure since other pleasures experienced by others are simply a neutral state free of pain.
Socrates points out the human tendency to be corrupted by power leads down the road to timocracy, oligarchy, democracy and tyranny. From this, he concludes that ruling should be left to philosophers, who are the most just and therefore least susceptible to corruption. This "good city" is depicted as being governed by philosopher-kings; disinterested persons who rule not for their personal enjoyment but for the good of the city-state (polis). The philosophers have seen the "Forms" and therefore know what is good. They understand the corrupting effect of greed and own no property and receive no salary. They also live in sober communism, eating and sleeping together.
The paradigmatic society which stands behind every historical society is hierarchical, but social classes have a marginal permeability; there are no slaves, no discrimination between men and women. The men and women are both to be taught the same things, so they are both able to be used for the same things (451e). In addition to the ruling class of guardians (φύλακες), which abolished riches, there is a class of private producers (demiourgoi), who may be rich or poor. A number of provisions aim to avoid making the people weak: the substitution of a universal educational system for men and women instead of debilitating music, poetry and theatre – a startling departure from Greek society. These provisions apply to all classes, and the restrictions placed on the philosopher-kings chosen from the warrior class and the warriors are much more severe than those placed on the producers, because the rulers must be kept away from any source of corruption.
In Books V-VI the abolition of riches among the guardian class (not unlike Max Weber's bureaucracy) leads controversially to the abandonment of the typical family, and as such no child may know his or her parents and the parents may not know their own children. Socrates tells a tale which is the "allegory of the good government". The rulers assemble couples for reproduction, based on breeding criteria. Thus, stable population is achieved through eugenics and social cohesion is projected to be high because familial links are extended towards everyone in the city. Also the education of the youth is such that they are taught of only works of writing that encourage them to improve themselves for the state's good, and envision (the) god(s) as entirely good, just, and the author(s) of only that which is good.
In Books VII-X stand Plato's criticism of the forms of government. It begins with the dismissal of timocracy, a sort of authoritarian regime, not unlike a military dictatorship. Plato offers an almost psychoanalytical explanation of the "timocrat" as one who saw his father humiliated by his mother and wants to vindicate "manliness". The third worst regime is oligarchy, the rule of a small band of rich people, millionaires that only respect money. Then comes the democratic form of government, and its susceptibility to being ruled by unfit "sectarian" demagogues. Finally the worst regime is tyranny, where the whimsical desires of the ruler became law and there is no check upon arbitrariness.