sparse matrices
TRANSCRIPT
SPARSE MATRICESPRESENTATION BY ZAIN ZAFAR
What are SPARSE MATRICES?
One of the most important developments in scientific computing is sparse matrix technology. This technology includes the data structures to represent the matrices, the techniques for manipulating them, the algorithms used, and the efficient mapping of the data structures and algorithms to high performance. A sparse matrix is a matrix having a relatively small number of nonzero elements.
Consider the following as an example of a sparse matrix A:
┌ ┐
| 11 0 13 0 0 0 |
| 21 22 0 24 0 0 |
| 0 32 33 0 35 0 |
| 0 0 43 44 0 46 |
| 51 0 0 54 55 0 |
| 61 62 0 0 65 66 |
└ ┘
Sparse Matrices
in Data Structures
Sparse matrix is a two-dimensional array in which most of the elements have null value or zero “0”. In large number of applications sparse matrices are used. It is wastage of memory and processing time if we store null values of a matrix in array. To avoid such circumstances different techniques are used such as linked list. In simple words sparse matrices are matrices that allow special techniques to take advantage of the large number of null elements and the structure.
Symmetric classification of Sparse
Matrix:
Triangular Matrices:
Triangular matrices have the same
number of rows as they have
columns; that is, they have n rows
and n columns. In triangular matrix
both main and lower diagonals
are filled with non-zero values or
main diagonal and upper storing
diagonals are filled with non-zero
values.
Band Matrices:
An important special type of
sparse matrices is band
matrix, defined as follows. The
lower bandwidth of a matrix A is
the smallest number p such that
the entry aij vanishes whenever i > j
+ p.
Types of Triangular Matrices:
Upper triangular matrix: Lower triangular matrix:
A matrix A is a lower triangular
matrix if its nonzero elements are
found only in the lower triangle of
the matrix, including the main
diagonal;
A matrix A is an upper triangular
matrix if its nonzero elements are
found only in the upper triangle of
the matrix, including the main
diagonal;
Types of Band Matrices:
Diagonal matrix
Let A be a square matrix (with
entries in any field). If all off-
diagonal entries of A are zero,
then A is a diagonal matrix.
Tri-diagonal matrix
A tri-diagonal matrix is a matrix
that has nonzero elements only in
the main diagonal, the first
diagonal below this, and the first
diagonal above the main
diagonal.
Importance of Sparse
Matrices
Sparse matrices occur in many applications including solving partial differential equations (PDEs), text-document matrices used for latent semantic indexing (LSI), linear and nonlinear optimization, and
manipulating network and graph models.