Inversa modular de una matriz

La inversa de una matriz módulo \(n\) es una matriz \(A^{-1}\) tal que, al multiplicarla por la matriz original \(A\), el resultado es congruente con la matriz identidad \(I\) módulo \(n\): $$ AA^{-1} \equiv I \mod n $$

Esto significa que cada entrada del producto \(AA^{-1}\) es congruente, módulo \(n\), con la entrada correspondiente de la matriz identidad.

¿Cómo calcular la inversa de una matriz módulo \(n\)?

Consideremos una matriz cuadrada de orden \(2 \times 2\) con coeficientes enteros, en aritmética módulo \(n\):

$$ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$

Para hallar \( A^{-1} \mod n \), el primer paso consiste en calcular el determinante de \(A\) módulo \(n\):

$$ \det(A) = ad - bc \mod n $$

Es imprescindible que el determinante sea coprimo con \(n\), es decir, que \( \gcd(\det(A), n) = 1 \); de lo contrario, la matriz \(A\) no es invertible módulo \(n\).

Si esta condición se cumple, se continúa con el cálculo:

$$ \text{MCD}(\det(A),\ n) = 1 $$

Se determina entonces el inverso multiplicativo de \( \det(A) \) módulo \(n\), es decir, un número \( \det(A)^{-1} \) tal que $$ \det(A) \cdot \det(A)^{-1} \equiv 1 \mod n $$

Con dicho inverso, la inversa de la matriz \(A\) módulo \(n\) se calcula mediante la fórmula:

$$ A^{-1} \equiv \det(A)^{-1} \cdot \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \mod n $$

Finalmente, se reducen todas las entradas del resultado al intervalo \( [0, n - 1] \), utilizando congruencias módulo \(n\).

Ejemplo práctico

Sea la siguiente matriz de orden \(2 \times 2\) en módulo \(n = 9\):

$$ B = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} $$

Calculamos su determinante módulo 9:

$$ \det(B) = 2 \cdot 4 - 3 \cdot 1 = 5 \mod 9 $$

Verificamos que 5 y 9 son coprimos:

$$ \gcd(5, 9) = 1 $$

Por tanto, la matriz \(B\) es invertible módulo 9.

Nota. Si el determinante y el módulo no son coprimos, la matriz no tiene inversa en ese módulo y el procedimiento se detiene.

Ahora, buscamos el inverso multiplicativo de 5 módulo 9. Como:

$$ 5 \cdot 2 = 10 \equiv 1 \mod 9 $$

entonces: $$ \det(B)^{-1} \equiv 2 \mod 9 $$

Aplicamos la fórmula para matrices \(2 \times 2\):

$$ B^{-1} \equiv 2 \cdot \begin{pmatrix} 4 & -3 \\ -1 & 2 \end{pmatrix} \mod 9 $$

Multiplicamos escalarmente y reducimos:

$$ = \begin{pmatrix} 8 & -6 \\ -2 & 4 \end{pmatrix} \mod 9 $$

Ajustamos las entradas negativas utilizando congruencias módulo 9: $$ -6 \equiv 3 \mod 9, \quad -2 \equiv 7 \mod 9 $$

Obtenemos finalmente:

$$ B^{-1} \equiv \begin{pmatrix} 8 & 3 \\ 7 & 4 \end{pmatrix} \mod 9 $$

Este ejemplo muestra cómo calcular la inversa de una matriz \(2 \times 2\) en aritmética modular, siempre que el determinante y el módulo sean primos entre sí.

Verificación. Multiplicamos \(B\) por su inversa módulo 9 para comprobar el resultado:

$$ B \cdot B^{-1} \mod 9 = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} \cdot \begin{pmatrix} 8 & 3 \\ 7 & 4 \end{pmatrix} \mod 9 $$

Calculamos el producto:

$$ = \begin{pmatrix} 2 \cdot 8 + 3 \cdot 7 & 2 \cdot 3 + 3 \cdot 4 \\ 1 \cdot 8 + 4 \cdot 7 & 1 \cdot 3 + 4 \cdot 4 \end{pmatrix} \mod 9 $$

$$ = \begin{pmatrix} 37 & 18 \\ 36 & 19 \end{pmatrix} \mod 9 $$

Reducción módulo 9:

$$ 37 \equiv 1, \quad 18 \equiv 0, \quad 36 \equiv 0, \quad 19 \equiv 1 \mod 9 $$

Resultado final:

$$ B \cdot B^{-1} \mod 9 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} $$

Se verifica así que la matriz obtenida es efectivamente la identidad módulo 9.

 

 


 

Please feel free to point out any errors or typos, or share suggestions to improve these notes.

FacebookTwitterLinkedinLinkedin

Matrices (álgebra lineal)