Does retained earnings include investment capital?

I thought no. I thought retained earnings is cumulative net income - dividends.

However, Wikipedia says:

Ending Retained Earnings = Beginning Retained Earnings + Investments − Dividends Paid + Net Income

Why are investments included in retained earnings calculations?

2 answers

On October 31, the stockholders’ equity section of Omar Company consists of common
stock $600,000 and retained earnings $900,000. Omar is considering the following two
courses of action: (1) declaring a 5% stock dividend on the 60,000, $10 par value shares outstanding,
or (2) effecting a 2-for-1 stock split that will reduce par value to $5 per share. The current
market price is $14 per share.
Instructions
Prepare a tabular summary of the effects of the alternative actions on the components of stockholders’
equity and outstanding shares. Use the following column headings: Before Action,After
Stock Dividend, and After Stock Split.
before:
common $600,000
Outstanding shares: 60,000 shares
book value per share = $10
r.e. = $900,000

Stock dividend:
Current price = $14.00 share.
5% dividend = $0.70 per share
$0.70 per share * 60,000 shares = $42,000
so....

After stock dividend:
common $642,000
shares out =64,200 shares
book value= $10
r.e. = $900,000 - $42,000 = $858,000

Split:
common $600,000
shares out =120,000
book value = $5 per share
R.e. = $900,000