# Roman Numerals

Roman Numerals are a Numeral System used by the ancient Romans, and many cultures (either directly or indirectly) influenced by them, both today and in the past. (For example, growing up in Canada I sometimes saw them used when writing years. But this practice seem to become less common as I got older.)

Roman Numeral Whole Numbers look like....

`I`
`V`
`XVII`
`MCMLXXXIV`

And roman numeral fractions look like....

`··`
`····`
`::`
:·:
`S`
`S:`
`S··`
S:·:

Roman numerals with whole number and fractional parts look like....

`IIS`
`III··`
IX:·:
MVS∴

(Take note that most people today, that I know of, who talk about "roman numerals", are talking about "whole number roman numerals", and not roman numeral fractions.)

I've read that the Roman Numerals were based on Etruscan Numerals. (I've read and been told that the Romans originally got their civilization and much of their culture from the Etruscans.)

Roman Numerals can be used to represent (certain) Whole Numbers and even (certain) Fractions. When representing whole numbers, roman numerals are essentially base-10. However, when representing fractions, roman numerals are essentially base-12. (Whole number and fractional roman numerals can even be mixed.)

## Modern Usage of Roman Numerals

Roman Numerals are still being used today. When I was in Elementary School, in the 1980s, I remember being taught them. And even before that, I think I remember my father and my mother teaching me roman numerals. (I think it was for reading clocks and watches with roman numerals.)

### Romans Numerals For Clocks, Watches, and Dates

When I was younger, in the 1980s, I remember seeing roman numerals being used to write out years. (Often for use in Copyright declarations.)

Also, when I was growing up, we had at least one wall Clock with roman numerals. And I think I've even seen (analog) Wrist Watches with roman numerals.

### Roman Numerals in Chemistry

I still seen roman numerals being used in Chemistry. (Like, for example, the Fe2+ ion can be written as "Iron (II)". And also, for example, the Fe3+ ion can be written as "Iron (III)". This can even be used in the names of compounds, such as Iron (II) Sulphate; which is the same thing as `FeSO4`, and is also known as Ferrous Sulphate and Copperas.)

### Roman Numerals in Names

I sometimes see names with roman numerals. (Like, for example, World War II; which reads as "World War Two". Or Mary I of Scotland; which reads as "Mary the first of Scotland".) In the case of when it appears in the names people, this is basically used to represent generations in a pedigree.

### Roman Numerals in Lists

I still see roman numerals used in lists. Like, for example, to number the chapters in a Book. Or, for example, to number items in a point list. For example....

1. First
2. Second
3. Third
4. Fourth

## How To Read and Write Romans Numerals

Understanding how roman numerals work isn't that difficult. You should be able to pick them up fairly easily. Especially if you see them all the time.

### Symbols

The fundamental thing to know about roman numerals, is that Whole Number roman numerals use a series of one or more letters, from the Roman Alphabet (also called the Latin Alphabet), to represent Numbers.

(Note, Fractional roman numerals are a bit different, but I discuss those a little later.)

So it could be a single letter like "`V`" for the number Five (5). Or it could be a series on the basic set of letters, like "`MMVIII`" for the number Two Thousand and Eight (2008).

Here is a table that shows the basic symbols used in roman numerals.

#### Memorizing the Basic Roman Numeral Symbols

If you are trying to memorize this, the pattern I see here (and hopefully you see too) is....

Basically, to get to the next "value", you alternate between Multiplying by 5 and 2, to the previous "value".

Also, to remember the letter ordering.... Most people just memorize the first 3 letters: I, V, X; and memorize that they represent One (1), Five (5), and Ten (10), respectively.

(I think it is easy for most people to memorize these, today, because many many people are used to seeing roman numerals on Clocks and Wrist Watches. And if you can read the time off of a clock or a wrist watch with roman numerals, then you almost certainly already know what these mean.)

The last four letters -- L, C, D, and M -- are either also just memorized. Or are remembed with a Mnemonic. Such as....

• Lucky Cows Drink Milk
• Lazy Cows Don't Moo
• Little Cats Drink Milk
• LCD Monitor

