The packed storage matrix allows a matrix to be converted to an array, shrinking the matrix significantly. In doing so, a square n × n {\displaystyle n\times n} matrix is converted to an array of length n(n+1)/2.1
Consider the following upper matrix:
which can be packed into the one array:
Similarly the lower matrix:
can be packed into the following one dimensional array:
Both of the following storage schemes are used extensively in BLAS and LAPACK.
An example of packed storage for Hermitian matrix:
An example of packed storage for banded matrix:
Golub, Gene H.; Van Loan, Charles F. (2013). Matrix Computations (4th ed.). Baltimore, MD: Johns Hopkins University Press. p. 170. ISBN 9781421407944. 9781421407944 ↩
Blackford, Susan (1999-10-01). "Packed Storage". Netlib. LAPACK Users' Guide. Archived from the original on 2024-04-01. Retrieved 2024-10-01. https://web.archive.org/web/20240401131450/https://www.netlib.org/lapack/lug/node123.html ↩