The quadriceps is the knee extensor, but the rectus femoris additionally flexes the hip joint, and articular muscle of the knee protects the articular capsule of the knee joint from being nipped during extension. The sartorius runs superficially and obliquely down on the anterior side of the thigh, from the anterior superior iliac spine to the pes anserinus on the medial side of the knee, from where it is further extended into the crural fascia. The sartorius acts as a flexor on both the hip and knee, but, due to its oblique course, also contributes to medial rotation of the leg as one of the pes anserinus muscles (with the knee flexed), and to lateral rotation of the hip joint.There are four posterior thigh muscles. The biceps femoris has two heads: The long head has its origin on the ischial tuberosity together with the semitendinosus and acts on two joints. The short head originates from the middle third of the linea aspera on the shaft of the femur and the lateral intermuscular septum of thigh, and acts on only one joint. These two heads unite to form the biceps which inserts on the head of the fibula. The biceps flexes the knee joint and rotates the flexed leg laterally—it is the only lateral rotator of the knee and thus has to oppose all medial rotator. Additionally, the long head extends the hip joint.
With the knee extended, it adducts the thigh and flexes the hip. The pectineus has its origin on the iliopubic eminence laterally to the gracilis and, rectangular in shape, extends obliquely to attach immediately behind the lesser trochanter and down the pectineal line and the proximal part of the linea aspera on the femur. It is a flexor of the hip joint, and an adductor and a weak medial rotator of the thigh. The adductor brevis originates on the inferior ramus of the pubis below the gracilis and stretches obliquely below the pectineus down to the upper third of the linea aspera. Except for being an adductor, it is a lateral rotator and weak flexor of the hip joint.The adductor longus has its origin at superior ramus of the pubis and inserts medially on the middle third of the linea aspera. Primarily an adductor, it is also responsible for some flexion. The adductor magnus has its origin just behind the longus and lies deep to it. Its wide belly divides into two parts: One is inserted into the linea aspera and the tendon of the other reaches down to adductor tubercle on the medial side of the femurs distal end where it forms an intermuscular septum that separates the flexors from the extensors. Magnus is a powerful adductor, especially active when crossing legs. Its superior part is a lateral rotator but the inferior part acts as a medial rotator on the flexed leg when rotated outward and also extends the hip joint.