The idea of the Trinity originated in Genesis Chapter One and reaffirmed in John Chapter One. The Trinity is threaded throughout the entirity of Scipture. Remember, the Trinity does NOT represent three gods.
God is ONE. Father, Son and Holy Spirit. Just as you are one: mind, soul and spirit. Just because you have three parts does not mean you are three different entities. Consider the egg. It has shell, white, and yolk; yet is one egg. I like to think of the Trinity exampled this way. The sun:
That large ball of fire 93 milliion miles away representative of the Father, the light which reaches us representative of the Son, and the heat which we feel representative of the Holy Spirit. Three definitive parts yet:::::: ONE SUN!