The function of medial pterygoid is to open the mouth. It originates from sphenoid and inserts into medial ramus.