Peter Steinbach first described how each regular polygon generates a system of numbers, self-contained under arithmetic, based on the relative lengths of its diagonals (the lines crossing the interior of the polygon). I first learned about this in an excellent paper by Kappraff. In the case of the heptagon, a regular polygon with seven sides, if we say that the edges of the heptagon (red lines below) have length 1, then we can say that the shorter (purple) diagonals have length $\rho$, and the longer (blue) diagonals have length $\sigma$.

These diagonal-to-edge ratios are the same for all regular heptagons, of course. Let's worry about the actual values of $\rho$ and $\sigma$ later. You will find that we can accomplish quite a lot without knowing those values!

How do $\rho$ and $\sigma$ generate a "system of numbers"? Take another look at the heptagon above (and its inscribed heptagrams). Notice all the parallel lines? You should be able to find an abundance of similar triangles -- triangles that have the same angles but different sizes. These similar triangles generate a set of relationships between $\rho$ and $\sigma$. This becomes clearer if we hide most of the diagonals:

For example, see if you can convince yourself that

$$\sigma = \rho + \frac{1}{\sigma}$$

by looking at the large blue-red-purple-red trapezoid that runs through horizontally across the heptagon. The proof relies on constructing a proportion, based on the similar triangles involved:

$$\sigma : 1 = 1 : \sigma-\rho$$

Corresponding exercises can fill in the table of basic quotients:

$$\frac{1}{\sigma} = \sigma-\rho \bbox[10pt]{} \frac{1}{\rho} = 1+\rho-\sigma \bbox[10pt]{} \frac{\sigma}{\rho} = \sigma-1 \bbox[10pt]{} \frac{\rho}{\sigma} = \rho-1$$

A little bit of algebraic manipulation with those can yield the basic products, as well:

$$\rho\sigma = \rho+\sigma \bbox[10pt]{} \rho^2 = 1+\sigma \bbox[10pt]{} \sigma^2 = 1+\rho+\sigma$$

(You could also use Steinbach's elegant diagonal product formula to derive the products.)

Here you can start to see some of the special properties of $\rho$ and $\sigma$. For example, using the division and multiplication rules above, you can reduce any expression like $\rho^m\sigma^n$, for any integer powers $m$ and $n$ (including negative powers) to a simple expression of the form:

$$a+b\rho+c\sigma$$

for some integers $a$, $b$, and $c$. Let us try an example. The strategy is to substitute for $\rho\sigma$, $\sigma^2$, and $\rho^2$ at every opportunity, then distribute and multiply, and repeat, until we can collect all the terms.

$$\rho^3\sigma^2 = \rho^2\rho\sigma^2$$$$ = (1+\sigma)\rho(1+\rho+\sigma)$$$$ = (\rho+\rho\sigma)(1+\rho+\sigma)$$$$= (\rho+\rho+\sigma)(1+\rho+\sigma)$$$$ = (2\rho+\sigma)(1+\rho+\sigma)$$$$= (2\rho+\sigma) + (2\rho^2+\rho\sigma) + (2\rho\sigma+\sigma^2)$$$$= 2\rho+\sigma + 2+2\sigma + \rho+\sigma + 2\rho+2\sigma + 1+\rho+\sigma$$$$= 3 + 6\rho + 7\sigma$$

Thus $a+b\rho+c\sigma$ is the general form of any number in our new system. We will call this a heptagon number, in the same way we call $x+yi$ a complex number, or $u/v$ a rational number. In all such cases we need not be bothered by the fact that a number consists of more than just numerals. We care more about the fact that these numbers can be added, subtracted, multiplied, and divided, and still produce more numbers of the same form. Mathematicians use the term field for such a system of numbers.

Given two heptagon numbers $a+b\rho+c\sigma$ and $d+e\rho+f\sigma$, it is trivial to see that addition and subtraction produce more heptagon numbers:

$$(a+b\rho+c\sigma) + (d+e\rho+f\sigma) = (a+d)+(b+e)\rho+(c+f)\sigma$$$$(a+b\rho+c\sigma) - (d+e\rho+f\sigma) = (a-d)+(b-e)\rho+(c-f)\sigma$$

In math-speak, the heptagon numbers are closed under addition and subtraction because the integers are closed under those operations: $a+d$, $b-e$, etc. are all integers.

Demonstrating that the heptagon numbers are closed under multiplication is much more interesting:

$$(a+b\rho+c\sigma) * (d+e\rho+f\sigma) =$$$$(ad + ae\rho + af\sigma) + (bd\rho + be\rho^2 + bf\rho\sigma) + (cd\sigma + ce\rho\sigma + cf\sigma^2) =$$$$ad + ae\rho + af\sigma + bd\rho + (be\sigma+be) + (bf\rho+bf\sigma) + cd\sigma + (ce\rho+ce\sigma) + (cf+cf\rho+cf\sigma) =$$$$(ad+be+cf) + (ae+bd+bf+ce+cf)\rho + (af+be+bf+cd+ce+cf)\sigma$$

Notice that we have derived the formulas for addition, subtraction, and multiplication while performing those demonstrations. Deriving the formula for division of heptagon numbers is considerably more difficult, requiring some linear algebra. Also, to perform division, we would require rational coefficients $a$, $b$, and $c$ in every heptagon number, since the integers are not closed under division. Fortunately, we don't need to do any division for our purposes here, so we can be satisfied with the comfortable ease of doing integer arithmetic.