Another way of encoding is to divide plain text into sets of n-letters, and replace them with n code letters. In this case invertible matrices can be used to provide a better coding, than substitution.
First associate a different number with every letter of alphabet.
For example we may use the following conversion table:
Suppose choose a 3 x 3 invertible matrix A,
Then
Both communicating parties should have knowledge of the table which list association of letters to numbers, the matrices A and . The party that want to send a message, needs to covert it to a string of numbers. As a second step that string of numbers needs to be divided into groups of 3, then multiple each group by the matrix to form new groups and build a new string of numbers. Then, send the resulted string as a string of numbers or letters. The party who is receiving the coded string should divide the string into groups of 3, then multiple by and finally convert it to letters.