The quads extend your knees when your legs straighten. The hamstrings, sartorius and gastrocnemius flex your knees. The gastrocnemius and soleus assist during plantar flexion, when you push up from a step, while the tibialis anterior is primarily responsible for dorsiflexion when your foot lands on a step.