Technology
Why Modular Arithmetic Keeps Your Credit Card Safe
Quick fact
The last digit of most credit card numbers is a 'check digit' computed from the preceding digits using the Luhn algorithm. If you swap two digits or mistype one, the algorithm usually catches it, causing the transaction to be declined.
Why this is interesting
Your credit card number isn't just a random string of digits—it contains a hidden mathematical code that helps detect fraud before it happens. How does a simple calculation keep your money safe?