Project

General

Profile

Feature #623

Inverse of a matrix over ZZ

Added by Anna Maria Bigatti over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
New Function
Start date:
12 Sep 2014
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:

Description

Inverse of a matrix over QQ works fine.
Fix code so that it works for invertible matrices over ZZ.
(I have a big example failing, I'll post here when I find a smaller one)

History

#1 Updated by John Abbott almost 9 years ago

Here is an invertible 3x3 matrix

matrix(ZZ,
 [[-8, -3, -6],
  [-2, -7, -3],
  [-3, 4, -1]])

Here is an invertible 4x4 matrix

matrix(ZZ,
 [[-2, -3, 9, 1],
  [9, 4, -7, -2],
  [-2, 2, 9, 4],
  [-2, 4, 0, 3]])

Here is an invertible 5x5 matrix

matrix(ZZ,
 [[-4, -3, -4, 3, 0],
  [5, 2, -5, -2, -1],
  [0, 0, 1, 0, 0],
  [5, -1, -5, 2, -3],
  [-1, 3, -2, -3, 2]])

Here is an invertible 6x6 matrix

matrix(ZZ,
 [[-2, 5, -3, -4, 3, 2],
  [0, 4, 1, -4, -1, -1],
  [5, 2, 5, 1, -1, -2],
  [-2, 3, -3, -1, -5, -4],
  [1, 1, 2, -2, -1, 2],
  [0, 0, -3, 3, 2, 2]])

#2 Updated by Anna Maria Bigatti almost 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Estimated time set to 3.00 h

Done.
If the matrix is over an IntegralDomain then it is mapped into FractionField.
Then the inverse is mapped back (if possible).
This might be uselessly slow if the matrix is NOT invertible, but then the user should have never asked ;-)

[the error mentioned before was just a silly error in a column for-counter]

Also available in: Atom PDF