Perpendicular
The root of the word righteous is the word right. In mathematics, a line or a vector forms a right angle with a line or a plane when it is perpendicular. Imagine that on our path through life there are times when our journey is level, times when it slopes up and times when it slopes down. When the path is relatively straight and flat, then the perpendicular line that makes a right angle with our path would be pointing straight up. So, when we are neither being challenged too greatly, nor prospering too much, then living righteously means directing our thoughts and our energies and our focus upwards toward the heavens and toward our Heavenly Father. However, if we are on a downward slope, times are tough and all of our energy is directed towards surviving this trial, then the right angle is actually pointing straight ahead. Living righteously in this case is just trying to survive and get through this in one piece. Once we're back on level ground we can turn our focus up to the heavens once more. Then again, when we are prospering and our life is actually sloping upwards, the perpendicular line making a right angle actually points behind us. I think there are two insights that we can glean from this. First, prospering does have the real danger of leading to pride and greed and selfishness. Keeping our focus or orientation in parallel with our upwards trajectory means that we will begin to focus on accumulating wealth and strength and power for its own sake, and not to improve our lives or the lives of others. However, if we live righteously, which in this case is orienting our focus behind us, we will first, be able to look back on how often the Lord has strengthened us through the downward slopes, ennobled and enlightened us through the flat slopes, and prospered us through upward slopes, and second, we will be able to see our brothers and sisters who are struggling and reach out to bless their lives with the abundance we've been given. Again if we are going through great hardships, such that our quality of life seems to be getting worse, then living righteously means focusing on surviving and getting through the trial. And if we are prospering such that our quality of life seems to be getting better, then living righteously means looking back at how far we've come and also seeing how we can improve the lives of our brothers and sisters with our newfound prosperity. And if we are neither overwhelmed by adversity nor in danger of being enraptured by our prosperity, then living righteously means being still, and coming to know God and understand Him better.