Math and Music
There are a numerous connections between mathematics and music. This activity is designed to engage students in an activity that illustrates a connection between the various composition tools a musical composer might use and the geometric transformations that are often part of the math curriculum, including such areas as Geometry, Algebra or Precalculus.
In this lesson students are asked to create a short melody using a free software tool called Noteflight Links to an external site.and are then asked to create a mathematical representation of the melody. Students use various music composition tools to extend their melody. They then use geometric transformations to complete the mathematical representation of their extended composition.
Goals of Lesson
To engage students in an activity that helps illustrate a connection between geometric transformations and musical composition.
Mathematics Goals:
- Creating a data set to represent a basic melody
- Using transformations of functions to create graphs that represent the complete melody.
Music Goals:
- Create an original music melody
- Use compositional techniques to expand the original musical idea
> Learning Standards
Common Core Mathematics Standards
Build new functions from existing functions.
CCSS.MATH.CONTENT.HSF.BF.B.3 Links to an external site.
National Music Education Standards
Share music through the use of notation, performance, or technology, and demonstrate how the elements of music have been employed to realize expressive intent.
Materials Needed
- Access to Noteflight Links to an external site.
- Access to a graphing tool such as Geogebra Links to an external site., Demos or TI Graphing Calculator
- Math and Music Student Handout Download Math and Music Student Handout
- Math and Music Desmos Student Handout Download Math and Music Desmos Student Handout
- Math and Music Composition Tools Handout Download Math and Music Composition Tools Handout (explanation of musical composition tools)
And these videos:
Math and Music Overview Video
Links to an external site.
Using Noteflight Demo Video
Links to an external site.
Using Geogebra Demo Video
Links to an external site.
Using Desmos Demo Video
Links to an external site.
This lesson guide is also available as a Word document, if you need to edit it or prefer printing it out: Math and Music Teacher Handout.pdf Download Math and Music Teacher Handout.pdf
Math and Music Tools
The musical composition tools that we will consider are:
- Transposition
- Inversion
- Retrograde
- Retrograde Inversion
- Diminution
- Augmentation
The geometric transformation tools are:
- Vertical and horizontal stretches and compressions
- Vertical and horizontal shifts
- Reflections about the horizontal and vertical axes
It is amazing to see that each one of the musical composition tools has a geometric transformation counterpart. The table below illustrates these connections.
Music |
Mathematics |
Inversion |
Reflect across the x-axis |
Retrograde |
Reflect across the y-axis |
Retrograde Inversion |
Reflect across both axes |
Diminution |
Compress horizontally |
Augmentation |
Stretch horizontally |
Change the key |
Vertical shift |
Offset the timing (Round) |
Horizontal shift |
Background Information and Instructions for Teachers
When creating a musical composition, a composer may begin with a “basic” melody and then use the musical composition tools to extend the melody. Consider the following two lines of music.
Line 1
Line 2
If we draw a horizontal line over Line 1 that runs through the first note and reflect the notes about that horizontal line, we create the second line of music as show below.
Line 1
Line 2
The composer started with melody on the first line and then inverted the melody. When a composer inverts the melody, they reflect the melody about a horizontal line that is drawn across the musical staff where the first note of the melody lies. This musical composition tool is one of many that composers can use to extend an initial melody.
If the composer chooses to take the existing melody and “play it backwards,” he or she would use the tool known as retrograde, resulting in Line 3 of the melody shown below. Line 3 is the retrograde of Line 1.
Line 1
Line 2
Line 3
We can create a mathematical representation of the original melody using a data set and then “connect” the data using a function. Then we can use the transformations of functions corresponding to the musical composition tools to extend our mathematical representation.
This is how we create our mathematical representation:
- First create a data set to represent our melody. We use the following rules to create the data set and then later, we use technology to create a model that fits our data.
- Each quarter note represents a point with an integer x-coordinate on your graph. More on this below.
- Your first note in your melody will represent the horizontal or x-axis. This means the first note will have a y-coordinate of 0.
- You will “start counting” at 0, this means that your first note will have an x-coordinate of 0. So if, for example, you start with a measure that has 4 quarter notes (in 4/4 time), your first 4 points will have x-coordinates of 0, 1, 2, 3.
To help explain part 1a above, if you have a half note, you will repeat the y-coordinate of the corresponding note with the two x-coordinates. If you have an eighth note, you will use a half-increment for the x-coordinate of that point.
So for example, if your first 2 measures are:
The data set for this example would be:
We can use GeoGebra Links to an external site. or Desmos Links to an external site. to create the list of points. The instructions for creating the list and the function using Geogebra are in the Math and Music Student Handout Download Math and Music Student Handout and the following video.
Using Geogebra Demo Video.
Links to an external site.
Instructions for how to use Desmos Links to an external site. to create the graph of the data and the polynomial function are in the Math and Music Desmos Student Handout Download Math and Music Desmos Student Handout and the following video.
Using Desmos Demo Video
Links to an external site.
We used GeoGebra to create a third degree polynomial model for your data and defined the function over the interval [0,7].
The graph for this function along with the data points for this example:
Note the choice of polynomial was based on our subjective opinion of how well the function fits the “flow” of our melody.
We reflect the function across the horizontal axes (inversion). To reflect the function f(x) across the x-axis, we would negate f(x). This results in a new function -f(x). Because we want to tack this new part of the composition onto the original melody, we need to shift the reflected graph to the right by 8. This yields -f(x-8) . The graph is shown below.
Next we want to reflect the original function across the vertical axis placed at the end of the 2nd measure. To do this we can graph f(-x) . This reflects the graph about a vertical axis at the beginning of the composition. Then shift the graph right to tack it onto the end of our composition. Using function notation, we have f(-(x-23)) .
Note: Because the reflection about the vertical axis puts the graph to the left of the first measure, we have to shift the graph right by 23, not 16.
You can see that as students create their mathematical representation of the composition, they will need to think carefully about the transformations of functions required to extend their “basic” functional representation of the original melody. This process can help students grasp the concepts or geometric transformation more fully.
Here is a complete version of our melody, along with our mathematical representation of that melody. If you have set up a Noteflight Links to an external site. account, you can click on this link Links to an external site. to hear the melody.
If you have not set up a Noteflight account, instructions for setting up an account can be found below.
Mathematical Representation
f(x)=−0.05x3+0.48x2+0.11x−0.14for0≤x≤7
g(x)=−f(x−8)for8≤x≤15
h(x)=f(−(x−24))for16≤x≤23
Note: If you have not set up a Noteflight account, click on this link Links to an external site. and sign up for a free account.
This video provides information on how to setup an account in Noteflight and how to get started creating your own melody in Noteflight. Using Noteflight Demo Video
Links to an external site.
