Agni is hailed in Yajurveda and Brahmanas many a times as follows.
“trivṛdagniryāvānagniryāvatyasya mātrā |” (Shatapatha Brahmana 6:3:2:5).
“Threefold is Agni: as great as Agni is, as great as is his measure”.
The three fold agni means the 3 measures of Agni.
“agnirvai gāyatrī |” (Shatapatha Brahmana 3:4:1:9).
“Gâyatrî is verily Agni”.
Again, the 24 metres of Gayatri = 24 metres of Agni that's why Agni is Called Gayatra. And both of them are called “Tri-Pada".
"yadveva caturviṃśatiḥ | caturviṃśatyakṣarā vai gāyatrī gāyatro | 'gniryāvānagniryāvatyasya mātrā tāvataivainametatsaminddhe |" (Shatapatha Brahmana 188.8.131.52).
"And, again, why there are twenty-four,--the Gâyatrî consists of twenty-four syllables and Agni is Gâyatra: as great as Agni is, as great as is his measure, by so much he thus kindles him".
Again, the 3 foots of Agni/Gayatri is stated as thus.:
Brihad Aranyaka Upanishad details out the first step of Agni (gayatri) as consisting of eight syllables and spanning the three worlds as follows.:
“bhῡmir antarikṣaṁ dyauḥ ity aṣṭᾱv akṣarᾱni; aṣṭᾱkṣaraṁ ha vᾱ ekaṁ gᾱyatryai padam. etad u haivᾱsyᾱ etat, sa yᾱvad eṣu triṣu lokeṣu, tᾱvaddha jayati, yo’syᾱ etad evaṁ padaṁ veda |” (Brihad Aranyaka Upanishad V-xiv-1).
“'Bhumi' (the earth), 'Antariksa' (sky) and 'Dyaus' (heaven) make eight syllables, and the first foot of the Gayatri has eight syllables. So the above three worlds constitute the first foot of the Gayatri. He who knows the first foot of the Gayatri to be such wins as much as there is in those three worlds”.
Agni’s second foot consists of the three Vedas (means sphere of all knowledge) as follows.
“ṛco yajῡmṣi sᾱmᾱni, ity aṣṭᾱv akṣarᾱṇi; aṣṭᾱkṣaraṁ ha vᾱ ekaṁ gᾱyatrai padam. etad u haivᾱsyᾱ etat. sa yᾱvadīyaṁ trayī vidyᾱ, tᾱvad ha jayati. yo'syᾱ etad evaṁ padaṁ veda|” (Brihad Aranyaka Upanishad V-xiv-2).
“'Reah', 'Yajumsi' and 'Samani' make eight syllables, and the second foot of the Gayatri has eight syllables. So the above three Vedas constitute the second foot of the Gayatri. He who knows the second foot of the Gayatri to be such wins as much as that treasury of knowledge, the three Vedas, has to confer”.
Agni’s third foot consists of the three breaths as stated below.
“prᾱṇo'pᾱno vyᾱnah, ity aṣṭᾱv akṣarᾱṇi; aṣṭᾱkṣaraṁ ha vᾱ ekaṁ gᾱyatrai padam: etad u haivᾱsyᾱ etat. sa yᾱvad idam prᾱṇi, tᾱvad ha jayati yo'syᾱ etad evam padaṁ veda |” (Brihad Aranyaka Upanishad V-xiv-3)."
“'Prana', 'Apana' and 'Vyana' make eight syllables, and the third foot of the Gayatri has eight syllables. So the above three forms of vital force constitute the third foot of the Gayatri. He who knows the third foot of the Gayatri to be such wins all the living beings that are in the universe”.
So, Now, here…
- Earth = Rig Veda = Prana.
- Sky = Yajur Veda = Apana.
- Heaven = Sama Veda = Vyana.
Now, Shatapatha Brahmana (184.108.40.206). calls Agni as “agnirvai sarvā devatā ” which means, “Agni is all the deities”.
“tvamaghna indro vṛṣabhaḥ satāmasi tvaṃ viṣṇururughāyo namasyaḥ
tvaṃ brahmā rayivid brahmaṇas pate tvaṃ vidhartaḥsacase purandhyā ” (RV 2.1.3).
"Hero of Heroes, Agni! Thou art Indra, thou art Viṣṇu of the Mighty Stride, adorable: Thou, Brahmaṇaspati, the Brahman finding wealth: thou, O Sustainer, with thy wisdom tendest us".
I think now, you can understand a bit that where i am going with this.
The above 3 legs (Pada) of Agni/Gayatri is exactly the same as Vishnu's 3 steps.
Rig veda (1.22.18).:
trīṇi padā vi cakrame viṣṇurghopā adābhyaḥ |
ato dharmāṇi dhārayan ||"
Vishnu, the Guardian, he whom none deceiveth, made three steps; thenceforth
Establishing his high decrees.
His, 1st step was on Earth, Second on Air and 3rd on Heaven.
“tadvā agnaya iti kriyate agnirvai sa devastasyaitāni nāmāni śarva iti yathā prācyā
ācakṣate bhava iti yathā bāhīkāḥ paśūnām patī rudro 'gniriti
tānyasyāśāntānyevetarāṇi nāmānyagnirityeva śāntatamaṃ tasmādagnaya iti kriyate
sviṣṭakṛta iti ” (Shatapatha Brahmana 1:7:3:8).
“That (offering) then is certainly made to 'Agni,' for, indeed, Agni is THAT god;--his are these names: Sarva, as the eastern people call him; Bhava, as the Bâhîkas (call him); Pasûnâm pati ('lord of beasts,' Pasupati), Rudra, Agni. The name Agni, doubtless, is the Peaceful (sânta/aghora form), and the other names of his are not peaceful (viz ghora/asānta form): hence it is offered to (him under the name of) 'Agni,' and to (him as) the Svishtakrit”.
Again, The truth is - Gayatri/Agni is “Chatushpada” (has four feet) however; it is called “tripada” (having three feet) because only three feet of it is revealed. The fourth foot is supramundane and that foot is nothing but the (Brahman) as Brihad Aranyaka Upanishad (VV-xiv-3). proclaims as given below.:
“athᾱsya etad eva turīyaṁ darśatam padam parorajᾱ ya eṣa tapati; yad vai caturthaṁ tat turīyam; darśatam padam iti, dadṛśa iva. hy eṣaḥ; parorajᾱ iti, sarvam u hy evaiṣa raja upari upari tapati. evaṁ haiva śriyᾱ, yaśasᾱ tapati, yo'syᾱ etad evam padaṁ veda |” (Brihad Aranyaka Upanishad VV-xiv-3).
“Now its Turiya, apparently visible, supramundane foot is indeed this - the sun that shines. 'Turiya' means the fourth. 'Apparently visible foot', because he is seen, as it were. 'Supramundane', because he shines on the whole universe as its overlord. He who knows the fourth foot of the Gayatri to be such shines in the same way with splendour and fame”.
अमात्रश्चतुर्थोऽव्यवहार्यः प्रपञ्चोपशमः शिवोऽद्वैत एवमोङ्कार आत्मैव संविशत्यात्मनाऽऽत्मानं य एवं वेद ॥ १२॥
12. That which is without letters or metres (parts) is the Fourth, beyond apprehension through ordinary means, the cessation of the phenomenal world, the Shiva and the non-dual (Advaita). Thus Om is certainly the Self. He who knows thus enters the Self by the Self."
Atharva Sikha Upanishad.:
स एभ्योथर्वा प्रत्युवाच ।
ओमित्येतदक्षरमादौ प्रयुक्तं ध्यानं ध्यायितव्यमित्येतदक्षरं
परं ब्रह्मास्य पादाश्चत्वारो वेदाश्चतुष्पादिदमक्षरं परं ब्रह्म ।
1.2 The sage Atharva replied to them,” Mainly meditation has to be done on the single letter Aum. It itself is the mantra for meditation. The four legs of that mantra are the four devas and the four Vedas. The letter has to be recognized as the Para Brahman (Ultimate reality) and meditated upon.
पूर्वास्य मात्रा पृथिव्यकारः ऋग्भिरृग्वेदो ब्रह्मा वसवो गायत्री गार्हपत्यः ।
1.3 The first syllable Aa, indicates earth, the Rig Veda along with its holy chants, Brahma the creator among devas, Ashta Vasus among ganas, “Gayatri” among meters, and Garhapthya (the fire of the household) among fires.
द्वितीयान्तरिक्षं स उकारः स यजुभिर्यजुर्वेदो विष्णुरुद्रास्त्रिष्टुब्दक्षिणाग्निः ।
1.4 The second syllable Uu denotes ether, the Yajur Veda, among devas is the Vishnu who looks after the worlds, the eleven Rudras among ganas, “Trishgup” among meters and dakshinagni (fire of the south - funeral pyre) among the fires.
तृतीयः द्यौः स मकारः स सामभिः सामवेदो रुद्रा आदित्या जगत्याहवनीयः ।
1.5 The third syllable Ma indicates the heavens, Sama Veda with its musical sounds of Sama, among devas is the Rudra who is the God of destruction, the twelve Adityas (suns) among ganas, “jagathichanda” among meters and Ahavagni (the fire used in fire sacrifice) among the fires.
यावसानेऽस्य चतुर्थ्यर्धमात्रा सा सोमलोक ओङ्कारः
विराडेकर्षिर्भास्वती स्मृता ।
1.6 That half fourth syllable which is the hidden Ma, is the magical chants of Atharva Veda, Samvarthaka (the fire of exchange) fire among fires, marud among ganas. It is the self glittering Brahman which shines alone and sees everything.
So, this means, when the Kundali Shakti with Agni (as Prana) takes the three steps (three feets of Gayatri) by passing 3 knots in the body viz Brahma, Vishnu and Rudra, the Yogi attains the fourth foot viz. Brahman (Shiva/Kaivalyam Moksham) in Sahasrara.
Ok, the husband and wife issue remains.
Rig Veda being earth is Prakriti and has Purusha (Dyaus/Sky/Heaven) as her husband. Again, the Prakriti is divided into 3 gunas raj, sat, tam. So, it's only one Prakriti that takes 3 forms.
“maayaa.n tu prakR^iti.n vidyaanmaayina.n cha maheshvaram.h | tasyavayavabhuutaistu vyaapta.n sarvamida.n jagat.h |” (Swetasvatara Upanishad 4:10).
“Know then Prakriti (nature) is Mâyâ , and the Maheshwara the Mâyin; the whole world is filled with what are his members (forms)”.
“athaasya yaa sahajaastyavidyaa muulaprakR^itirmaayaa lohitashuklakR^ishhNaa | tayaa sahaayavaan devaH kR^ishhNapi~Ngalo mameshvara iishhTe |” (Shandilya Upanishad 3:01).
“Maheshvara (the Great Lord Shiva) who is black and yellow (Krishna-Pinglam/Neela-Lohita) rules with Avidya, Mula-Prakriti (Uma) or Maya that is red (Rajas/Mahalakshmi), white (Sattva/Mahasaraswati) and black (Tamas/Mahakali) and that is co-existent with him”.
I hope this clarifies all your queries. Prd..