# How to code words with inverse functions

by Andrea Boggs | 11 June 2014

Follow these steps in order to learn how to encode a word with a linear function and decode it with the inverse function. You can hide passwords or a secret idea this way. Begin practicing this algebraic technique by encoding one word like 'Typewriter.' In English the alphabet has 26 letters so the first step is to assign the number 1 to the letter A, the number 2 to the letter B, the number 3 to the letter C and so on until you reach the letter Z which will be assigned the number 26. Think of any linear function (x and y to the first power) such as: y = 2x – 16. All linear functions have inverse functions. To find the inverse function designated as F(x) then switch the y and the x in the equation and solve for y. So if you switch x and y and solve for y the inverse of f(x) = 2x – 16 would be F(x)= (x+16)/2. function f(x): Inverse Function F(x) f(x) = 2x– 16 F(x) = (x+16)/2 If you know what your function is and your inverse function, you can start solving the function f(x) by plugging in the numbers for x that are associated with the letters in your secret word. If your secret phrase is “typewriter” which is a word made up of 10 total letters and 7 different letters, you have to solve the function for every different letter by plugging in the numbers that are assigned to the letters of the word. For T-Y-P-E-W-R-I-T-E-R, (on the scale where 1 is A and Z is 26), you must plug in T=20, Y=25, P=16, E=5, W=23, R=18, I=9, to encode the word “Typewriter.” Encoded in the linear function f(x) = 2x – 16 the word “Typewriter” looks like: “24-34-16-(-6)-30-20-2-24-(-6)-20” The letter E will be a negative number because ~ when you plug 5 for E into the function f(x) = 2x – 16 ~ then 2 times 5 = 10 minus 16 = -6. To decode the word you plug the numbers in the encoded word into the Inverse Function F(x). By doing this and solving for y you will get the numbers that are associated with the letters in the word 'Typewriter' for the function. F(24)=20=T; F(34)=25=Y… The letters that repeat in the word (T,E,R) will also repeat in the code.