Calculator
Example Data Table
| Matrix size | Sample matrix | Determinant mod 26 | Invertible? | Useful for |
|---|---|---|---|---|
| 2 × 2 | [3, 3; 2, 5] | 9 | Yes | Small Hill cipher keys |
| 3 × 3 | [6, 24, 1; 13, 16, 10; 20, 17, 15] | 25 | Yes | Classic cipher examples |
| 2 × 2 | [2, 4; 6, 8] | 18 | No | Determinant failure practice |
Formula Used
Inverse formula: A-1 ≡ det(A)-1 × adj(A) mod 26
Invertibility rule: A matrix is invertible mod 26 only when gcd(det(A), 26) = 1.
Adjugate rule: adj(A) is the transpose of the cofactor matrix.
Verification rule: A × A-1 ≡ I mod 26.
How to Use This Calculator
- Select the square matrix size from 1 × 1 to 5 × 5.
- Enter each matrix value in the input cells.
- You may paste a full matrix in the textarea instead.
- Click the calculate button.
- Read the determinant test first.
- Use the inverse table only when the matrix is invertible.
- Check the verification matrix for the identity pattern.
- Export the result as CSV or PDF when needed.
About the Inverse Matrix Mod 26 Method
Why This Calculator Matters
An inverse matrix mod 26 is useful in modular algebra and classical cryptography. It is often used with Hill cipher problems. The calculator checks whether a square matrix can be inverted under modulus 26.
How Modular Inversion Works
A normal inverse uses division. Modular arithmetic does not allow ordinary division. Instead, the determinant must have a modular inverse. For modulus 26, this means the determinant must be coprime with 26. So its greatest common divisor with 26 must be 1.
Determinant and Cofactor Steps
The tool first reduces every entry into the range 0 to 25. It then finds the exact determinant. Next, it converts that determinant into its mod 26 value. If the determinant shares a factor with 26, the matrix is not invertible. Common bad factors are 2 and 13.
Creating the Final Inverse
When the determinant is valid, the calculator builds the cofactor matrix. It transposes the cofactor matrix to create the adjugate. Then it multiplies every adjugate value by the modular inverse of the determinant. Every final value is reduced mod 26.
Checking the Answer
This process gives a matrix that works like a true inverse in mod 26 arithmetic. Multiplying the original matrix by the result should give the identity matrix mod 26. That identity check is important. It confirms the calculation and helps find input mistakes.
Advanced Input and Export Options
This page supports different matrix sizes, direct cell entry, and pasted matrix data. It also shows the determinant, determinant inverse, adjugate, inverse matrix, and verification product. The heatmap graph makes matrix patterns easier to inspect.
Best Use Cases
Use this calculator for algebra practice, cipher decoding, classroom examples, and quick validation. It is most helpful when your work needs clear steps. The export buttons save the result for reports, notes, or later checking. Always review the determinant test before trusting the inverse.
Input Tips
A strong workflow starts with clean data. Keep rows in the correct order. Separate pasted numbers with spaces, commas, or line breaks. Negative entries are accepted, because they are reduced automatically. Large entries are also accepted. The final table still uses the same modular range. This makes the output easier to compare with alphabet positions, where A is 0 and Z is 25. Copy the verification table when carefully checking matrix multiplication by hand.
FAQs
What is an inverse matrix mod 26?
It is a matrix that reverses another matrix under modulo 26 arithmetic. When multiplied by the original matrix, it should return the identity matrix mod 26.
When does a matrix have an inverse mod 26?
A matrix has an inverse mod 26 when its determinant is coprime with 26. This means gcd(det, 26) must equal 1.
Why is modulus 26 common?
Modulus 26 matches the number of English alphabet letters. That makes it useful for Hill cipher encryption and decryption examples.
Can negative matrix values be used?
Yes. Negative entries are reduced into the range 0 to 25 before modular checking. For example, -1 becomes 25 mod 26.
What happens if the determinant is even?
An even determinant shares factor 2 with 26. So it cannot have a modular inverse under mod 26, and the matrix is not invertible.
What is the adjugate matrix?
The adjugate is the transpose of the cofactor matrix. It is multiplied by the modular inverse of the determinant to form the inverse matrix.
How do I verify the inverse?
Multiply the original matrix by the calculated inverse. If the product is the identity matrix under mod 26, the inverse is correct.
Can I export the calculation?
Yes. After submitting the form, use the CSV or PDF buttons to save determinant values, matrix steps, and final inverse results.