That is true for a booming economy, but not for the inverted yield case.
It all comes down to where investors think the Fed is headed when it comes to interest rates.
For a booming economy the Fed puts up rates in an effort to slow growth.
For a lagging economy the Fed cuts the rate in an effort to stimulate growth.
Now consider the investor wanting to invest in bonds hoping for the best possible return.
In a booming economy you would only invest in short term 5 year bonds because chances are future interest rates will be higher than what you are currently getting.
But for a slowing economy it might be better to invest in the 10 year bond, to lock in a long term interest rate only because in the future interest rates may well be lower.
Now consider the supply and demand forces that also come into play.
When the demand is high the price goes up and the yield goes down and when the demand is low the price goes down and the yield goes up.
So when you have large numbers of investors wanting to get out of 5 year bonds (i.e. high selling) and into 10 year bonds (i.e. high buying) you get this inverted yield situation.