I am generating an n x n matrix where n is specified by DIM:
DIM = 10;
T = Table[Join[Table[0, {j, 1, i - 1}], {1, -2, 1},Table[0, {j, i + 3,DIM}]], {i, 1, DIM - 2}];
T = Join[{Table[If[i == 1, 1, 0], {i, 1, DIM}]},T, {Table[If[i == DIM, 1, 0], {i, 1, DIM}]}];
T // MatrixForm
The resulting matrix is square, and block diagonal. I then need to take the inverse of this matrix:
Tinv = Inverse[T];
Tinv // MatrixForm
This works fine as expected. However, I need to increase the dimensions of the matrix to be 2880 x 2880. When I go to invert this new matrix, my computer locks up. Is there an algorithm or efficient method for computing the inverse of such a simple matrix?
SparseArray[T]
$\endgroup$