In mathematics, particularly in the area of arithmetic, a modular multiplicative inverse of an integer is an integer such that the product is congruent to 1 with respect to the modulus . In the standard notation of modular arithmetic this congruence is written as which is the shorthand way of writing the statement that divides (evenly) the quantity , or, put another way, the remainder after dividing by the integer is 1. If does have an inverse modulo , then there are an infinite number of solutions of this congruence, which form a congruence class with respect to this modulus. Furthermore, any integer that is congruent to (i.e., in 's congruence class) has any element of 's congruence class as a modular multiplicative inverse. Using the notation of to indicate the congruence class containing , this can be expressed by saying that the modulo multiplicative inverse of the congruence class is the congruence class such that: where the symbol denotes the multiplication of equivalence classes modulo . Written in this way, the analogy with the usual concept of a multiplicative inverse in the set of rational or real numbers is clearly represented, replacing the numbers by congruence classes and altering the binary operation appropriately. As with the analogous operation on the real numbers, a fundamental use of this operation is in solving, when possible, linear congruences of the form Finding modular multiplicative inverses also has practical applications in the field of cryptography, i.e. public-key cryptography and the RSA algorithm. A benefit for the computer implementation of these applications is that there exists a very fast algorithm (the extended Euclidean algorithm) that can be used for the calculation of modular multiplicative inverses. Modular arithmetic For a given positive integer , two integers, and , are said to be congruent modulo if divides their difference. This binary relation is denoted by, This is an equivalence relation on the set of integers, , and the equivalence classes are called congruence classes modulo or residue classes modulo . Let denote the congruence class containing the integer , then A linear congruence is a modular congruence of the form Unlike linear equations over the reals, linear congruences may have zero, one or several solutions. If is a solution of a linear congruence then every element in is also a solution, so, when speaking of the number of solutions of a linear congruence we are referring