do you or anyone know when the trinity officially became a doctrine and started being taught in churches?
Here's something on that seems like it might be useful.
The Didache
“After the foregoing instructions, baptize in the name of the Father, and of the Son, and of the Holy Spirit, in living [running] water. . . . If you have neither, pour water three times on the head, in the name of the Father, and of the Son, and of the Holy Spirit” (Didache 7:1 [A.D. 70]).
Ignatius of Antioch
“[T]o the Church at Ephesus in Asia . . . chosen through true suffering by the will of the Father in Jesus Christ our God” (Letter to the Ephesians 1 [A.D. 110]).
“For our God, Jesus Christ, was conceived by Mary in accord with God’s plan: of the seed of David, it is true, but also of the Holy Spirit” (ibid., 18:2).
Justin Martyr
“We will prove that we worship him reasonably; for we have learned that he is the Son of the true God himself, that he holds a second place, and the Spirit of prophecy a third. For this they accuse us of madness, saying that we attribute to a crucified man a place second to the unchangeable and eternal God, the Creator of all things; but they are ignorant of the mystery which lies therein” (First Apology 13:5–6 [A.D. 151]).
Theophilus of Antioch
“It is the attribute of God, of the most high and almighty and of the living God, not only to be everywhere, but also to see and hear all; for he can in no way be contained in a place. . . . The three days before the luminaries were created are types of the Trinity: God, his Word, and his Wisdom” (To Autolycus 2:15 [A.D. 181]).
Irenaeus
“For the Church, although dispersed throughout the whole world even to the ends of the earth, has received from the apostles and from their disciples the faith in one God, the Father Almighty . . . and in one Jesus Christ, the Son of God, who became flesh for our salvation; and in the Holy Spirit” (Against Heresies 1:10:1 [A.D. 189]).
Tertullian
“We do indeed believe that there is only one God, but we believe that under this dispensation, or, as we say, oikonomia, there is also a Son of this one only God, his Word, who proceeded from him and through whom all things were made and without whom nothing was made. . . . We believe he was sent down by the Father, in accord with his own promise, the Holy Spirit, the Paraclete, the sanctifier of the faith of those who believe in the Father and the Son, and in the Holy Spirit” (Against Praxeas 2 [A.D. 216]).
“And at the same time the mystery of the oikonomia is safeguarded, for the unity is distributed in a Trinity. Placed in order, the three are the Father, Son, and Spirit. They are three, however, not in condition, but in degree; not in being, but in form; not in power, but in kind; of one being, however, and one condition and one power, because he is one God of whom degrees and forms and kinds are taken into account in the name of the Father, and of the Son, and of the Holy Spirit” (ibid.).
“Keep always in mind the rule of faith which I profess and by which I bear witness that the Father and the Son and the Spirit are inseparable from each other, and then you will understand what is meant by it. Observe now that I say the Father is other [distinct], the Son is other, and the Spirit is other. This statement is wrongly understood by every uneducated or perversely disposed individual, as if it meant diversity and implied by that diversity a separation of Father, Son, and Holy Spirit” (ibid., 9).
“Thus the connection of the Father in the Son, and of the Son in the Paraclete, produces three coherent persons, who are yet distinct one from another. These three are, one essence, not one person, as it is said, ‘I and my Father are one’ [John 10:30], in respect of unity of being not singularity of number” (ibid., 25).
Origen
“For we do not hold that which the heretics imagine: that some part of the being of God was converted into the Son, or that the Son was procreated by the Father from non-existent substances, that is, from a being outside himself, so that there was a time when he [the Son] did not exist” (The Fundamental Doctrines 4:4:1 [A.D. 225]).
“For it is the Trinity alone which exceeds every sense in which not only temporal but even eternal may be understood. It is all other things, indeed, which are outside the Trinity, which are to be measured by time and ages” (ibid.).
Hippolytus
“The Word alone of this God is from God himself, wherefore also the Word is God, being the being of God” (Refutation of All Heresies 10:29 [A.D. 228]).
Pope Dionysius
“Next, then, I may properly turn to those who divide and cut apart and destroy the most sacred proclamation of the Church of God, making of it [the Trinity], as it were, three powers, distinct substances, and three godheads. . . . [Some heretics] proclaim that there are in some way three gods, when they divide the sacred unity into three substances foreign to each other and completely separate” (Letter to Dionysius of Alexandria 1 [A.D. 262]).
“Therefore, the divine Trinity must be gathered up and brought together in one, a summit, as it were, I mean the omnipotent God of the universe. . . . It is blasphemy, then, and not a common one but the worst, to say that the Son is in any way a handiwork [creature]. . . . But if the Son came into being [was created], there was a time when these attributes did not exist; and, consequently, there was a time when God was without them, which is utterly absurd” (ibid., 1–2).
“Neither, then, may we divide into three godheads the wonderful and divine unity. . . . Rather, we must believe in God, the Father Almighty; and in Christ Jesus, his Son; and in the Holy Spirit; and that the Word is united to the God of the universe. ‘For,’ he says, ‘The Father and I are one,’ and ‘I am in the Father, and the Father in me’” (ibid., 3).
Gregory the Wonderworker
“There is one God. . . . There is a perfect Trinity, in glory and eternity and sovereignty, neither divided nor estranged. Wherefore there is nothing either created or in servitude in the Trinity; nor anything superinduced, as if at some former period it was non-existent, and at some later period it was introduced. And thus neither was the Son ever wanting to the Father, nor the Spirit to the Son; but without variation and without change, the same Trinity abides ever” (Declaration of Faith [A.D. 265]).
Sechnall of Ireland
“Hymns, with Revelation and the Psalms of God [Patrick] sings, and does expound the same for the edifying of God’s people. This law he holds in the Trinity of the sacred Name and teaches one being in three persons” (Hymn in Praise of St. Patrick 22 [A.D. 444]).
Patrick of Ireland
“I bind to myself today the strong power of an invocation of the Trinity—the faith of the Trinity in unity, the Creator of the universe” (The Breastplate of St. Patrick 1 [A.D. 447]).
“[T]here is no other God, nor has there been heretofore, nor will there be hereafter, except God the Father unbegotten, without beginning, from whom is all beginning, upholding all things, as we say, and his Son Jesus Christ, whom we likewise to confess to have always been with the Father—before the world’s beginning. . . . Jesus Christ is the Lord and God in whom we believe . . . and who has poured out on us abundantly the Holy Spirit . . . whom we confess and adore as one God in the Trinity of the sacred Name” (Confession of St. Patrick 4 [A.D. 452]).
Augustine
“All the Catholic interpreters of the divine books of the Old and New Testaments whom I have been able to read, who wrote before me about the Trinity, which is God, intended to teach in accord with the Scriptures that the Father and the Son and the Holy Spirit are of one and the same substance constituting a divine unity with an inseparable equality; and therefore there are not three gods but one God, although the Father begot the Son, and therefore he who is the Son is not the Father; and the Holy Spirit is neither the Father nor the Son but only the Spirit of the Father and of the Son, himself, too, coequal to the Father and to the Son and belonging to the unity of the Trinity” (The Trinity1:4:7 [A.D. 408]).
Fulgence of Ruspe
“See, in short you have it that the Father is one, the Son another, and the Holy Spirit another; in Person, each is other, but in nature they are not other. In this regard he says: ‘The Father and I, we are one’ (John 10:30). He teaches us that one refers to their nature, and we are to their Persons. In like manner it is said: ‘There are three who bear witness in heaven, the Father, the Word, and the Spirit; and these three are one’ (1 John 5:7)” (The Trinity 4:1–2 [c. A.D. 515]).
“But in the one true God and Trinity it is naturally true not only that God is one but also that he is a Trinity, for the reason that the true God himself is a Trinity of Persons and one in nature. Through this natural unity the whole Father is in the Son and in the Holy Spirit, and the whole Holy Spirit, too, is in the Father and in the Son. None of these is outside any of the others; because no one of them precedes any other of them in eternity or exceeds any other in greatness, or is superior to any other in power” (The Rule of Faith 4 [c. A.D. 523).
~Deut