The trapezius muscle is a large superficial back muscle that resembles a trapezoid. It extends from the external protuberance of the occipital bone to the lower thoracic vertebrae and laterally to the spine of the scapula. The trapezius has upper, middle, and lower groups of fibers.
The ventral rami of C3, C4 innervates the sensory function of the trapezius. Cranial nerve XI innervates the motor function of the trapezius.
The function of the trapezius is to stabilize and move the scapula. The upper fibers can elevate and upwardly rotate the scapula and extend the neck. The middle fibers adduct (retract) the scapula. The lower fibers depress and aid the upper fibers in upwardly rotating the scapula. These motions allow for the scapula to rotate against the levator scapulae and the rhomboid muscles. This rotation is important, in conjunction with the deltoid muscle, for throwing objects.
Unequal development of the three trapezius fibers causes muscle imbalances and posture disturbance can occur. Injury to cranial nerve XI can result in denervation and subsequent loss of motor function of the trapezius, resulting in muscle wasting. Cranial nerve XI can be examined during a clinical examination by asking the patient to shrug their shoulders passively, then actively against examiner resistance.
The trapezius is a muscle made up of particularly long muscle fibers that span a large width of the upper back. Functionally, this allows the trapezius to assist in mainly postural attributes, allowing and supporting the spinal column to remain erect when the person is standing. The trapezius is one of the broadest and most superficial (closest to the skin) muscles of the upper back and trunk, meaning upon dissection of a cadaver it is often used as a landmark because it is encountered first. This muscle is triangular, broad, and thin and covers the upper back of the shoulders and neck. Its attachment points consist of the spinous process of C7-T12 of the spine, ligamentum nuchae, scapulae, clavicles, and ribs. The trapezius muscle is mainly postural but is also used for active movement such as side bending and turning the head, elevating and depressing the shoulders, and internally rotating the arm. The trapezius elevates, depresses, and retracts the scapula. The descending muscle fibers of the trapezius muscle internally rotate the arms. The transverse muscle fibers retract the scapulae, and the ascending muscle fibers medially rotate the scapulae.
The entire musculature of the human body, both striated and smooth muscle, arises from the mesoderm. A few exceptions arise from the ectoderm. The trapezius and sternocleidomastoideus muscle originates in the lateral occipital area and initially forms as a singular mass. At this very early period it is innervated by the nervus accessorius (CN XI in the adult form), and as the muscle mass moves into its adult position, it extends and moves caudally, carrying the nerve with it. The trapezius and the sternocleidomastoideus arise from a single mass and then split around the 20th week of development. It is not unusual for the muscle to receive secondary new nerves while retaining its original nerve CN XI and later receiving branches from the cervical plexus. 
Two main variants to the vascular supply to the trapezius develop from three common sources. The most common variant involves the main supply of blood from the transverse cervical artery, with collateral supply from the dorsal scapular artery for the superior portion, and the posterior intercostal arterial branches from the deep portions. The second less common variant has more blood supply from the dorsal scapular artery. 
Motor supply of the actions of the trapezius stems from the accessory nerve, also known as CN XI. Shoulder range of motion (ROM) with cephalad motion of the shoulders, "shrugging," is a common physical exam maneuver to test CN XI.  Sensation to the trapezius muscles, including pain and proprioception or the sense of position in space, occur via the ventral rami of the third (C3) and fourth (C4) cervical nerves. One may think that since the trapezius muscle is on the back, it would be innervated by the dorsal rami; however, the trapezius is a muscle of the upper limb, leading it to be innervated by the ventral rami.
Additional muscles that assist or are assisted by the trapezius include the latissimus dorsi, rhomboids, and levator scapula. The trapezius and semispinalis capitis muscles create the main mass of muscle at the occipital region at the base of the skull.
Anatomical variants of the trapezius muscle, though statistically rare, are noteworthy and diverse. Many of these variants are developmental and related to agenesis of the trapezius, whether that be unilateral or bilateral, resulting in hypoplasia or accessory lobes of muscle.  One reported case of inheritable absence of the trapezius reported the daughter of two parents with absent trapezius also having the absence of the muscle. Another phenomenon would be dysfunction or absence of the accessory nerve (CN XI), causing hypoplasia and not an actual absence of the trapezius muscle.
Surgical considerations are limited due to the sustainability of quality of life if the trapezius is injured. If dissection of the accessory nerve occurs, attempts to repair have been attempted, but success rates are in the mid-teens in percentile. Because of poor outcomes, this procedure is often forgone. One of the most common surgical interventions involving the trapezius region includes a trapezius flap for those patients who have undergone or have lateral craniofacial or lateral basilar skull defects. Flaps of the trapezius also are used for oral or pharyngeal defects. 
Trapezius hypertonicity and spasm is a common cause of tension headaches among the general population. Due to the path of the accessory nerve and occipital nerve, they can become entrapped, causing the classic ram's horn distribution of a tension headache. This headache is bilateral, throbbing, traveling from the occipital region, and wrapping around to the top of the head and forehead region. Stress, posture, and inadequate stretching before activity can exacerbate these symptoms. There are no prodromal or sensorineural exacerbations related to light or sound. Tension headaches are often treated with a suboccipital release, stretching, stress/anxiety relief, and NSAIDs.