Definimos la matriz del ejercicio:

(%i1) A : matrix([ %i, 1, - 1, - %i],[ 0, %i, 1, 1],[ 0, 0, %i, - 1],[ 0, 0, 0, %i]) ;
(A) ( %i 1 1 %i 0 %i 1 1 0 0 %i 1 0 0 0 %i )

Creamos la matriz ampliada con la idententidad de orden 4:

(%i2) X : addcol( A, ident( 4)) ;
(X) ( %i 1 1 %i 1 0 0 0 0 %i 1 1 0 1 0 0 0 0 %i 1 0 0 1 0 0 0 0 %i 0 0 0 1 )

Multiplicamos la primera fila por -%i. Recordemos que esta operación requiere una formulación especial que hemos visto en otro ejercicio.

(%i3) X : rowop( X, 1, 1, 1 - 1 / %i) ;
0 errores, 0 advertencias (X) ( %i %i ( %i + 1 ) %i %i %i ( %i + 1 ) %i %i 0 0 0 0 %i 1 1 0 1 0 0 0 0 %i 1 0 0 1 0 0 0 0 %i 0 0 0 1 )

En algunos casos es clarificador simplificar la expresiones que nos proporciona maxima, esto se puede hacer con comandos como expand()

(%i4) X : expand( X) ;
(X) ( 1 %i %i 1 %i 0 0 0 0 %i 1 1 0 1 0 0 0 0 %i 1 0 0 1 0 0 0 0 %i 0 0 0 1 )

Repitamos la misma operación a cada una de las restantes filas:

(%i7) X : expand( rowop( X, 2, 2, 1 - 1 / %i)) $
X : expand( rowop( X, 3, 3, 1 - 1 / %i)) $
X : expand( rowop( X, 4, 4, 1 - 1 / %i)) ;
(X) ( 1 %i %i 1 %i 0 0 0 0 1 %i %i 0 %i 0 0 0 0 1 %i 0 0 %i 0 0 0 0 1 0 0 0 %i )

Ahora consigamos que los elementos de la filas 1, 2 y 3 de la cuarta columna sean ceros restandoles la cuarta fila:

(%i10) X : expand( rowop( X, 3, 4, %i)) $
X : expand( rowop( X, 2, 4, - %i)) $
X : expand( rowop( X, 1, 4, - 1)) ;
(X) ( 1 %i %i 0 %i 0 0 %i 0 1 %i 0 0 %i 0 1 0 0 1 0 0 0 %i 1 0 0 0 1 0 0 0 %i )

Repitamos el proceso con los elementos de la tercera columna:

(%i12) X : expand( rowop( X, 2, 3, - %i)) $
X : expand( rowop( X, 1, 3, %i)) ;
(X) ( 1 %i 0 0 %i 0 1 0 0 1 0 0 0 %i 1 1 %i 0 0 1 0 0 0 %i 1 0 0 0 1 0 0 0 %i )

Solo nos queda el elemento {1,2}

(%i13) X : expand( rowop( X, 1, 2, - %i)) ;
(X) ( 1 0 0 0 %i 1 %i 1 %i + 1 0 1 0 0 0 %i 1 1 %i 0 0 1 0 0 0 %i 1 0 0 0 1 0 0 0 %i )

Ya tenemos la inversa, la submatriz de la cuatro últimas columnas. Para concluir el ejercicio utilizaremos la función sum():

(%i14) sum( X[ i, 8], i, 1, 4) ;
(%o14) 1 %i


Created with wxMaxima.