Throughout human history, there have been numerous theories about how music originated. The great naturalist Charles Darwin thought that music was related to sex. In his view, music evolved from the mating cries of birds and animals. Others have proposed that early humans developed singing as a way of imitating the sounds of nature or communicating over distances longer than those over which simple speech could travel. The philosopher Suzanne Langer has speculated that music, language, and dance not only were used together but also developed together in early rituals that combined those activities in a kind of early opera. In fact, however, no one knows how or when music developed.

Music was an essential element in many early cultures and civilizations. It is known, for example, that music was used in various ways by the Egyptians. Egyptian priests played seven-foot-tall harps in their temples to honor the gods, and the armies of Egypt were accompanied by drums and trumpets, instruments that have accompanied warriors in many parts of the world. It was held that the god Osiris had invented the trumpet, and for that reason trumpets were used in rites dedicated to him.

Music was also extremely important to the early Hebrews, Assyrians, and Babylonians. The first important instrument in their part of the world was the kinnor, a triangular harp that had between 10 and 20 strings. It was used by solo performers as well as in huge temple ceremonies that were said to include thousands of musicians. Reed flutes and drums of various kinds were also common. The shofar, a trumpet made of a ram's horn, is particularly well known among Jews and Christians because, according to the Old Testament, seven shofars were used by the Jews to knock down the walls of the fortress of Jericho. The shofar is still used in Jewish temples.

In music as well as in politics, philosophy, and science, Western civilization has been influenced by the Greeks. The very word music has Greek roots, although it should be noted that what the Greeks called music included all of what are now called the liberal arts. Although we do not know what the music of the ancient Greeks sounded like, various Greek concepts live on in modern Western music. The names of the various modes in Western music are taken directly from the names of the modes used by the Greeks, such as Ionian, Dorian, Phrygian, and Lydian. The Greeks also developed a system of notation so that their music could be written down and remembered. Unfortunately, however, scholars have not been able to decipher that notation with any degree of accuracy.

In the West, music was strongly influenced by the Roman Catholic Church. In fact, in the medieval period, the only places where formal musical education could be found were the church's song schools, which trained boys to sing in religious services. The music that those boys sang was called plainsong, plainchant, or Gregorian chant. The music, which had developed from true chanting, featured simple melodies that used specific scales, or modes, that were authorized by the church. As the years passed, more scales were authorized and the music became more complex. Ultimately, polyphony, the combination of two or more melodies, came to occupy a dominant place in Christian music until the Renaissance had almost run its course.

During the Renaissance, which ran roughly from 1400 to 1600, the mass and the motet were the primary musical forms, but secular forms such as the German lied, the English madrigal, and the French chanson were also widely used, as were various dance forms. Renaissance composers had little knowledge of how to combine instruments for best effect. Instrumental music became more important during the Renaissance, but composers still generally wrote for instruments much as they wrote for voices, without taking into account the unique qualities of those instruments.

It was during the baroque period (1600–1750) that instrumental composition truly came into its own, advanced by the efforts of such great composers as Johann Sebastian Bach, Georg Friedrich Handel, and Antonio Vivaldi. Harmony, which occurs when two or more notes are played or sung at once, took on new importance. The harmony that had existed during the Renaissance had been primarily unintentional, resulting when the simultaneous use of two or more melodies caused more than one note to be played or sung at once, but during the baroque period composers manipulated harmony in order to achieve various musical effects. This rich musical era also saw the development of many musical forms, including the oratorio, cantata, aria, concerto, fugue, suite, sonata, and the prelude.

One of the most important developments in Western music, the creation of the opera, took place during the baroque period. The opera is an art form that combines theater and orchestral music. In the early years of opera's existence (from about 1600), there were many kinds of operas, but with the passage of time the form became relatively standardized.

At the time of the early operas, the orchestra generally consisted of whichever instruments were available. By about 1700, however, various effective combinations of instruments had been determined, and by 1800 the orchestra had taken its modern form, which involves the grouping of similar instruments into sections, such as the brass section, the woodwind section, the string section, and the percussion section. The sections are positioned in such a way as to make the music as clear and as effective as possible.

The classical movement in Western music began in approximately 1750 and ended by 1820. Its primary exponents were Wolfgang Amadeus Mozart, Joseph Haydn, Franz Schubert in his early period, and Ludwig van Beethoven in his early period. The classical movement was characterized by formalism, simplicity, restraint, and little overt expression of emotion.

Composers who were part of the romantic movement (1820–1900) rejected the restraint and formalism of the classical composers and wrote music that attempted to express emotions in a direct manner. Among the foremost exponents of romanticism were Franz Liszt, Richard Wagner, Johannes Brahms, and Pyotr Ilich Tchaikovsky. In addition, the later works of Beethoven and Schubert are considered romantic.

By the end of the 19th century, the French composer Claude Debussy had begun composing works that came to be called impressionistic, a term that had originally been used to describe the work of French painters such as Claude Monet and Edouard Manet. The general idea of the impressionist painters was to avoid detail and paint what a person might see at a quick glance. In effect, this meant focusing on the play of light as it hit objects rather than on the shapes of the objects themselves. Debussy's compositions worked in a similar way, focusing on musical color and creating impressions that seemed to some listeners of the day indistinct and unfocused.

Although various movements existed in the late 19th century and the early 20th century, it is difficult to view 20th-century music in terms of distinct movements. While many 20th-century composers have attempted to find new sounds and harmonies (such as those resulting from the serial compositional techniques developed by the Viennese composer Arnold Schoenberg), many others have worked in one or more of the traditions that existed in earlier times.

The invention of forms of communication such as the telegraph, the radio, the phonograph, the telephone, the television, the computer, the Internet, and mobile devices has made it possible for musicians to be much more aware of the activities of other musicians throughout the world than was possible earlier. Therefore, musicians and composers have become less isolated. A contemporary American composer may be influenced as much by pygmy music or the classical music of North India, for example, as by the music of the European masters.

To this point, the subject under discussion has been the tradition of Western classical music (a general term not to be confused with the specific term used earlier in reference to the classical movement). Other music has developed and changed in cultures around the world, but it is more difficult to track because it tends to be taught and passed aurally without using any kind of notation or recording technology. But popular music and ethnic music of many kinds have had a tremendous influence from the 20th century to today.

One of the most important developments occurred when people of African descent in the United States, Cuba, Haiti, and elsewhere combined elements of their traditional music with elements of Western music, creating various important hybrid musical forms. In the United States, that process ultimately gave birth to blues, ragtime, jazz, rock and roll, rhythm and blues, gospel music, and various other forms. These forms of music, all of which are important and all of which have spawned great artists, have spread throughout the world, combining with and affecting various other kinds of music. Many attempts have been made to combine apparently disparate forms of music, with varying degrees of success.

At this point, musicians and composers are free to explore any tradition of music that they find interesting. Of course, some kinds of music are more commercially viable than others. Classical music and jazz, for example, are far less popular than rock and country music. Yet small, passionate audiences do support musicians who specialize in less popular areas of music. Globally, the music industry is now a multi-billion dollar industry. As described by the market research group Statista, it encompasses music production, distribution, publishing, live concerts, album sales, streaming, and other music-related activities. In 2018, the global music industry generated ne