The Rectus Femoris muscle is the largest hip flexor by volume and is also one of the quadriceps. Rectus Femoris connects all the way from the pelvis to the kneecap. This length allows it to do two functions: 1) flex the hip and 2) extend the knee.
Rectus Femoris Muscle
Rectus Femoris Pain Function
The Rectus Femoris muscle is unique in its dual function - 1) flexion of the hip and 2) extension of the knee. Rectus Femoris is considered one of the quadriceps muscles, but it is the only of the four quadriceps with hip flexion function. Rectus Femoris can do this because, unlike the other 3 quad muscles, Rectus has an upper connection to the pelvis instead of the femur .
To locate your Rectus Femoris, stand up and lift one leg in the air. Feel a muscle contract right below your waistline around the top of the thigh - this muscle is Rectus Femoris.
Rectus Femoris Pain Pattern
The Rectus Femoris pain pattern is felt right on the top of the kneecap, occasionally slightly above the knee. Activities like walking down stairs can stress the Rectus Femoris muscle and perpetuate the pain pattern shown in the left portion of the image below .
Rectus Femoris Muscle (right - dark red), Rectus Femoris Pain Pattern (left) 
Rectus Femoris Pain Relief
Rectus Femoris pain typically manifests deep in the kneecap, as shown in the left portion of the image above . This is a great example of referred pain. Referred pain is the concept that the hurt and the cause of the hurt are in two different locations. Pain caused by Rectus Femoris is likely to manifest as deep knee pain, even though the source is in the middle of the thigh.
To achieve Rectus Femoris pain relief, apply deep tissue throughout the muscle. Pay extra attention to tender spots (trigger points) and gently work them out until a massage is pain-free at high pressure.
Rectus Femoris massage can be performed with a massage ball or with a versatile massage tool like QL Claw. QL Claw is great for massaging the Rectus Femoris as well as other pain-inducing hip flexors like TFL, Psoas, and Iliacus.
 Donnelly, Joseph M. Travell, Simons & Simons Myofascial Pain and Dysfunction: the Trigger Point Manual. 3rd ed., Wolters Kluwer Health, 2019.
 Davies, Clair, and Amber Davies. The Trigger Point Therapy Workbook: Your Self-Treatment Guide for Pain Relief. 3rd ed., New Harbinger Publications, Inc., 2013.