Beruflich Dokumente
Kultur Dokumente
Using C++
Ms.Akhila Shaji
Assistant Professor
SSM College,Rajakkad
Applications of arrays
• Example:
00304
00570
00000
02600
• There are various situations in which sparse matrix is used
with different names. A few such situations are
1. The diagonal matrix is a matrix in which all non-zero
elements lie on the diagonal and rest of the elements are
having zero values.
Eg: 1 0 0
0 5 0
0 0 9
2. Upper triangular matrix is a matrix in which all the
elements on or above the diagonal have non-zero values and
rest of the elements have zero values.
Eg: 1 2 3
0 7 5
0 0 6
3. Lower triangular matrix is a matrix in which all the non-
zero elements occur on or below the diagonal.
Eg: 1 0 0
4 5 0
6 3 7
(Sparse matrix contd.)