The size of largest matrix that can be inverted

Hi all,
What is the size of the largest square matrix that can be inverted in MATLAB.
Thanks in advance. V

Answers (2)

With a 64 bit machine and a lot of RAM, it can be pretty big. Fortunately, you almost never have to take it. Please read Loren's Blog and the comments associated with ti:
And of course the doc for inv which also discourages this: doc inv
The answer to this question is platform and MATLAB version dependent. I think this is going to largely depend on the largest array you can store. You can get some guidance on maximum array size here: http://www.mathworks.com/support/tech-notes/1100/1110.html
I have 64-bit MATLAB 2011b running on a Mac, with 8 GB of RAM, and it inverted a 10,000x10,000 in about 2 minutes.
You should ask yourself whether you really need to do the matrix inversion or not. Very frequently, you can avoid taking the inverse, in favor of some less-intensive computation.

3 Comments

May I ask how much RAM your computer got? Mine has 4GB and that seems not to be nearly enough to even store a 6.000-by-6.000 (full, nonsparse) matrix.
Edited my answer to address Ingo's comment.

Sign in to comment.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 3 Jan 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!