A good place to start is that every edge increases the degree of two vertices by 1. That being the case, if the graph is r-regular, there must be an even number of edges. Let's examine cases where n = 4.

You could have r = 1, in which case there would be two edges (m = 2)

You could have r = 2, in which case there would be four edges (m = 4)

You could have r = 3, in which case there would be six edges (m = 6)

So it looks like the relationship is . Try it and you will see that it works for larger graphs as well. The proof hinges on the fact that every edge increases the degree of two vertices by 1.