Skip to main content

Sparse, banded matrix and memory optimization

Short answer

A sparse matrix has most entries zero. A banded matrix has nonzeros concentrated near the main diagonal. Memory optimization reduces storage by exploiting symmetry, storing band/skyline, storing only nonzeros with index arrays, and renumbering nodes to minimize bandwidth; banded elimination needs about n b^2 operations instead of n^3.

What do you mean by sparse matrix, banded matrix and memory optimization?

Sparse matrix: a matrix in which most entries are zero. Stiffness matrices of FEM are sparse because a node is connected only to the nodes of neighbouring elements.

Banded matrix: a matrix whose non-zero entries lie in a narrow band about the main diagonal, i.e. aij=0a_{ij}=0 for ∣i−j∣>b|i-j|>b. The half-bandwidth is

b=(max difference of node numbers in an element+1)×dof per nodeb=(\text{max difference of node numbers in an element}+1)\times \text{dof per node}

A symmetric matrix of order nn and half-bandwidth bb is stored with only n×bn\times b numbers instead of n2n^2.

 x x . . .
 x x x . .      band along the
 . x x x .      diagonal, zeros
 . . x x x      outside
 . . . x x

Memory optimisation: reducing the memory needed to store and solve [K]{U}={F}[K]\{U\}=\{F\}. Techniques are:

  • store only the upper triangle (symmetry);
  • store only the band (banded storage) or the skyline profile;
  • store only non-zero terms with index arrays (sparse storage);
  • renumber nodes to minimise bandwidth. Less memory also gives fewer operations: the cost of banded elimination is about nb2n b^2 instead of n3n^3.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computational Techniques in Civil Engineering chapter 2 questions →