 Once we have an algebraic formulation for the addition of points on an elliptic curve, we can then consider what happens when we try to do this mod n. And so, again, let's consider two points that are on an elliptic curve. What we'll do is we'll use exactly the same rules, but this time we're going to use mod n arithmetic. So, first off, what do we have to do? Well, if the points are distinct, we'll figure out the slope between them at lambda, and then we'll evaluate these two as the location of the point. If the two points are the same point, then we can compute the slope between them as the tangent line, again, using our implicit differentiation formula, and we'll compute our new coordinates as before. Now, one thing that's worth noting here is lambda in general is going to require a division, either by 2y1 or by the difference x2 minus x1. And mod n, we can't divide what we have to do is multiply using the multiplicative inverse. Now, mod n, not all numbers will necessarily have a multiplicative inverse. They have to be numbers that are relatively prime to n. So, what this means is two things. First of all, if the inverse doesn't exist, then our slope is undefined, and our point at infinity is going to be the sum. Now, while this is a reasonable thing to do, we actually want to avoid that, because that point at infinity sometimes causes complications. So, the other option is we can make sure that every number has a multiplicative inverse, and this will happen if our modulus n is prime. So, in general, we'll be looking at the multiplication of elliptic curves, mod n, where n is a prime number. For example, let's consider our elliptic curve, y squared equals xq plus 2x plus 7, mod 29, and it turns out that two points on the curve 4, 5, and 10, 14. So, we have these two points on our elliptic curve, and the points are distinct, so we can find the slope between them. So, we'll use our regular slope formula, y1 minus y2, x1 minus x2. Simplify that, that's 9 over 6, and that's the same as 9 divided by 6. And remember, in mod 29, the multiplicative inverse of 6 is 5. So, rather than 9 divided by 6, I'm going to actually find 9 multiplied by 5, which is 45, which will reduce mod 29 to 16. So, the slope of the two points, the slope of the line between the two points, going to be 16. And now that I know lambda, I can compute the x3 and y3 coordinates. So, I have my formulas, I'll substitute in my values, and there's my x3 coordinate, substituting in my values, there's my y3 coordinate, and so the addition of these two points, 4, 5, and 10, 14, gives us the point 10, 15. Now, let's take a look at another example. So, again, I'll take an elliptic curve, this time mod 31. 10, 14 is a point on the curve, and this time I'll just add 10, 14 to itself. So, let's see what happens. One thing that's worth noting, we can use the notation that anytime we add a point to itself, what we get is 2 times the point. Now, it's very, very, very, very, very important to remember. We're not looking at standard vector addition, standard scalar multiplication. We don't find this sum by adding component-wise. We don't find this product by multiplying the two terms by two. We have to use our elliptic curve addition formulas. Now, there's only one point, so we would be looking at the slope of the tangent line, which we're going to find using our differential equation, our derivative formula. Substituting our x and y coordinates, we get a slope of 292 over 38, and mod 31, that's going to have an inverse of 10, so that's 292 times 10, and I'll simplify, and a slope is going to be 6. Likewise, we can use our formula for computing the location of the point, and that gives us our final solution.