(If none of these mnemonics work for you, try making up your own. You could even make one up for the whole series: I, V, X, L, C, D, and M.)

### Roman Numeral Whole Number Examples

Besides the basic 7 letters, other whole numbers (that can be written with roman numerals) are written as a series of these letters. For example, 3 is written as "III"; 7 is written as "VII"; 31 is written as "XXXI"; 72 is written as "LXXII"; and 1985 is written as "MCMLXXXV".

The table below shows some more examples....

### Upper Case Versus Lower Case Roman Numerals

Although I tend to write Roman numerals using Upper Case letters, they can also be written using Lower Case letters as well. So, for example, 3 can be written as "III" or "iii"; 7 can be written as "VII" or "vii"; 31 can be written as "XXXI" or "xxxi"; 72 can be written as "LXXII" or "lxxii"; and 1985 can be written as "MCMLXXXV" or "mcmlxxxv".

### More Roman Numeral Patterns

Roman numerals follow this pattern....

### Writing Roman Numerals

Writing whole number roman numerals is actually straight forward if you know the Algorithm. Since whole number roman numerals are essentially Decimal (base-10) converting whole number Arabic Numerals to whole number roman numerals is straight forward.

The best way to illustate this is through an example. Consider the number 1984. THe first thing we do is break this appart as....

``````
1984
----
1000
900
80
4
``````

Once you have that, you convert each part to roman numerals, as....

``````
1984
----
1000 = M
900 = CM
80 = LXXX
4 = IV
``````

Then you just concatenate each those roman numerals together, as....

``````
1984
----
1000 = M
900 = CM
80 = LXXX
4 = IV
------------
M CM LXXX IV
------------
MCMLXXXIV
``````

And you get the result "`MCMLXXXIV`".

If you paid close attention to that example, the question you're probably wondering right now is... how do you know how to "convert" each of those Arabic Numeral parts to roman numerals

TODO

### Reading Roman Numerals

To read roman numerals, you, of course, need to have the sequence memorized: `I`, `V`, `X`, `L`, `C`, `D`, and `M`.

So, for example, say you had the roman numeral "MMMCMLXXXIV". Now, you need to take the roman numeral sequence in reverse: `M`, `D`, `C`, `L`, `X`, `V`, and `I`.

Now go through the roman numeral you are trying to read, from left to right. And find all the out of order letters, and....

1. Break it apart before that out of order letter.
2. Break it apart after the letter following the out of order letter.

For example....

``````
MMMCMLXXXIV
--------------
MMM CM LXXX IV
``````

Now you figure out the value of each of those pieces. As in....

``````
MMMCMLXXXIV
--------------
MMM CM LXXX IV
--------------
MMM             = 3000
CM          =  900
LXXX     =   80
IV  =    4
``````

Now add those piecs together, as in....

``````
MMMCMLXXXIV
--------------
MMM CM LXXX IV
--------------
MMM             = 3000
CM          =  900
LXXX     =   80
IV  =    4
----
3984
``````

Thus giving you the result of: 3984.

Here's anothr example. Consider the roman numeral: `CDIX`. This gives you....

``````
CDIX
--------
CD IX
--------
CD       = 400
IX    =   9
---
409
``````

Thus giving us th result of: 409.

And for a final example, consider the roman numeral: `MMMCDV`. This gives us....

``````
MMMCDV
--------
MMM CD V
--------
MMM       = 3000
CD    =  400
V  =    5
----
3405
``````

Which gives us the result: 3405.

### Zero

Note that there is no way to represent Zero using roman numerals.

I've read that, much much later after the Romans, in the 8th Century (around the year 725), the letter N was used by a one or two people to represent zero. But, as far as I know, this never became popular and may have only been used once, and is definitely not something the Romans ever had. (Also, I've read that N has also been used to represent Fifty (50), as an alternate to L.)

## Calculations

For doing calculations, Roman Numerals are horrible! Roman numerals and not appropriate to be used for any of the "good" hand-based Algorithms for Adding, Subtracting, Multipling, or Diving.

