Where did the word trinity originate?
The following excerpt from Basic Thelogy by Charles Ryrie should answer your question.
The early church fathers did not formulate any clear statement concerning the Trinity. Some were unclear about the Logos, and most were unconcerned about giving attention to the Spirit except for His work in the lives of believers. In answer to Praxeus, Tertullian (ca. 165-220) asserted the threeness aspect of God, being the first to use the word Trinity. However, he did not have a full and accurate understanding of the Trinity, his views being tinged with subordinationism. Tertullian was battling Monarchians who opted for the unity of God and denied trinitarianism. Monarchianism existed in two forms.
1. Dynamic Monarchianism (or adoptionism). This was first expounded by Theodotus of Byzantium about 210, and viewed Jesus as a man who was given special power by the Holy Spirit at His baptism.
2. Modalistic Monarchianism. This was more influential, attempting not only to maintain the unity of God but also the full deity of Christ by asserting that the Father became incarnated in the Son. In the West it was known as Patripassianism since the incarnated Father also suffered in the Son; and in the East as Sabellianism after its most famous representative who taught that the Persons in the Godhead were modes in which God manifested Himself. Though Sabellius used the word "Person" he meant it as a role or manifestation of the one divine essence.
Articles related to Matthew: