The Bible did not (speaking with "tongue in cheek") invent the term "righteousness." A commentator cites a Mesopotamian word based on a river reed being used as a ruler to measure if walls were straight. This would be an absolute standard. But when it comes to the expectations of a society, the standards could vary from culture to culture. At a higher philosophical level you might consider the relative humanist who could say that expectations change to whatever currently works, which would mean that there was only a relative standard. If you consider the evolutionist he might conclude that whatever is necessary to survive is the standard, whereby expectations would vary according to circumstances. One source cited that Greek writing treated righteousness as someone who conformed to the expectations of diety and society. In the Bible it relates to the Hebrew word "tsedeq" and the Greek root "dikaio." All the relevant words are used in various ways so that translators had to select the correct English word for the appropriate context. In the former it would mean "rightness." It would refer to a state of being such as being right as opposed to being wrong. It would be an attribute of a person having a state of integrity relative to God's standards or the expectations of society. God implemented a practical application of his character when he chose Israel and called Jerusalem the "'city of righteousness, a faithful city'" (Isa 1:26). "He has filled Zion with justice and righteousness" (33:5). "'They will call you the city of the Lord, the Zion of the Holy One of Israel'" (60:14). It was a unilateral purpose of God because "'It is not for your righteousness or for the uprightness of your heart'" (Dt 9:5) that "'God is giving you this good land to possess, for you are a stubborn people'" (:6).
Righteousness becomes meaningful when there are relationships involved. They can be nurturing or destructive. Relations exist between family members, friends, fellow citizens and foreigners. They are expressed through conversation and behavior. Righteousness is the glue that holds families and society together. "Sow with a view to righteousness. Reap in accordance with kindness" (Hos 10:12). In Israel the "saddiq" was a wise person who got "wisdom . . . [and then] the father of the righteous" (Prv 23:23-24) greatly rejoiced. The Hebrew word "sedeq" refers to an action which conforms to a norm. There is ethical conduct expressed by, "'You shall have just balances [and] just weights'" (Lev 19:36). In context, the word "justice" is derived from the same source as "righteousness." "'You shall appoint for yourself judges . . . and they shall judge the people with righteous judgment'" (Dt 16:18). "'If a man is righteous and practices justice and righteousness'" (Eze 18:5) he "executes true justice between man and man'" (:8). "Give the king Your judgments, O God . . . [that he may] judge Your people with righteousness and Your afflicted with justice" (Ps 72:1). God called Israel beginning with Abraham but then had to supply them with the Law so they would have a revelation of how to conduct themselves. The king was God's appointed theocratic ruler and was to be obedient to God's leading. David advised Solomon, "'Keep the charge of the Lord your God, to walk in His ways, to keep His statutes, His commandments, His ordinances, and His testimonies, according to what is written in the Law of Moses, that you may succeed in all that you do and wherever you turn'" (1Ki 2:3).