Growing up in Canada and the USA I learned to use Arabic Numerals -- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, etc -- for doing calculations done by hand. (Although I've often used Hexadecimal and Binary Numerals for Computer Science and Software Engineering.)

## Web Development

For those involved in Web Development, although it is simple to write roman numerals in HTML, the HTML ol Element can be made to make an ordered list that numbers the items in the list with roman numerals. This can be accomplished with the "type" attribute.

For example, here is some sample HTML code that uses Upper Case roman numerals....

``````
<ol type="I">
<li>Example Item One</li>
<li>Example Item Two</li>
<li>Example Item Three</li>
<li>Example Item Four</li>
<li>Example Item Five</li>
<li>Example Item Six</li>
<li>Example Item Seven</li>
<li>Example Item Eight</li>
<li>Example Item Nine</li>
<li>Example Item Ten</li>
</ol>
``````

This would give you....

1. Example Item One
2. Example Item Two
3. Example Item Three
4. Example Item Four
5. Example Item Five
6. Example Item Six
7. Example Item Seven
8. Example Item Eight
9. Example Item Nine
10. Example Item Ten

And for example, here is sample HTML code that uses Lower Case roman numerals....

``````
<ol type="i">
<li>Example Item One</li>
<li>Example Item Two</li>
<li>Example Item Three</li>
<li>Example Item Four</li>
<li>Example Item Five</li>
<li>Example Item Six</li>
<li>Example Item Seven</li>
<li>Example Item Eight</li>
<li>Example Item Nine</li>
<li>Example Item Ten</li>
</ol>
``````

This would give you....

1. Example Item One
2. Example Item Two
3. Example Item Three
4. Example Item Four
5. Example Item Five
6. Example Item Six
7. Example Item Seven
8. Example Item Eight
9. Example Item Nine
10. Example Item Ten

Alternatively, you can specify type of "numbering" used for a specific HTML li Element (inside of an HTML ol Element) using the CSS.

For example....

``````
<ol>
<li style="list-style-type : decimal;">Test Item One</li>
<li style="list-style-type : lower-alpha;">Test Item Two</li>
<li style="list-style-type : upper-alpha;">Test Item Three</li>
<li style="list-style-type : lower-roman;">Test Item Four</li>
<li style="list-style-type : upper-roman;">Test Item Five</li>
</ol>
``````

This would give you....

1. Test Item One
2. Test Item Two
3. Test Item Three
4. Test Item Four
5. Test Item Five

## UNICODE

In addition to the regular characters -- I, V, X, L, C, D, M and i, v, x, l, c, d, m -- to construct roman numerals, UNICODE also has special characters that are meant to be used for roman numerals. (These generally look exactly the same as the normal characters.)

These are mainly intended to be used for Clock faces, which is why you have 2 series going from 1 to 12.

These are shown in the table below....

These, of course, can also be used for Web Development in HTML, using the HTML Entities listed in the table. Although I would not recommend it. I'd recommend just using normal characters to construct roman numerals.

If you want to do something special, you could do something like....

``````
<code class="roman-numeral">MCMLXXVI</code>
``````

... using the HTML code Element. Or could do the following...

``````
<span class="roman-numeral">MCMLXXVI</span>
``````

... using the HTML span Element.

## Roman Numeral Fractions

Roman numerals also have a notation for Fractions. (For example "S:·:" for `11⁄12`.) This notation can also be used to make numbers that are mixed of whole numbers and fractions. (For example "IIS" for `21⁄2`)

I have never seen these being used in modern times. However, to be able to better understand certain kinds of History, Archaeology, and Anthropolgy, learning roman numeral frations can be necessary. (Especially when it is so easy to learn them!)

For example, the Romans used this notation on the Coins they used for Money. What might look like a few dots for decoration on an ancient Roman coin to the uninitiated, would in reality represent the denomination and the value of the coin, which would easily be noticed by the initiated.

Unlike the roman numerals used to represent Whole Numbers, which is Decimal (base-10), roman numeral fractions are Dozenal (base-12).

The following table represents the main roman numeral fractions. These go from `1⁄12` to `12⁄12` (in steps of `1⁄12`'ths)....

Roman numerals also has notations for fractions beyond these. Specifically....

So, for example, `21⁄2` is written as a roman numeral as IIS.

TODO