Yoga philosophy is one of the six major orthodox schools of Hinduism, though it is only at the end of the first millennium CE that Yoga is mentioned as a separate school of thought in Indian texts, distinct from Samkhya. Ancient, medieval and most modern literature often refers to Yoga-philosophy simply as Yoga. A systematic collection of ideas of Yoga is found in the Yoga Sutras of Patanjali, a key text of Yoga which has influenced all other schools of Indian philosophy.
The metaphysics of Yoga is Samkhya's dualism, in which the universe is conceptualized as composed of two realities: Puruṣa (witness-consciousness) and Prakṛti (nature). Jiva (a living being) is considered as a state in which puruṣa is bonded to Prakṛti in some form, in various permutations and combinations of various elements, senses, feelings, activity and mind. During the state of imbalance or ignorance, one or more constituents overwhelm the others, creating a form of bondage. The end of this bondage is called liberation, or mokṣa, by both the Yoga and Samkhya schools of Hinduism, and can be attained by insight and self-restraint.
The ethical theory of Yoga-philosophy is based on Yamas and Niyama, as well as elements of the Guṇa theory of Samkhya. The epistemology of Yoga-philosophy, like the Sāmkhya school, relies on three of six Pramanas as the means of gaining reliable knowledge. These include Pratyakṣa (perception), Anumāṇa (inference) and Sabda (Āptavacana, word/testimony of reliable sources). Yoga-philosophy differs from the closely related non-theistic/atheistic Samkhya school by incorporating the concept of a "personal, yet essentially inactive, deity" or "personal god" (Ishvara).
The origins of yoga-practice are unclear, but seems to have developed in ascetic milieus in the first millennium BCE. Some of its earliest discussions and of proto-Samkhya ideas are found in 1st millennium BCE Indian texts such as the Katha Upanishad, the Shvetashvatara Upanishad and the Maitri Upanishad.
The root of the word "Yoga" is found in hymn 5.81.