Peter Pett's Commentary on the Bible
Psalms 9 - Introduction
Psalms 9 is a song of hope and victory, looking forward to the coming of the everlasting kingdom. The first two verses exalt YHWH, and this is followed by a description of what He has done for the writer and for Israel in defeating all unrighteous opposition, and rendering them powerless. It would well fit David's chain of victories by which he established his extensive rule. But that was only temporary. Here the idea is more of the certainty that God's people will finally triumph over all their enemies, that all enemies of God will be defeated, and that finally God's righteous kingdom will come in.
So in contrast with the opposing enemies is the vision of YHWH as sovereign over all, as the righteous Judge, ruling righteously (through His chosen king), and as a fortress for those in need.
It then goes on to declare God's interest in the needy and oppressed which results in the writer's prayer that God will consider his own needs and concerns, which are also the people's, so that he may then praise God for His deliverance. And it finishes with a declaration of the certainty that one day all the sinful of the nations will be called into judgment while the needy and helpless will be remembered, and a final cry to God to make the true position known by bringing it about.
Like many psalms this one is written as a kind of acrostic. Each of the four lines in Psalms 9:1 commence with aleph (A), the second stanza begins with beth (B), and so on, but it is not carried through consistently. The poem was more important than the gimmick.