Modular addition as the sum of two line segments
(Modular Arithmetic)
First, let us see how to add two natural numbers geometrically with the help of line segments:
- Fix a unit and build a segment with length equal to the first number;
- Build another segment with length equal to the second number;
- Juxtapose the two segments in order to form a single segment (with no overlap).
Then, the value of the sum of the two numbers is equal to the length of the latter segment.
In the case of Modular Arithmetic, this construction must be slightly modified when the sum of the two segments is greater than the fixed modulus. The solution is to "split" the second segment in two parts, in such a way that the first segment plus the first part has length equal to the modulus. The value of the modular sum is then equal to the length of the second (remaining) part.
To understand it better, take a look to this app.