0
$\begingroup$

Spawning from here:

We usually don't care whether indices start at $0$ or $1$ (except in the sense we'd rather start with our favourite if it doesn't matter, and the old joke is that set theorists start at $0$ and non-Peano number theorists start at $1$). I say usually, because there are a few cases where we do:

  • [...]
  • [...]
  • If there's programming involved, use the same indexing for your mathematical exposition as in the code itself, which varies by language. For example, Python starts at $0$, whereas R starts at $1$.

Why did they choose to start from $1$?

$\endgroup$
  • $\begingroup$ See this SO question. $\endgroup$ – J.G. Nov 3 '19 at 12:46
  • $\begingroup$ Until further clarification, I'll take that your reference is not to the question but to these one and two answers. $\endgroup$ – 108880 Nov 3 '19 at 12:53
  • 1
    $\begingroup$ Compatibility with Fortran and Matlab? $\endgroup$ – Yuval Filmus Nov 3 '19 at 15:55
  • $\begingroup$ Compatibility with Mathematica? In any case, counting starts at 1, there is no doubt about it ... measuring starts at 0 ... $\endgroup$ – EGME Nov 3 '19 at 20:22
  • $\begingroup$ Also, if you index from 1 to n, n is also the number of elements in the set you indexed ... $\endgroup$ – EGME Nov 4 '19 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.