As a mathematics student, I know that Vedic mathematics is elementary level mathematics and mainly consists of some calculation techniques.
How much of it is related to Vedas? In which Veda can it be found?
There is some mathematics in the Vedas. While judging the sophistication level of mathematics in the Vedas, one should keep in mind that we are talking about a completely different time period. Hence, the sophistication of the mathematics should take into consideration the Vedic time period. In this light, the mathematics of the Vedas will appear advance.
So, let us first turn our attention to the Saṃhitās. Most of the mathematics is found in the Śulbasutras (more to it later) which are the ancillary text to the Vedas known as Vedāṅgas.
We see that the Ṛg Vedic society was conversant with counting based on the decimal system. See the corresponding versed for the words like eka (RV 1.7.9), dvi/mithuna (RV 1.53.9, RV 8.33.18), tri (RV 1.20.7), catur/turīya (RV 1.20.6, RV 1.15.10), pañca (RV 8.32.22), ṣaṭ (RV 1.23.15), sapta (RV 1.22.16), aṣṭa (RV 8.2.41) and nava (RV 1.32.14). Numbers like 10 to 100 separate names were used like daśa for 10 (RV 1.53.6), viṅśati for 20 (RV 1.80.9), śata for 100 (RV 1.24.9). Even the ordinal number system was very well in place, see, for instance, words like tritīya, daśama etc.
Ṛg Vedic people were adept in arithmetic operations as is evident from the words ekādaśa (11 = 10 +1) RV 1.139.11, tripañcāśḥ (53 = 50 +3) RV 10.34.8, and many more such examples! Multiplication was equally in vogue, which is evident from the words like catuḥ śatam (400 = 100 x 4) RV 8.55.3, tri sapta (21 = 7x3) RV 10.64.8.
It also appears that at least some Rig Vedic people were aware of arithmetic series like 2,4,6,8,10 (RV 2.18.4) and series like 20, 30, 40, 50, 60, 80, 90, 100 (RV 2.18.5-6).
आ द्वाभ्यां हरिभ्यामिन्द्र याह्या चतुर्भिरा षड्भिर्हूयमानः ।आष्टाभिर्दशभिः सोमपेयमयं सुतः सुमख मा मृधस्कः ॥४॥
आ विंशत्या त्रिंशता याह्यर्वाङा चत्वारिंशता हरिभिर्युजानः ।आ पञ्चाशता सुरथेभिरिन्द्रा षष्ट्या सप्तत्या सोमपेयम् ॥५॥
आशीत्या नवत्या याह्यर्वाङा शतेन हरिभिरुह्यमानः ।अयं हि ते शुनहोत्रेषु सोम इन्द्र त्वाया परिषिक्तो मदाय ॥६॥
Yajur Veda hints of the knowledge of geometric progressions (see Vājasaneyi-Saṃhitā Mādhyandina-Recension 17.2, and Taittirīya-Saṃhitā 7.2.20)
इमा मे ऽ अग्न ऽ इष्टका धेनवः सन्त्व् एका च दश च दश च शतं च शतं च सहस्रं च सहस्रं चायुतं चायुतं च नियुतं च > नियुतं च प्रयुतं चार्बुदं च न्यर्बुद समुद्रश् च मध्यं चान्तश् च परार्धश् चैता मे ऽ अग्न इष्टका धेनवः सन्त्व् अमुत्रामुष्मिंल् >लोके ॥
श॒ताय॒ स्वाहा॑ स॒हस्रा॑य॒ स्वाहा॒ऽयुता॑य॒ स्वाहा॑ नि॒युता॑य॒ स्वाहा प्र॒युता॑य॒ स्वाहाऽर्बु॑दाय॒ स्वाहा॒ न्य॑र्बुदाय॒ स्वाहा॑ समु॒द्राय॒ स्वाहा॒
मध्या॑य॒ स्वाहाऽन्ता॑य॒ स्वाहा॑ परा॒र्धाय॒ स्वाहो॒षसे॒ स्वाहा॒ व्यु॑ष्ट्यै॒ स्वाहो॑देष्य॒ते स्वाहोद्य॒ते स्वाहोदि॑ताय॒ स्वाहा॑ सुव॒र्गाय॒ स्वाहा॑
लो॒काय॒ स्वाहा॒ सर्व॑स्मै॒ स्वाहा
The knowledge of the geometry of the Ṛg Vedic society can be better explained through Śulbasutras. However, it appears from the Saṃhitā that concept of geometry was also known. More of this information can also be found in Yajur Veda (see Vājasaneyi-Saṃhitā Mādhyandina-Recension 18.24). Besides Śulbasutras, Yajur Veda Saṃhitā has more information about the construction of the sacrificial altars for yajñá.
In a similar vein, Brāhmaṇas have similar information on arithmetic (see for instance Śatapatha Brāhmaṇa 10.2.2.1, 10.4.2.24) and on division too (see Śatapatha Brāhmaṇa 10.5.4.7 & 10.4.2.4-18, wherein the number 720 has been divided by 2-24)
Now let us turn our attention to Śulbasutras.
The word Śulba is derived from the root śulb which means measuring. The sutras describe the procedures for exact measurements that are required for constructing ritual spaces and altars. Expertise in this field earned one title of Śulbavid.
Śulbasutras are an integral part of the Śrautsutras. All the Śulbasutras relate to Yajurveda because it was the responsibility of the adhvaryu to make the necessary arrangements to do the solemn rituals. Currently, the Śulbasutras of Baudhāyana, Āpastamba, Mānva and Kātyāyana are available.
Āpastamba Śulbasutras is divided into six paṭalas.
The first paṭala expounds the techniques for drawing the right angles for the construction of the sacrificial altars, savisesa’s value , the relationship between the diagonal and side of the square, techniques of construction of the square, combination of equal and unequal squares, techniques for transforming circle into a square and vice versa, and some sutras on √3 and 1/(√3) .
The second paṭala deals with 5 mounds numbering three and the location thereof, techniques for constructing different five altars (vedis) for example Saumikī, Sautrāmaṇi, Niruḍhapaśubandha, Paitṛkī, Uttarā, Gārhapatya.
The third paṭala deals with the measure of the fire altar in the shape of the Falcon, techniques for enlargement of the fire altars, the thickness of the bricks and placement thereof and construction of the fire altar by piling the bricks in five layers. The fourth paṭala outlines the different types of bricks and placement techniques thereof. The fifth and the sixth paṭala is dedicated to the Falcon -shaped altar (Śyenaciti) with a curved tail and bent wings. This paṭala deals exclusively with the techniques of constructing the Falcon -shaped altar, for example, the techniques for bending the wings of the Falcon et cetera et cetera.
Baudhāyana Śulbasutras is divided into three chapters.
Chapter 1 presents techniques for transforming a rectangle into a square and vice versa, circle into a square and vice versa, square into a triangle, measures of vedis like Paitṛkī, Uttarā, Sautrāmaṇi and some sutras on obtaining √2,√3 and 1/(√3). Chapter 2 deals with measures of fire altars and forming a Falcon citi, and the qualities of the bricks. It ends with the description of square and circular shape of Gārhapatya citi. The third chapter is primarily concerned with the shape and the measures of different fire altars, for example, Śyenaciti (Falcon), Kaṅkaciti (kite), Alajaciti, Praugaciti (triangle), Ubhyataḥ (rhombus), Rathacakraciti (chariot wheel), Kūrmaciti (tortoise) etc.
Mānva Śulbasutras has three paṭalas which are further subdivided into khaṇḍas.
The first patala deals with different fire altars and nirañchan mark. Use of cane and rope and the techniques thereof are the subject matter of the second patala. Finally, the third patala deals with practical issues like levelling of the earth and techniques for determining the eastern direction with the help of nakṣatras and different type of fire altars.
Kātyāyana Sulbasutras is divided into six chapters.
East-West and North-South lines, their placement et cetera are main themes that are in the first chapter. The second chapter describes different types of measuring props and introduces the concept of √10,√40, √3 and 1/(√3) and ends with the techniques of additions of an equal and unequal square.
Chapter 3 is primarily dealing with the concept of transformation of one geometrical form to another and carving one square from another. Description of different types of citis (altars) is the subject matter of the fourth chapter.
Calculating the new value of square Puruṣa in the succession of fire altars is dealt with in chapter 5. Finally, methods to increase a measure of circumference in the successive fire altars is the primary topic of chapter 6.