Like bhakti, it is probably fair to say that yoga practice has historically been connected with most, though perhaps not all, philosophical schools and religious traditions in India. Also, as we see with early Buddhist texts, yoga offers a psychology of meditation par excellence. In its earliest textually available forms, the school of yoga is first and foremost a path of meditation. Patanjali’s Yoga SUtra, a text dating to roughly the fifth century CE, offers one of the early formulations of the path of yoga and most contemporary readers are surprised to find that the text spends most of its time describing techniques for engaging the mind in meditation, not outlining the various physical postures we associate with yoga classes today in the West. In fact, Patanjali devotes only three lines to yoga postures, telling us that for the practice of yoga, the posture, asana, should be just easy (sukha) and steady (sthira).7 The commentary on the verses, the Yoga SUtra Bhasya, adds the specificity of traditional postures, pointing to several well-known postures, including the lotus posture (padmasana) 
The Yoga SUtra functions in general as a kind of nuts and bolts handbook for dealing with the mind in meditation, as the text describes step-by-step processes involved in disciplining the mind for the practice of meditation. Presenting a sophisticated psychology, we see on the one hand how the Yoga SUtra offers descriptions of how the mind works and how thought works. There are five modalities of mental activity, including valid judgment, error, conceptualization, sleep, and memory (Agase 1904, 1.6). On the other hand, the Yoga SUtra also gives prescriptive teachings, for instance, instructing the reader on how to prevent distractions from meditation by focusing on a single principle (Agase 1904, 1.32), or how one can make the mind tranquil by a measured exhalation and retention of the breath (Agase 1904, 1.34), or by cultivating positive thoughts in order to counter the influence of a mind racing with negative thoughts (Agase 1904, 2.33). Even as the Yoga SUtra offers a variety of psychological techniques for working with the mind, its primary understanding of yoga is defined by stopping the flow of thoughts (Agase 1904, 1.2: cittavrtti nirodhah). The techniques and practices for meditation that yoga outlines are similar to what we see in Buddhism. Both of these, and Jainism as well, include preliminary steps involving avoiding negative behaviors like stealing, lying, and violence, along with cultivating positive qualities like cleanliness and contentment.
The Yoga SUtra also discusses what look like magical powers that result from the practice of yoga. By meditation on specific places in the body, one acquires different abilities. For instance, meditation, the text tells us, “on the throat affords control over hunger and thirst” (Agase 1904, 3.30: kanthakupe ksutpipasanivrttih). Similarly, meditation on the vital breath rising in the body affords the ability to walk on water (Agase 1904, 3.39), a feat we see popularized across continents in the Gospels of Mark and Matthew in Christianity. The Yoga SUtra ultimately discounts these magical powers as a distraction from the real goal of meditation (Agase 1904, 3.37 and 3.50). Following the cosmology of Samkhya with its dualistic separation of matter and spirit, with which the school of yoga is classically connected, the Yoga Sutra’s philosophical legacy from Samkhya tends to undercut the importance of powers over matter and the body. So, despite likely teasing curious readers with an entire chapter devoted to the powers attainable by yoga, or perhaps precisely to let would-be practitioners in on the worldly practical, if not spiritually desirable, benefits of yoga, the Yoga SUtra ultimately discards the powers it promises.
Rather, yoga proposes using meditation to attain a freedom of spirit detached from material constraints. Indeed, the ultimate, desired state resulting from meditation in yoga is signified by the term “kaivalya,” the “aloneness” we saw earlier in Jainism, which was also deeply influenced by the dualistic cosmology of Samkhya. Thus, the concluding verse of the Yoga SUtra tells us: “final aloneness occurs when the evolutionary flowing forth of nature’s qualities is curbed, as they lack purpose for the spirit. With this the energy of consciousness rests in its own true nature” (Agase 1904, 4.34: purusarthasunyanam gunanam pratiprasavah kaivalyam svarupapratistha va citisaktir iti). Apart from the apparent irony in that the path of yoga, literally “union,” leads to “aloneness,” we see again that classical meditation focuses fundamentally on a phenomenology of subjectivity, of the self. A person commits to the hours of self-reflection that yoga advises in order to ascertain “one’s own true nature” (svarUpa) as separate from the messy psychology of mind, body, and materiality entangled within conceptions of self. So, again, we see that meditation fundamentally invokes an examination of the nature of the self and that this subjectivity is thickly intertwined with a psychology. Moreover, a primary impetus of yoga techniques focuses on isolating the sense of subjectivity from components of self that connect to mind or body.
-  Patanjali Yoga SUtra, 2.46. in Patanjali: Yogasutra with Bhasya (= Patanjalayogasastra),PatanjalayogasUtrani (Vacaspatimisraviracitatika, samvalitaVyasabhasyasametani... tathaBhojadevaviracitaRajamartandabhidhanavrttisametani. Edited by Kasinatha Sastri Agase,Anandasrama Sanskrit Series, no. 47, 1904.
-  Traditionally understood to be authored by Vyasa, the same fabled prolific author of theepic Mahabharata; however, it may be that the Bhasya commentary is an auto-commentary,as Philipp Maas argues, by the great sage of yoga, Patanjali himself (Maas 2006).