MatrixInverse - Maple Help

RegularChains[MatrixTools]

 MatrixInverse
 compute the inverse of a matrix modulo a regular chain

 Calling Sequence MatrixInverse(A, rc, R)

Parameters

 A - square Matrix with coefficients in the ring of fractions of R rc - regular chain of R R - polynomial ring

Description

 • The command MatrixInverse(A, rc, R) returns two lists.
 • The first list the command returns is a list of pairs $\left[{B}_{i},{\mathrm{rc}}_{i}\right]$ where ${\mathrm{rc}}_{i}$ is a regular chain and ${B}_{i}$ is the inverse of A modulo the saturated ideal of ${\mathrm{rc}}_{i}$.
 • The second list the command returns is a list of triplets $\left[\mathrm{noInv},A,{\mathrm{rc}}_{i}\right]$ where ${\mathrm{rc}}_{i}$ is a regular chain and A is the input matrix such that A is not invertible modulo the saturated ideal of ${\mathrm{rc}}_{i}$.
 • All the returned regular chains ${\mathrm{rc}}_{i}$ form a triangular decomposition of rc (in the sense of Kalkbrener).
 • It is assumed that rc is strongly normalized.
 • The algorithm is an adaptation of the algorithm of Bareiss.
 • This command is part of the RegularChains[MatrixTools] package, so it can be used in the form MatrixInverse(..) only after executing the command with(RegularChains[MatrixTools]).  However, it can always be accessed through the long form of the command by using RegularChains[MatrixTools][MatrixInverse](..).

Examples

Automatic case discussion.

 > $\mathrm{with}\left(\mathrm{RegularChains}\right):$$\mathrm{with}\left(\mathrm{ChainTools}\right):$$\mathrm{with}\left(\mathrm{MatrixTools}\right):$
 > $R≔\mathrm{PolynomialRing}\left(\left[y,z\right]\right);$$\mathrm{rc}≔\mathrm{Empty}\left(R\right)$
 ${R}{≔}{\mathrm{polynomial_ring}}$
 ${\mathrm{rc}}{≔}{\mathrm{regular_chain}}$ (1)

Assume we have two variables y and z that have the same square and z is a 4th root of -1. Suppose we need to compute modulo this relation.

 > $\mathrm{rc}≔\mathrm{Chain}\left(\left[{z}^{4}+1,{y}^{2}-{z}^{2}\right],\mathrm{rc},R\right):$$\mathrm{Equations}\left(\mathrm{rc},R\right)$
 $\left[{{y}}^{{2}}{-}{{z}}^{{2}}{,}{{z}}^{{4}}{+}{1}\right]$ (2)
 > $m≔\mathrm{Matrix}\left(\left[\left[1,y+z\right],\left[0,y-z\right]\right]\right)$
 ${m}{≔}\left[\begin{array}{cc}{1}& {y}{+}{z}\\ {0}& {y}{-}{z}\end{array}\right]$ (3)

