Sparse matrix: Difference between revisions

Content deleted Content added
Special cases: added indefinite article
Banded: Description of banded matrix in plain language
 
Line 25:
===Banded===
{{main article|Band matrix}}
AnA important[[band matrix]] is a special typeclass of sparse matricesmatrix where the non-zero elements are concentrated near the main diagonal. A band matrix is acharacterised by its lower and upper bandwidths, which refer to the number of diagonals below and above (respectively) the [[bandmain matrixdiagonal]], definedbetween aswhich followsall of the non-zero entries are contained.

Formally, Thethe [[lower bandwidth of a matrix]] {{math|'''A'''}} is the smallest number {{math|''p''}} such that the entry {{math|''a''<sub>''i'',''j''</sub>}} vanishes whenever {{math|''i'' > ''j'' + ''p''}}. Similarly, the [[Band matrix#upper bandwidth|upper bandwidth]] is the smallest number {{math|''p''}} such that {{math|1=''a''<sub>''i'',''j''</sub> = 0}} whenever {{math|''i'' < ''j'' − ''p''}} {{harv|Golub|Van Loan|1996|loc=§1.2.1}}. For example, a [[tridiagonal matrix]] has lower bandwidth {{math|1}} and upper bandwidth {{math|1}}. As another example, the following sparse matrix has lower and upper bandwidth both equal to 3. Notice that zeros are represented with dots for clarity.
<math display="block">\begin{bmatrix}
X & X & X & \cdot & \cdot & \cdot & \cdot & \\
Line 41 ⟶ 43:
 
====Diagonal====
A verydiagonal efficientmatrix structureis for anthe extreme case of banda matricesbanded matrix, thewith zero upper and lower bandwidth. A ''[[diagonal matrix]]'', iscan be stored efficiently toby storestoring just the entries in the [[main diagonal]] as a [[one-dimensional array]], so a diagonal {{math|''n'' × ''n''}} matrix requires only {{math|''n''}} entries in memory.
 
===Symmetric===