[Edu-sig] beginner trouble, indexing starting w/"0"

Stephen R. Figgins fig@oreilly.com
Fri, 30 Jun 2000 07:20:00 -0700

>While he understood the idea of indexing fine he didn't
>understand the first element being indexed with "0".
>When he taught vectors or matrices to the students they usually
>indexed from 1 to N (vectors), or 1 to N by 1 to M (matrices).
>The upper left element in a matrix was A(1,1) or something.

This is true, but on the other hand, if he were to graph a vector,
like say (4,3) he would start the vector from x and y coordinates
(0,0).  What he ran into is the same problem that every kid runs into
when they start drawing the number line, and realize they need to
start from 0, not 1.  Most programming languages extend that concept
to array indeces.  

It is a stumbling block, but a very small one, and you learn something
in the stumble.  Not all stumbles are bad ones.