Recognizing the special character of symmetric matrices can save time and storage during the solution of linear systems. More specifically, a dense matrix requires storage for n2 elements. A symmetric matrix can be stored in about half the space, elements. Only the upper (or lower) triangular portion of A has to be explicitly stored. The implicit portions of A can be retrieved using Equation 57. An efficient data structure for storing dense, symmetric matrices is a simple linear array. If the upper triangular portion of A is retained, the array is organized in the following manner.
The element a is retrieved from the linear array by the following indexing rule.
If array and matrix indexing is zero based (as in the C programming language), the subscripting rule becomes
If the lower triangular portion of A is retained, the linear array is organized as follows.
The element aij is retrieved from the linear array by the following indexing rule.
If array and matrix subscripts are zero based, Equation 70 becomes
You will observe that the dimension of A does not enter the indexing calculation when its lower triangular portion is retained. The indexing equations are implemented most efficiently by replacing division by two with a right shift.