Good Math, Bad Math

Roman Numerals and Arithmetic

. I’m away on vacation this week, taking my kids to Disney World. Since I’m not likely to
have time to write while I’m away, I’m taking the opportunity to re-run an old classic series
of posts on numbers, which were first posted in the summer of 2006. These posts are mildly
revised.

I’ve always been perplexed by roman numerals.

First of all, they’re just weird. Why would anyone come up with something so strange as a
way of writing numbers?

And second, given that they’re so damned weird, hard to read, hard to work with, why do
we still use them for so many things today?

The Roman Numeral System

I expect most people already know this, but it never hurts to be complete. The roman numeral system is non-positional. It assigns numeric values to letters. The basic system is:

  1. “I” stands for 1.
  2. “V” stands for 5.
  3. “X” stands for 10.
  4. “L” stands for 50.
  5. “C” stands for 100.
  6. “D” stands for 500.
  7. “M” stands for 1000.

Standard roman numerals don’t have any symbols for representing numbers larger than 1000.
There are modern usages that extend roman numerals by adding over-bars for larger
numbers; so, for example, “V” with a horizontal line floating over it represents 5000, etc. But that’s an inauthentic (not to mention entirely pointless) modern addition, not
part of the historical roman numeral system. (The goofiness of people never ceases to amaze me. For goodness sakes, why on earth would anyone feel obliged to figure out how to adapt a pointlessly complex, anachronistic number system to work with larger numbers?)

Numbers are formed in roman numerals by combining symbols. The symbol-combination
rules are really pretty strange. The basic idea is that you start constructing a number
by choosing the largest roman numeral close to it, and you form a base using a collection of repetitions of that numeral. So, for example, to write a number like 35,
the closest numeral is X for 10. Then you use repetitions of it: XXX for thirty.

Then you modify the base by adding other numeral symbols on both sides of it, until you have a until you have the number you wanted. So you take a number symbol, like X. A group of that symbol appearing together are added together, so “III” = 3, and “XXX” = 30. Any symbol smaller than it that precedes it is subtracted from it; any symbol smaller than it that follows it is added to it. The notation for a number is structured around the largest number symbol used in writing that number. In general (though not always), you do not precede a symbol by anything smaller than 1/10th its value. So you wouldn’t write “IC” for 99.

So:

  1. IV = 4; V=5, I=1, I precedes V so it’s subtracted, so IV = 5 – 1.
  2. VI = 6; V=5, I=1, I follows V so it’s added, so VI = 5 + 1 = 6.
  3. XVI = 15. X=10, V = 5, I=1. VI is a number starting with a symbol whose value is smaller than X, so we take its value and add it. Since VI=6, then XVI=10+6 = 16.
  4. XCIX = 99. C=100. The “X” preceeding the C is subtracted, so XC=90. Then the IX following it is added. X is ten, preceeded by “I”, so “IX” = 9. So XCIX = 99.
  5. MCMXCIX = 1999. M = 1000. “CM” is 1000-100=900, so MCM = 1900. That leaves us with XCIX. C = 100, so XC = 90, and we’ve still got IX, which is 9 – so 1900 + 90 + 9 = 1999.

For some reason (there are a number of theories of why), 4 is sometimes written IV, and sometimes IIII. Where did this mess come from?

The roman numerals date back to shepherds, who counted their flocks by marking notches on
their staffs. They didn’t original use roman letters, but just notches on the staff.

So when counting their sheep, they would mark four notches; and then on the fifth one,
they would cut a diagonal notch, the way that in tallying we commonly write four lines, and
then a diagonal strike-through. But instead of striking through the preceeding notches, they
just used the diagonal to turn a “/” notch into “V”. Every tenth notch was marked by a
strike-through, so it looked like “X”. Every tenth V got an extra overlapping notch, so it
looked sort of like a ψ and every tenth “X” got an extra overlapping notch, so it looked
like an X with a vertical line through the center.

In this system, if you had 8 sheep, that would be “IIIIVIII”. But the leading IIII are not really needed. So you could just use “VIII” instead, which became important when you wanted to do a big number.

When this system moved to writing, the simple notches became “I” and “V”; the strike-through became “X”, The ψ-like thing got replaced by an “L”, Beyond that, they started using mnemonics; so C, D, and M are all based on the latin words for 100, 500, and 1000.

The prefix-subtraction stuff came as it transitioned to writing. The problem with an ordinal system like this is that it involves a lot of repeated characters, which are very difficult for people to read correctly. Keeping the number of repetitions small reduces the number of errors that people make reading the numbers. It’s more compact to write “IX” than “VIIII”; and it’s a lot easier to read, because of fewer repetitions. So scribes started using the prefix-subtraction form.

