# Sage crashes when inverting a large matrix - alternatives?

I'm trying to find the inverse of a 50x50 dense matrix of rational numbers. The matrix is created using the method `matrix_from_rows`

from another matrix that was created using `matrix(QQ,B)`

from a list of lists of rational numbers `B`

. The error I get is the following:

```
/usr/.../sage-4.7.1/local/bin/sage-sage: line 301: 27416 Killed sage-cleaner &>/dev/null
/usr/.../sage-4.7.1/local/bin/sage-sage: line 301: 27417 Killed sage-ipython "$@" -i
```

I'm doing this at the university, so the number of processors and RAM both seem to be infinite.

I wonder if there is an alternative. For example, I could try to invert the matrix in Mathematica or Maple. Is there an easy way to interface with them? Thank you!

You could interface, but it'd be nice to figure out what the problem is. Could you edit your message to include the smallest matrix you can find which crashes?

Did you install a binary package? Most likely it was compiled with optimization flags that your CPU does not support. Try to compile from source.

Thanks for the comments. I am sorry I did not come back before. (The reason was basically that I did not get notified of your comments by the system.) I do not know how the binary was compiled because I am using the version installed in the university's server. I will try to provide a concrete example, the way Simon King has suggested below.