In God's mind, true faith or living faith is virtually synonymous with obedience and works. Faith and obedience are interchangeable, even though they are not specifically the same thing. This is just like the Bible's usage of mind, heart, and spirit—they are not specifically the same thing, yet they are so interconnected that they really cannot be separated.
What then shall we say that Abraham our father has found according to the flesh? For if Abraham was justified by works, he has something to boast about, but not before God. For what does the Scripture say? "Abraham believed God, and it was accounted to him for righteousness."
This verse in essence says that Abraham was justified because he believed. He was legally righteous before God because of his faith. This becomes the basis for Paul's teaching that justification is by faith and not by works. What Paul does not mention here is that Abraham's justification (Genesis 15:6) occurred 14 years before Abraham was circumcised. Paul's conclusion is that, based on Genesis 15:6, Abraham was justified by faith. The "work" of circumcision did not come for another 14 years! The circumcision did not justify him—the faith did. See the notes at Galatians 2:16.
Paul explains further in verses 21-25:
And being fully convinced that what He had promised He was also able to perform. And therefore "it was accounted to him for righteousness." Now it was not written for his sake alone that it was imputed to him, but also for us. It shall be imputed to us who believe in Him who raised up Jesus our Lord from the dead, who was delivered up because of our offenses, and was raised because of our justification.
Paul shows that we are also justified (cleared of guilt, have our sins wiped away) by belief in the blood of Jesus Christ. What God did for Abraham, He will also do for us. Paul's conclusion then is that justification is by faith.
But like Galatians 2:16, this seemingly sets up a paradox, because faith does not stand alone:
But do you want to know, O foolish man, that faith without works is dead? Was not Abraham our father justified by works when he offered Isaac his son on the altar? Do you see that faith was working together with his works, and by works faith was made perfect? And the Scripture was fulfilled which says, "Abraham believed God, and it was accounted to him for righteousness." And he was called the friend of God. You see then that a man is justified by works, and not by faith only. (James 2:20-24)
Paul also points out that there is more to the equation of justification than just faith in Romans 2:13: "For not the hearers of the law are just before God, but the doers of the law shall be justified."
These last two scriptures show that living faith cannot be separated from obedience—from works. Faith and works go together; where there is living faith, there will always be good works. If no works are produced, there is no living faith. What we truly and deeply believe will determine the actions we take in our lives. If we truly believe something, our "works"—what we do in our lives—will always point to that. "For as he thinks in his heart, so is he" (Proverbs 23:7)—a man lives and acts according to what his core is.
As discussed previously (Galatians 2:16), these verses are in fact complementary, not contradictory. Each of these passages has a different context and purpose, and so we do not get the whole answer from any one of them individually. James' purpose is to show that there are two kinds of faith—living and dead, genuine and professing.
James says that a person's faith is perfected or completed by the kind of works that the faith produces. He shows that it is the kind of faith that Abraham had that made the real difference and brought about justification. Justification is entirely an act on God's part, but the kind of faith that brings about justification is the same kind that also brings about good works. It is not our works that save us, but only those who are "working" in the right way will be saved because their works will be indicative of what they truly believe in. Living faith, which James talks about, cannot be separated from works.
Paul backs this up in his second letter to the Corinthian church:
So we are always confident, knowing that while we are at home in the body we are absent from the Lord. For we walk by faith, not by sight. We are confident, yes, well pleased rather to be absent from the body and to be present with the Lord. Therefore we make it our aim [work; labor], whether present or absent, to be well pleasing to Him [our acceptance by Him after being justified is dependent on what we do!]. For we must all appear before the judgment seat of Christ, that each one may receive the things done in the body, according to what he has done, whether good or bad. (II Corinthians 5:6-10)
Paul lived by faith, but he worked (labored) so that he would be acceptable to God. If he did not work, he would not have been acceptable to God even though he professed God, said he believed in Christ, had faith that He could save, etc. His works were an indicator to God of what he had faith in—what he believed.
Paul's faith was the same faith that James was talking about—a living, active faith which produces good things—good works. Dead faith is inactive (toward the things of God). It does not produce anything profitable. It is the particular kind and quality of works that separates the Christian from the world, giving evidence of what a person believes.