I am soon going to undertake Upanayana(Yagnopavitam) and I was researching and I couldn't find any straight answer to my question and I would be grateful for any help.
The sacred thread is not considered just as an ordinary thread. Before wearing one, it has to undergo a process called Samskara, which is a purificatory ritual that is aimed at invoking the presence of various deities on the 9 threads and the 3 knots.
The relevant Mantras can be found on page 55 of the prayoga book called "Nitya Karma Puja Prakasha".
Prathamotantau Om omkaram avahayami | Dvitiyatantau agni avahayami | ..... Prathamagranthau Om Brahmane namah, Brahmanam avahayami | Dvitiyagranthau Om Vishnave namah, Vishum avahayami | Trityagranthau Om Rudraya namah, Rudram avahayami ||
So, what these mantras say is that in the Yajnopavita there are 9 interwined threads and 3 knots. In the 9 threads Om, Agni, Sarpa, Soma .. Surya, Viswadevas are invoked.
And, on the 3 knots (Granthi), the Trinities are invoked viz - Brahma, Vishnu and Rudra in that order.
Translations of the bold portions are as follows:
Prathamagranthau Om Brahmane namah, Brahmanam avayami - In the first knot, Om salutations to Lord Brahma, I am inviting the presence of Brahma on this knot.
Similarly for the other two knots.
Therefore, the 3 knots represent the Trinities - Brahma, Vishnu and Rudra and their presence on the sacred thread.