Where does the idea of purgatory come from, as it is not mentioned in the Bible?

Where does the idea of purgatory come from, as it is not mentioned in the Bible?

These links should be helpful for understanding the Catholic Church’s teachings on praying for the dead. If you have any further questions or concerns that are not answered by these links, please contact Catholic Answers directly.
Recommended Reading:
**
[LIST]
*]
Purgatory**
]* The Roots of Purgatory**
]* If the souls in purgatory are destined for heaven, why do we pray for them?**
*]Do you have a history of Purgatory?
*]Purgatory in Scripture
]* Purgatory and Salvation**
[/LIST]

DISCLAIMER: The views and opinions expressed in these forums do not necessarily reflect those of Catholic Answers. For official apologetics resources please visit www.catholic.com.