---
title: "Banded matrix and skyline storage"
subject: "Computational Techniques in Civil Engineering"
chapter: 2
key: "semester_8/computational_techniques_in_civil_engineering:banded-skyline-storage"
source: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/banded-skyline-storage
site: BCT Engineering
---

# Banded matrix and skyline storage

Computational Techniques in Civil Engineering · Chapter 2: Solutions of linear equations

- Asked in: 2077 Chaitra, 3 marks
- Video: [Bandwidth of Stiffness matrix | Effect of node numbering on Bandwidth | feaClass](https://www.youtube.com/watch?v=jk2LILvTzsI) — Msquare Analysis Projects
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/banded-skyline-storage
- Whole chapter: https://www.bctengineer.com/md/semester_8/computational_techniques_in_civil_engineering/chapter-2

## Question

Explain with relevant examples how banded matrix and skyline storage scheme optimize the memory.

## Short answer

Banded storage stores only the diagonal and upper b−1 terms per row using symmetry, reducing memory to n×b. Example: 100-node bar with b=2 needs only 200 numbers instead of 10000. Skyline storage stores each column from first nonzero to diagonal, saving more memory when bandwidth varies; renumbering minimizes profile.

## Answer

In FEM the stiffness matrix $[K]$ is symmetric, sparse and has non-zero terms only near the diagonal. Storing the full $n\times n$ matrix wastes memory.

#### Banded storage
Only the band is stored: the diagonal and the $b-1$ upper terms of each row (using symmetry). Half-bandwidth $b=(\text{max node difference in an element}+1)\times$ dof per node.

Example: a bar of 100 nodes (1 dof), elements connect nodes $i$ and $i+1$, so $b=2$. Full storage $=100^2=10000$ numbers; banded storage $=100\times2=200$ numbers.

```text
 Full 5x5 (symmetric)        Banded (b=2)
 a11 a12  0   0   0          a11 a12
 a12 a22 a23  0   0          a22 a23
  0  a23 a33 a34  0   ->     a33 a34
  0   0  a34 a44 a45         a44 a45
  0   0   0  a45 a55         a55  *
```

#### Skyline (variable band / profile) storage
Each column is stored from the first non-zero entry down to the diagonal, so the band height varies with column. A pointer array stores the diagonal positions.

Example: column heights 1, 2, 2, 3, 1 give 9 stored terms against 15 for the full upper triangle of a $5\times5$ matrix.

Skyline storage stores fewer terms than a constant band when a few nodes have a large connectivity. Fill-in during elimination remains inside the skyline, so the factorisation also needs no extra storage. Node renumbering (e.g. reverse Cuthill-McKee) reduces the bandwidth and so the memory and operation count.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How does skyline storage store each column?
   A. Only the diagonal
   B. The full column
   C. Only non-zeros with index arrays
   D. From the first non-zero entry down to the diagonal
   Answer: D. Column heights vary, and a pointer array locates the diagonals. (Key point: Skyline)

2. Bar of 100 nodes, 1 dof, b = 2: banded storage?
   A. 100
   B. 10000
   C. 200 numbers
   D. 400
   Answer: C. n x b = 100 x 2. (Key point: Banded example)

3. Why is no extra storage needed for fill-in in skyline?
   A. No fill-in occurs
   B. Fill-in during elimination stays inside the skyline
   C. Elimination is not used
   D. Fill-in is discarded
   Answer: B. The profile contains all fill-in. (Key point: Fill-in)

## Related in Computational Techniques in Civil Engineering

- [Sparse, banded matrix and memory optimization](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Asparse-banded-memory) — Computational Techniques in Civil Engineering, chapter 2

## Related in other subjects

- [File system vs virtual memory; contiguous allocation](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Afs-vs-virtual-memory-contiguous-tape) — Operating System, chapter 5