We want to compute the inverse of the previous matrix.

 > $\mathrm{mim}≔\mathrm{MatrixInverse}\left(m,\mathrm{rc},R\right)$
 ${\mathrm{mim}}{≔}\left[\left[\left[\left[\begin{array}{cc}{1}& {0}\\ {0}& \frac{{{z}}^{{3}}}{{2}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]\right]{,}\left[\left[{"noInv"}{,}\left[\begin{array}{cc}{1}& {y}{+}{z}\\ {0}& {y}{-}{z}\end{array}\right]{,}{\mathrm{regular_chain}}\right]\right]\right]$ (4)

Let us check the first result.

 > $\mathrm{m1}≔\mathrm{mim}\left[1\right]\left[1\right]\left[1\right];$$\mathrm{rc1}≔\mathrm{mim}\left[1\right]\left[1\right]\left[2\right];$$\mathrm{Equations}\left(\mathrm{rc1},R\right)$
 ${\mathrm{m1}}{≔}\left[\begin{array}{cc}{1}& {0}\\ {0}& \frac{{{z}}^{{3}}}{{2}}\end{array}\right]$
 ${\mathrm{rc1}}{≔}{\mathrm{regular_chain}}$
 $\left[{y}{+}{z}{,}{{z}}^{{4}}{+}{1}\right]$ (5)
 > $\mathrm{MatrixMultiply}\left(\mathrm{m1},m,\mathrm{rc1},R\right)$
 $\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]$ (6)

Consider now this other matrix.

 > $m≔\mathrm{Matrix}\left(\left[\left[1,y+z\right],\left[2,y-z\right]\right]\right)$
 ${m}{≔}\left[\begin{array}{cc}{1}& {y}{+}{z}\\ {2}& {y}{-}{z}\end{array}\right]$ (7)
 > $\mathrm{mim}≔\mathrm{MatrixInverse}\left(m,\mathrm{rc},R\right)$
 ${\mathrm{mim}}{≔}\left[\left[\left[\left[\begin{array}{cc}{1}& {0}\\ {-}{{z}}^{{3}}& \frac{{{z}}^{{3}}}{{2}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]{,}\left[\left[\begin{array}{cc}{0}& \frac{{1}}{{2}}\\ {-}\frac{{{z}}^{{3}}}{{2}}& \frac{{{z}}^{{3}}}{{4}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]\right]{,}\left[\right]\right]$ (8)
 > $\mathrm{m1}≔\mathrm{mim}\left[1\right]\left[1\right]\left[1\right];$$\mathrm{rc1}≔\mathrm{mim}\left[1\right]\left[1\right]\left[2\right]$
 ${\mathrm{m1}}{≔}\left[\begin{array}{cc}{1}& {0}\\ {-}{{z}}^{{3}}& \frac{{{z}}^{{3}}}{{2}}\end{array}\right]$
 ${\mathrm{rc1}}{≔}{\mathrm{regular_chain}}$ (9)
 > $\mathrm{m2}≔\mathrm{mim}\left[1\right]\left[2\right]\left[1\right];$$\mathrm{rc2}≔\mathrm{mim}\left[1\right]\left[2\right]\left[2\right]$
 ${\mathrm{m2}}{≔}\left[\begin{array}{cc}{0}& \frac{{1}}{{2}}\\ {-}\frac{{{z}}^{{3}}}{{2}}& \frac{{{z}}^{{3}}}{{4}}\end{array}\right]$
 ${\mathrm{rc2}}{≔}{\mathrm{regular_chain}}$ (10)
 > $\mathrm{MatrixMultiply}\left(\mathrm{m2},m,\mathrm{rc2},R\right)$
 $\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]$ (11)
 > $\mathrm{MatrixMultiply}\left(\mathrm{m2},m,\mathrm{rc2},R\right)$
 $\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]$ (12)

Get a generic answer that would hold both cases.

 > $\mathrm{clr}≔\mathrm{MatrixCombine}\left(\left[\mathrm{rc1},\mathrm{rc2}\right],R,\left[\mathrm{m1},\mathrm{m2}\right]\right)$
 ${\mathrm{clr}}{≔}\left[\left[\left[\begin{array}{cc}\frac{{y}{}{{z}}^{{3}}}{{2}}{+}\frac{{1}}{{2}}& {-}\frac{{y}{}{{z}}^{{3}}}{{4}}{+}\frac{{1}}{{4}}\\ \frac{{1}}{{4}}{}{y}{}{{z}}^{{2}}{-}\frac{{3}}{{4}}{}{{z}}^{{3}}& {-}\frac{{1}}{{8}}{}{y}{}{{z}}^{{2}}{+}\frac{{3}}{{8}}{}{{z}}^{{3}}\end{array}\right]{,}{\mathrm{regular_chain}}\right]\right]$ (13)

Check.

 > $\mathrm{MatrixMultiply}\left(\mathrm{clr}\left[1\right]\left[1\right],m,\mathrm{clr}\left[1\right]\left[2\right],R\right)$
 $\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]$ (14)