Here's an easier way. Take 11/26 and write out the continued fraction representation, = [2, 2, 1, 3]. Underneath write the convergents = [1/2, 2/5, 2/7, 11/26]. From the rightmost denominator (26), subtract the denominator to the left (7), giving 19, the answer. This rule applies to an even number of partial quotients (we have 4). For an odd number, we just record the denominator to the left of the rightmost denominator. Say we want the multiplicative inverse of 5 mod 21. We get [4, 4, 1] and underneath our convergents are [1/4, 4/17, 5/21]. Denominator to the left of the 21 is 17, the answer since 5 * 17 = 85 = 1 mod 21; (correct).