- #1
MathewsMD
- 433
- 7
Hi,
Are there any rules against multiplying or adding first when using modulo #?
The reason I ask is because I'm doing the dot product for two vectors:
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1].[8, 0 ,3 ,7, 0, 9, 9, 0, 2, 6]
By doing this, I get:
80 + 0 + 24 + 49 + 0 + 45 + 36+ 0 + 4 + 6 = 0 (mod11) - it equals 244
Now, if I simplify first before adding:
3 + 0 + 2+ 5+ 0 + 1 + 3+ 4 + 6 = 2 (mod11)
I'm not exactly sure if my arithmetic is poor and I am completely missing a simple error, or if I am dismissing a fundamental concept, but I can't seem to find my problem. Is there any reason why I get 0 as one answer, and 2 as the other (in mod11)?
Are there any rules against multiplying or adding first when using modulo #?
The reason I ask is because I'm doing the dot product for two vectors:
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1].[8, 0 ,3 ,7, 0, 9, 9, 0, 2, 6]
By doing this, I get:
80 + 0 + 24 + 49 + 0 + 45 + 36+ 0 + 4 + 6 = 0 (mod11) - it equals 244
Now, if I simplify first before adding:
3 + 0 + 2+ 5+ 0 + 1 + 3+ 4 + 6 = 2 (mod11)
I'm not exactly sure if my arithmetic is poor and I am completely missing a simple error, or if I am dismissing a fundamental concept, but I can't seem to find my problem. Is there any reason why I get 0 as one answer, and 2 as the other (in mod11)?