Arithmetic in Roman Numerals

The most basic arithmetic in roman numerals is actually pretty easy: addition and
subtraction are simple, and it’s obvious why they work. On the other hand, multiplication and
division are not easy in roman numerals.

Addition

To add two roman numerals, what you do is:

  1. Convert any subtractive prefixes to additive suffixes. So, for example, IX would be rewritten to VIIII.
  2. Concatenate the two numbers to add.
  3. Sort the letters, large to small.
  4. Do internal sums (e.g., replace “IIIII” with “V”).
  5. Convert back to subtractive prefixes.

So, for example: 123 + 69. In roman numerals, that’s “CXXIII + “LXIX”.

  1. “CXXIII” has no subtractive prefixes. “LXIX” becomes “LXVIIII”.
  2. Concatenate: “CXXIIILXVIIII”.
  3. Sort: “CLXXXVIIIIIII”.
  4. Internal sum: reduce the “IIIIIII” to “VII” giving “CLXXXVVII”; then reduce the “VV” to “X”: “CLXXXXII”.
  5. Switch to subtractive prefix: “XXXX” = “XL”, giving “CLXLII”. “LXL”=”XC”, giving “CXCII”, or 192.

Subtraction

Subtraction isn’t any harder than addition. To subtract A-B:

  1. Convert subtractive prefixes to additive suffixes.
  2. Eliminate any common symbols that appear in both A and B.
  3. For the largest remaining symbol in B, take the first symbol in A larger than it, and expand it. Then go back to step two, until there’s nothing left.
  4. Convert back to subtractive prefixes.

So 192-69 = “CXCII-LXIX”.

  1. Remove prefixes: CLXXXXII – LXVIIII.
  2. Remove common symbols. CXXX – VII.
  3. Expand an “X” in “CXXX”: CXXVIIIII – VII.
  4. Remove common symbols: CXXIII
  5. Convert to subtractive prefixes; in this case, there’s nothing to
    convert. So the answer is CXXIII, or 123.

Multiplication

Multiplication using roman numerals is not particularly easy or obvious. You can do the
trivial thing, which is repeated addition. But it should be pretty obvious that that’s not
practical for large numbers. The trick that they used was actually pretty nifty. It’s
basically a strange version of binary multiplication. You need to be able to add and divide
by two, but those are both pretty easy things to do. So here goes:

Given A×B, you create two columns, and write A in the left column, and B in the right. Then:

  1. Divide the number in the left column by two, discarding the remainder. Write it down in the next row of the left column.
  2. Multiply the number in the right column by two. Write it down in the right column next the the result from step 1.
  3. Repeat from step 1 until the value in the left column is 1.
  4. Go down the table, and cross out every row where the number in the left column is even.
  5. Add up the remaining values in the right column.

Let’s look at an example: 21 * 17; XXI * XVII in roman numerals.

We build the table:

Left Right
XXI(21) XVII (17)
X(10) XXXIV (34)
V(5) LXVIII (68)
II(2) CXXXVI (136)
I(1) CCLXXII (272)

Then strike out the rows where the left hand side are even:

Left Right
XXI(21) XVII (17)
X(10) XXXIV (34)
V(5) LXVIII (68)
II(2) CXXXVI (136)
I(1) CCLXXII (272)

Now add the non-struck-out values in the right hand column:


XVII + LXVIII + CCLXXII = CCLLXXXXVVIIIIIII = CCCXXXXXVII = CCCLVII = 357

Why does it work? It’s binary arithmetic. In binary arithmetic, to multiply A by B, you start with 0 for the result, and then for each digit dn of A, if dn=1, then add B with n 0s appended to the result.

The divide-by-two is giving you the binary digit of A for each position: if it’s odd, then the digit there was 1, if it’s even, the digit in that position was 0. The multiply by 2 on the right is giving you the results of appending the zeros in binary – for the Nth digit, you’ve multiplied by two n times.

Division in Roman Numerals

Division is the biggest problem in roman numerals. There is no good trick that works in
general. It really comes down to repeated subtraction. The only thing you can do to simplify
is variations on finding a common factor of both numbers that’s easy to factor out. For
example, if both numbers are even, you can divide each of them by two before starting the
repeated subtraction. It’s also fairly easy to recognize when both numbers are multiples of 5
or 10, and to do the division by 5 or 10 on both numbers. But beyond that, you take a guess,
do the multiplication, subtract, repeat.

