The terms alphabetical and lexicographical are used interchangeably, but if they mean the same, why do we have two different terms for it? <blockquote class="twitter-tweet tw-align-right" width="420"><p>What's the difference between lexicographical and alphabetical order? <a href="http://t.co/ea3q3YDn" title="http://qr.ae/8UvRO">qr.ae/8UvRO</a></p>— Bettina Kast (@spunkypixels) <a href="https://twitter.com/spunkypixels/status/236126384089595905" data-datetime="2012-08-16T15:44:51+00:00">August 16, 2012</a></blockquote> <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

The terms alphabetical and lexicographical are used interchangeably, but if they mean the same, why do we have two different terms for it? I googled, then I asked around but without much success at first, but got the answer I was looking for.

What’s the difference between lexicographical and alphabetical order? qr.ae/8UvRO

— Bettina Kast (@spunkypixels) August 16, 2012

The problem behind my question was that people seem to use lexicographical and alphabetical order (or sorting) interchangeably, because I asked too general. When put in context, lexicographical sort is technically different. I was able to clarify for myself the terminology somewhat with the American Heritage Dictionary and Wikipedia, some lexicographical sorting tutorial, and this discussion about an algorithm problem.

In a Nutshell

Alphabetical = Arranged in the customary order of the letters of a language.
Alphanumeric = Consisting of both letters and numbers.
Lexicographical = Sorting on strings (strings need to have the same length), as e.g. in date formats as in YYYY/MM/DD

UPDATE:

Lexicographical sorting in terms of Java referring to capitalized entries are listed before entries in lower cap, like so:

  • Aa
  • Ab
  • Ac
  • aa
  • ab
  • ac
  • etc. p.p.