Some Common Questions

  • Why does a clock use IIII instead of IV? There are a surprising number of theories for that. The top contenders are:
    • IV are the first letters of the name of Jupiter or the first letters
      of Jehovah in latin. Neither is particularly convincing, because it’s
      not a general rule of the number system – it’s only on clocks.
    • IIII is more symmetric with VIII on the clock face.
    • IIII allows clockmakers to use fewer molds to make the numbers for the clock face.
    • The king of France liked the way that “IIII” looked better that “IV”.
    • Coincidence. Technically, “IIII” is as correct as “IV”. So someone who started making clocks just happened to be someone who used “IIII” instead of “IV”. In fact, the Romans themselves generally preferred “IIII”.
  • Why do we still use roman numerals? No practical reason. Our society tends to
    be rather worshipful of the romans, and to consider Latin to be the language of scholars.
    So anything that wants to look impressive has traditionally used roman numerals, because
    that’s what they used in latin.
  • Is there a roman numeral 0? Yes, but it’s not entirely authentic.
    During the middle ages, monks using roman numerals used “N”, for “nullae” to
    represent 0. But it wasn’t the positional zero of arabic numbers; it was just
    a roman numeral to fill into the astronomical tables
    used to compute the date of Easter rather than leaving the column blank.

Comments

  1. #1 James Polley
    December 26, 2008

    The basic idea is that you start constructing a number by choosing the largest roman numeral close to it

    “largest … close to” is vague – the numeral this chooses will always be larger than the number in question, but how far larger depends on how loosely you define close. I think you meant “The largest roman numeral less than it”

    So, for example, to write a number like 35, the closest numeral is X for 10

    Actually, the closest numeral to 35 would be L. X is the numeral closest-to-but-less-than 35.

  2. #2 peter
    December 26, 2008

    I recently heard an interesting thought for why roman numerals are used in movie credits when indicating the copyright year. It was simply to make it harder for the viewer to figure out what year the movie they just watched (or were about to,) was produced.

  3. #3 Steve
    December 26, 2008

    Mark, since I wasn’t following your blog in 2006, I have some comments on some of what you said about Roman numerals — apart from it being a good read as always.
    First, compared to many ancient number systems, Roman numerals are remarkably straightforward, which is why they were so successful. They are far from “weird”, but are in fact the closest to how we count by grouping objects together — groups of 5, 10, 50 etc. They make far more sense than Babylonian numerals, for example.
    Second, the problem with IV and IIII both meaning four is actually unfair to the Romans. They almost universally used IIII. The prefix notation of IV for 4 and IX for 9 etc was actually introduced in Medieval Europe.
    Third, the technique for multiplication you describe actually originated with the Egyptians, and may have been used by the Romans. The doubling/halving technique is also known as Russian peasant multiplication, and is independent of the numerals you use. In fact, multipilcation is easiest to do on an abacus using what is essentially our own digit by digit calculations. And yes, the Romans had what is essentially identical to an abacus, placing pebbles in grooves and moving them up and down. Unfortunately there is no known link between the Roman and Chinese abaci.
    Forth, if you want to know more on how Roman numerals fit into the whole system of representing numbers, I recommend either “Number Words and Number Symbols” by Karl Menninger or “The Universal History of Numbers” by Georges Ifrah. Roman numerals are one of the less weird of all of them.
    Finally, if you want a “weird” way of representing numbers, look for references on “balanced notation” that uses digits that can represent positive and negative values, and “irrational bases” like arithmetic base the golden ratio. Heck, even our day, hour, minute system where each “digit” has a different base is pretty weird when you get down to it!

  4. #4 One_Brow
    December 26, 2008

    I learned a different multiplication system:

    You start out with a basic table, much like arabic numbers:

    I * I = I
    V * X = L
    V * V = XXV
    etc.

    Then, you multiply in the same way we teach in elementary school:

    XVII
    * LXV
    ———–
    LXXVVV
    CLXX
    DCCLLL
    ———–
    DCCCLLLLLXXXXVVV

    Then simplify.
    DCCCLLLLLXXXXXV
    DCCCLLLLLLV
    DCCCCCCV
    DDCV
    MCV

    I don’t klnow if the Romans used this method.

  5. #5 Jonathan Vos Post
    December 26, 2008

    I love Roman numerals. In a previous blog thread on this, I hotlinked to a bunch of my entries related to them in the Online Encyclopedia of Integer Sequences.

    A couple of points. The Roman numerals represented a striking break from the previously used Greek numerals, which were (as were Hebrew numerals) alphabetic, i.e. a differewnt interpretation of sequences of letters.

    The Romans did not, so far as I know, use the kind of algorithms that you suggest. They used calculi (little stones in grooves, reminsicent of an abacus) to compute. That is, a problem posed in Roman numerals would be mapped into the little stones in grooves, a computation manually performed, and the answer mapped back into Roman numerals. Centuries later, Gerbert, later Pope Sylvester II, introduced the abacus to Europe.

    Yes, the process was clumsy. So much so, that when Fibonacci introduced Arabic numerals to Europe, in his famous book Liber abaci published in Pisa in 1202, it triggered what I would call the Singularity of 1202, increasing the productivity of businesses that adopted the new system by roughly a order of magnitude. That created fascinating escalation of the commercial competition between the Italian city states, and arguably served as a tipping point towards the Renaissance.

    Which reminds me: over this holiday, I’m supposed to do some rewrite on my novel manuscript “Fibonacci: Superspy!”

  6. #6 Michael Paul Goldenberg
    December 26, 2008

    Strictly from the point of view of mathematics education, any non-positional system is worth looking at to help appreciate the advantages and power of the system we now use over various predecessors. Since Roman numerals still show up, they’re an obvious choice, but Babylonian, Egyptian, and some other systems serve a similar purpose.

  7. #7 Craig
    December 26, 2008

    “Beyond that, they started using mnemonics; so C, D, and M are all based on the latin words for 100, 500, and 1000.”

    How is that true for 500, which is quīngentī in Latin?

  8. #8 Chris
    December 26, 2008

    > How is that true for 500, which is quīngentī in Latin?

    According to Conway and Guy’s “Book of Numbers” (p. 19) both symbols C and M were taken by the Romans from the Etruscan system and their respective symbols, which looked kind of similar to C and M. The D is “half of the Etruscan symbol for 1000″, i.e. if you consider an M with rounded vertical lines and cut off the left half it somewhat resembles a D.

    Conway and Guy write further that C and D just happened to be the initial letters of the latin words “centum” and “mille” by coincidence.

  9. #9 JakeR
    December 26, 2008

    IIRC the Romans never did arithmetic in their numeral system, rather they used something like an abacus or a large square-ruled tablet on which they moved stones (calculi), then transcribed the result to writing.

  10. #10 QrazyQat
    December 26, 2008

    After reading the comments — particularly about what Roman numerals actually supplanted — it looks like next week’s topic should be “Why didn’t the Romans ride bicycles like we do?”

  11. #11 ekzept
    December 27, 2008

    See this entry and its links for more, and this Mathworld entry for further details.

    It might be observed that it was possible to raise the value of a group of numbers using vinculi or boxes, multiplying the group by 1000 or 100,000, respectively. Also, it seems like it would be easy to chisel all Roman numerals in stone: No curves.

  12. #12 Clive
    December 27, 2008

    I’ve always been a little disappointed that my first name includes the trailing ‘e’… :-)

  13. #13 Atrytone
    December 27, 2008

    Thanks for the repost, I thoroughly enjoyed it! I hadn’t played with binary multiplication before – fun stuff.

  14. #14 Zwirko
    December 27, 2008

    Odd that you mention clocks without “IV”. I don’t think I’ve ever seen one with “IIII”. Is the latter form perhaps an American thing? A dumbing-down type thing?

  15. #15 John Fouhy
    December 28, 2008

    I have read that the prefix-subtraction thing was inconsistently applied by the Romans.

    For example, I learnt (in school, I think — god knows why) that “XLIX” is 49, and “IL” is incorrect. But a Roman might have written IL. Or he might have written XXXXIX, or XXXXVIIII. Which is fair enough, I guess — everyone knows how to read it, so no big problem.

  16. #16 Thony C.
    December 29, 2008

    Standard roman numerals don’t have any symbols for representing numbers larger than 1000. There are modern usages that extend roman numerals by adding over-bars for larger numbers; so, for example, “V” with a horizontal line floating over it represents 5000, etc. But that’s an inauthentic (not to mention entirely pointless) modern addition, not part of the historical roman numeral system. (The goofiness of people never ceases to amaze me. For goodness sakes, why on earth would anyone feel obliged to figure out how to adapt a pointlessly complex, anachronistic number system to work with larger numbers?)

    The original Roman symbol for 1000 was not M but (I) and I) for 500. For 10 000 they used ((I)) and I)) for 5 000, for 100 000 (((I))) and I))) and so on and so forth.

  17. #17 Chris
    December 29, 2008

    why on earth would anyone feel obliged to figure out how to adapt a pointlessly complex, anachronistic number system to work with larger numbers?

    A really long outline?

  18. #18 Nemo
    December 31, 2008

    As others have mentioned, “D” is half of an “M”, split down the middle vertically (for properly stylized “M”).

    Also, “L” is half of a “C”, if you write the “C” like you are carving in stone (straight lines, no curves) and split it down the middle horizontally.

    Similarly, “V” is half of an “X”, split down the middle horizontally.

  19. #19 rc
    January 1, 2009

    Are those roman numerals still used for so many things today?