Abstract
We consider generalized Green matrices that, in contrast to Green matrices, are not necessarily symmetric. In spite of the loss of symmetry, we show that they can preserve some nice properties of Green matrices. In particular, they admit a bidiagonal decomposition. Moreover, for convenient parameters, the bidiagonal decomposition can be obtained efficiently and with high relative accuracy and it can also be used to compute all eigenvalues, all singular values, the inverse, and the solution of some linear system of equations with high relative accuracy. Numerical examples illustrate the high accuracy of the performed computations using the bidiagonal decompositions. Finally, nonsingular and totally positive generalized Green matrices are characterized.
Keywords:
accurate computations; bidiagonal factorization; total positivity; Green matrix; generalized Green matrix MSC:
65D17; 65G50
1. Introduction
A desirable goal in linear algebra is the computation, with high relative accuracy, of linear algebra problems for a matrix, such as the eigenvalues, singular values, inverses, or solutions of associated linear systems (cf. [1]). Although this goal has only been achieved for a few classes of structured matrices, one of these classes is the class of Green matrices (see [2]). Green matrices are symmetric matrices that can be considered as discrete versions of Green functions and arise in important applications (see [3,4,5] and references therein). Here, we focus on generalized Green matrices that were considered in [6]. These generalized Green matrices are not necessarily symmetric. However, here, we see that some relevant nice properties satisfied by (symmetric) Green matrices are preserved by generalized Green matrices. In particular, the fact that we can perform many algebraic computations with high relative accuracy.
It is known that an algorithm can be computed to high relative accuracy (HRA) when it only uses products, quotients, additions of numbers of the same sign, or subtractions of initial data (cf. [7,8,9]). So, the only forbidden arithmetic operation is the subtraction of numbers (which are not initial data) with the same sign. Among the classes of matrices for which algorithms to HRA have been constructed, we can mention some subclasses of nonsingular totally positive matrices (see, for instance, [10,11,12,13]). Let us recall that a matrix is called totally positive (TP) if all its minors are non-negative and it is strictly totally positive (STP) if they are positive (see [14,15]). These matrices are also called totally non-negative and totally positive, respectively (cf. [16]). TP and STP matrices arise in many applications (see [15,17,18,19]). In [20,21], it was proved for a nonsingular TP matrix A that if we know its bidiagonal factorization , then we can perform many algebraic computations with HRA. For example, calculations of its eigenvalues, its singular values, its inverse and the solution of linear systems , where b has alternating signs. In this paper, we characterize generalized Green matrices that are nonsingular TP and present a method of elementary operations to obtain bidiagonal factorizations of generalized Green matrices with HRA.
The paper is organized as follows. Section 2 contains auxiliary results on bidiagonal factorizations and TP matrices. Section 3 introduces generalized Green matrices and obtains their bidiagonal decompositions. Section 4 characterizes nonsingular TP generalized Green matrices. It also presents the algorithm for the bidiagonal decomposition of generalized Green matrices and finds parameters for which many linear algebra computations can be performed with HRA. Finally, Section 5 includes numerical experiments confirming the advantages of using the HRA methods presented in the previous sections, and the last section summarizes the main conclusions of this work.
2. Auxiliary Results
Neville elimination (NE) is an elimination procedure that makes zeros in a column of a matrix by adding to each row an appropriate multiple of the previous one (cf. [22]). Given a nonsingular matrix , NE has steps and produces the next sequence of matrices:
where U is an upper triangular matrix and has zeros below the main diagonal in the first columns (). For , the matrix is derived from the matrix by using the formula
for . The pivot of the NE of A is given by
If , we call a diagonal pivot. The multiplier of the NE of A, with , is given by
The following condition is satisfied:
The multiplier of the NE of is denoted by .
The following theorem is a consequence of Theorems 4.2 and 4.3 of [23] and the arguments of pp. 116 and 120 of [23] and characterizes nonsingular TP matrices by their bidiagonal decomposition.
Theorem 1.
A nonsingular matrix is TP if and only if it admits the following decomposition:
where D is the diagonal matrix diag with positive diagonal entries and , are the non-negative bidiagonal matrices given by
for all . If, in addition, the entries and satisfy
then the decomposition is unique. Furthermore, A is STP if and only if it admits the decomposition (4) with all entries , , and positive.
Observe that in the bidiagonal decomposition given by (4) and (5) the entries and are the multipliers and diagonal pivots, respectively, corresponding to the NE of A (see Theorem 4.2 of [23] and the comment below it), and the entries are the multipliers of the NE of (see p. 116 of [23]). In [21], the matrix notation was used to represent the bidiagonal decomposition of a nonsingular TP matrix:
From now on, will also be used to denote the bidiagonal decomposition of matrices that are not necessarily TP.
We can derive from Theorem 1 the following corollary characterizing nonsingular TP matrices and STP matrices by the entries of their bidiagonal decomposition.
Corollary 1.
Let A be a square matrix with a given corresponding to (4). Then:
- i.
- A is nonsingular TP if and only if all diagonal entries of are positive and all off-diagonal entries of are non-negative.
- ii.
- A is STP if and only if all entries of are positive.
3. Bidiagonal Factorization
We first recall the definition of Green matrices.
Definition 1.
Given two sequences of nonzero real numbers , , a Green matrix is the symmetric matrix given by if (or, equivalently, for all ).
The following definition generalizes Green matrices to the nonsymmetric case.
Definition 2.
Given four sequences of nonzero real numbers , , , and satisfying that for , a generalized Green matrix is the matrix defined by
Observe that, if in the previous definition and for all , then we have a usual Green matrix, which is symmetric, so that our definition of the generalized Green matrix includes some symmetric matrices.
In the next result, we present the bidiagonal factorization of any generalized Green matrix.
Theorem 2.
If A is a generalized Green matrix with parameters , , , and , its bidiagonal decomposition is given by
Proof.
Let us obtain the bidiagonal decomposition of A by applying the Neville elimination procedure to A and . So, first with multiplier , a zero at entry of A is produced (the last but one row multiplied by is subtracted from the last one). This elementary operation also produces zeros in the remaining off-diagonal entries of the last row. Taking into account that , the entry of the last row transforms into
Analogously (by symmetry), if we now multiply the columns by to make the entry a zero, we obtain a matrix B with zeros in the last column up to place , where remains.
Let us denote by () the elementary matrix that has unit diagonal, in place , and 0 elsewhere. Then, the matrix form of the previous step can be written as .
Continuing this procedure to make zeros in entries , we obtain the factorization
where D is the diagonal matrix with bidiagonal entries
Taking into account that , we obtain the following bidiagonal factorization of A:
□
4. Total Positivity and High Relative Accuracy
The following result characterizes the generalized Green matrices with parameters of the same sign that are nonsingular TP.
Theorem 3.
Let A be a generalized Green matrix with parameters , , , and with the same sign. Then, A is nonsingular TP if and only if
Proof.
Since A is a generalized Green matrix, all parameters are nonzero and, by hypothesis, and for all , and
So, by Theorem 2, all off-diagonal entries of are non-negative and the first diagonal entry of is positive.
By Corollary 1 i, it remains to prove that the remaining diagonal entries of are positive if and only if (11) holds. By (12) and Theorem 2, it is sufficient to check if
if and only if (11) holds.
In contrast to the previous characterization of nonsingular TP generalized Green matrices, there are no STP generalized Green matrices, as the following remark shows.
Remark 1.
By Theorem 2, a generalized Green matrix with has some null off-diagonal entries. Then, by Corollary 1 ii, it cannot be STP.
For some subclasses of nonsingular TP matrices it has been possible to obtain algorithms for linear algebra problems with high relative accuracy (HRA). The starting point was the construction with HRA of the bidiagonal decomposition of the matrix, which was used in the algorithms presented in [21,24,25] for linear algebra problems. Here, we focus on sufficient conditions for the bidiagonal decomposition with HRA for generalized Green matrices. An algorithm is said to be performed to HRA if the relative error in the computations is of the order of the unit round-off (or machine precision). A sufficient condition so that an algorithm can be carried out to HRA is the non-inaccurate cancellation condition, also called NIC condition, which holds if the algorithm only uses products, quotients, and sums of numbers with the same sign (see page 52 in [7]). Moreover, if the floating-point arithmetic is well implemented, the subtraction of initial data can also be allowed without losing HRA (see page 53 in [7]).
The following result provides sufficient conditions to ensure HRA calculations for algebra problems related to generalized Green matrices.
Proposition 1.
Let us consider a generalized Green matrix A with parameters of the sequences , , , and formed by numbers of the same sign.
- i.
- If or for all , then the bidiagonal decomposition of A, can be computed to HRA.
- ii.
- If for all , then A is a nonsingular TP matrix, and its eigenvalues, its singular values, its inverse , and the solution of linear systems , where b has a pattern of alternating signs, can also be computed to HRA.
Proof.
- i.
- Since , it is necessary to carry out the subtraction to HRA. So, in order to obtain this, using the formulawith and , we obtainwhich, for , is a sum of non-negative numbers if the sequences defining the matrices are positive or a sum of non-negative numbers if the sequences are negative, and, for , is a sum of nonpositive numbers if the sequences are positive or a sum of non-negative numbers if the sequences are negative.
- ii.
- By i of the proposition, can be computed to HRA. If for all , then for all because they are positive quotients due to the fact that all parameters have the same sign. The last inequalities are equivalent to (11) and so A is a nonsingular TP matrix by Theorem 3. Then, the methods of [21,25] can be used to solve the four algebraic computations mentioned with HRA.
□
The bidiagonal decomposition of a generalized Green matrix deduced in the proof of Theorem 1 was implemented in the function TNBDGeneralizedGreen to be used in Matlab and Octave. In Algorithm 1, we can see the pseudocode of this function.
| Algorithm 1 Computation of for a generalized Green matrix A |
| Require: , , and such that |
| Ensure: B bidiagonal decomposition of A |
| for i = 2:n do |
| end for |
| for do |
| end for |
| for do |
| end for |
Remark 2.
Algorithm 1 has a computational cost of elementary operations in order to compute the bidiagonal decomposition of a generalized Green matrix of order n.
5. Numerical Experiments
Assuming the bidiagonal decomposition of a nonsingular TP matrix A is known to HRA, in [20,21,25] algorithms to solve some algebra problems related to A also to HRA were presented:
- Computation of the eigenvalues of A.
- Computation of the singular values of A.
- Computation of the inverse of A, .
- Solution of a system of linear equations where b has an alternating sign pattern.
These algorithms have been implemented to be used in Matlab and Octave and they are included in the software library TNTool (see [24]). The names of the functions corresponding to the algorithms for the four algebra problems mentioned above are TNEigenValues, TNSingularValues, TNInverseExpand, and TNSolve, respectively. These functions need as input to HRA and, in addition, the latter also needs the vector b of the linear system of equations.
Remark 3.
Taking into account the computational costs of the algorithms given in [21,25] for the four algebra problems mentioned and the computational cost for the computation of the bidiagonal decomposition of a generalized Green matrix given in Remark 2, it can be deduced that, using the bidiagonal factorization of a nonsingular generalized Green matrix, the computational costs to solve each of the four algebra problems mentioned before are the following:
- elementary operations for the computation of the eigenvalues and singular values using TNEigenValues and TNSingularValues, respectively,
- elementary operations for the computation of the inverse and the solution of the system of linear equations using TNInverseExpand and TNSolve, respectively.
Now, we illustrate the high relative accuracy of the bidiagonal decomposition of a generalized Green matrix computed to HRA with the function TNBDGeneralizedGreen used together with the four functions of TNTool mentioned before for solving the four algebra problems mentioned.
First, we consider a generalized Green matrix of order , with parameters of the sequences , , , and given by
for . By Proposition 1, the matrix is nonsingular TP, can be obtained to HRA, and the four algebra problems can also be solved to HRA.
First, the eigenvalues and singular values of were computed with Mathematica by using 200-digit precision. Then, the eigenvalues were computed with Matlab in two different ways. First, using the usual Matlab command eig. Second, using the function TNEigenValues with TNBDGeneralizedGreen to HRA. Then, the relative errors of the approximations obtained with Matlab were calculated considering the results provided by Mathematica to be exact. Table 1 shows these relative errors.
Table 1.
Relative errors when computing the eigenvalues of .
Then, the singular values were also computed with Matlab in two different ways. First, using the usual Matlab command svd. Second, using the function TNSingularValues with TNBDGeneralizedGreen to HRA. Then, the relative errors of the approximations obtained with Matlab were calculated, considering the results provided by Mathematica to be exact. Table 2 shows these relative errors.
Table 2.
Relative errors when computing the singular values of .
As we can observe in Table 1 and Table 2, the lower the eigenvalue or singular value is, the greater the corresponding relative error is for the usual Matlab methods eig and svd. Taking this into account, the generalized nonsymmetric matrices of order , with parameters given by (16) for , are considered. By Proposition 1, the matrices are nonsingular and TP, can be obtained to HRA and, with this bidiagonal decomposition, the four algebra problems can also be solved to HRA by using TNTool (see [24]). The condition numbers of these matrices can be seen in Figure 1. As we can observe the generalized matrices of higher degree are ill-conditioned.
Figure 1.
Condition numbers for .
In order to show the accuracy of the HRA methods, the lowest eigenvalues and singular values of the matrices , , were computed with Mathematica by using 200-digit precision. Then, these eigenvalues were computed with Matlab in two different ways. First, by using the usual Matlab command eig. Second, using the function TNEigenValues with to HRA. Then, the relative errors of the approximations obtained with Matlab were calculated considering the results provided by Mathematica to be exact. Figure 2 shows the relative error for the lowest eigenvalue of each matrix .
Figure 2.
Relative errors when computing the lowest eigenvalue of for .
In an analogous way to the eigenvalues, approximations to the lowest singular values of the matrices , were obtained with Matlab in two ways. First, using the usual Matlab command svd. Second, using the usual function TNSingularValues with to HRA. Then, the relative errors of the approximations obtained with Matlab were calculated considering the results provided by Mathematica to be exact. Figure 3 shows the relative error for the lowest singular value of each matrix .
Figure 3.
Relative errors when computing the lowest singular value of for .
As can be observed in the previous numerical tests, the HRA methods are much better than the usual methods for generalized Green matrices. Finally, let us show that the HRA methods also provide very accurate results for generalized Green matrices of orders greater than 50. In this regard, let us consider a generalized Green matrix A of order 100 with parameters of the sequences , , , and given by
By Proposition 1, the matrix A is nonsingular and TP, can be obtained to HRA, and the four algebra problems can also be solved to HRA. The condition number of matrix A is given by , so it is an ill-conditioned matrix.
As in the previous examples, the eigenvalues of A were calculated with Mathematica using 200-digit precision, and with Matlab both using TNEigenvalues and using the usual method eig. Then, the relative errors were computed for both approximations obtained with Matlab considering the eigenvalues provided by Mathematica to be exact. Figure 4 shows these relative errors.
Figure 4.
Relative errors when computing all the eigenvalues of A.
The analogous process was carried out for the singular values of A using TNSingularValues and svd in Matlab. In Figure 5, the relative errors for the singular values are shown.
Figure 5.
Relative errors when computing all the singular values of A.
The Matlab code used to carry out the numerical tests is available upon request.
6. Conclusions
In this paper, we have seen that some nice properties of Green matrices can be extended to the generalized Green matrices, which are not necessarily symmetric. We find parameter values for which the bidiagonal decomposition of generalized Green matrices can be obtained efficiently and with high relative accuracy. We characterize the parameter values of generalized Green matrices that are nonsingular and totally positive. We prove that many linear algebra computations for generalized Green matrices can be performed efficiently and with high relative accuracy. Numerical experiments confirm this fact.
Author Contributions
The authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.
Funding
This research was partially supported by MCIU/AEI through the Spanish research grants PID2022-138569NB-I00, RED2022-134176-T (MCI/AEI) and PID2020-112773GB-I00 (MCI/AEI), by Gobierno de Aragón (E41_23R and S39_23R), and by Fundación Ibercaja/Universidad de Zaragoza (JIUZ2022-CSJ-19).
Data Availability Statement
Data sharing not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Higham, N.J. Accuracy and Stability of Numerical Algorithms, 2nd ed.; SIAM: Philadelphia, PA, USA, 2002. [Google Scholar]
- Delgado, J.; Peña, G.; Peña, J.M. Accurate and fast computations with Green matrices. Appl. Math. Lett. 2023, 145, 108778. [Google Scholar] [CrossRef]
- Ramsay, J.O.; Ramsey, J.B. Functional data analysis of the dynamics of the monthly index of nondurable goods production. J. Econom. 2002, 107, 327–344. [Google Scholar] [CrossRef]
- Schoenmakers, J.; Coffey, B. Systematic Generation of Parametric Correlation Structures for the LIBOR Market Model. Int. J. Theor. Appl. Financ. 2003, 6, 507–519. [Google Scholar] [CrossRef]
- Delgado, J.; Peña, G.; Peña, J.M. Green Matrices, Minors and Hadamard Products. Axioms 2023, 12, 774. [Google Scholar] [CrossRef]
- Dow, M. Explicit inverses of Toeplitz and associated matrices. ANZIAM J. 2003, 44, E185–E215. [Google Scholar] [CrossRef]
- Demmel, J.; Gu, M.; Eisenstat, S.; Slapnicar, I.; Veselic, K.; Drmac, Z. Computing the singular value decomposition with high relative accuracy. Linear Algebra Appl. 1999, 299, 21–80. [Google Scholar] [CrossRef]
- Demmel, J.; Dumitriu, I.; Holtz, O.; Koev, P. Accurate and efficient expression evaluation and linear algebra. Acta Numer. 2008, 17, 87–145. [Google Scholar] [CrossRef]
- Demmel, J.; Koev, P. The accurate and efficient solution of a totally positive generalized Vandermonde linear system. SIAM J. Matrix Anal. Appl. 2005, 27, 42–52. [Google Scholar] [CrossRef]
- Marco, A.; Martínez, J.J. A fast and accurate algorithm for solving Bernstein-Vandermonde linear systems. Linear Algebra Appl. 2007, 422, 616–628. [Google Scholar] [CrossRef]
- Marco, A.; Martínez, J.J.; Viaña, R. Accurate bidiagonal decomposition of totally positive h-Bernstein-Vandermonde matrices and applications. Linear Algebra Its Appl. 2019, 579, 320–335. [Google Scholar] [CrossRef]
- Delgado, J.; Peña, G.; Peña, J.M. Accurate and fast computations with positive extended Schoenmakers-Coffey matrices. Numer. Linear Algebra Appl. 2016, 23, 1023–1031. [Google Scholar] [CrossRef]
- Marco, A.; Martínez, J.J. Accurate computations with totally positive Bernstein- Vandermonde matrices. Electron. J. Linear Algebra 2013, 26, 357–380. [Google Scholar] [CrossRef]
- Ando, T. Totally positive matrices. Linear Algebra Appl. 1987, 90, 165–219. [Google Scholar] [CrossRef]
- Pinkus, A. Totally Positive Matrices, Cambridge Tracts in Mathematics 181; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
- Fallat, S.M.; Johnson, C.R. Totally Nonnegative Matrices; Princeton Series in Applied Mathematics; Princeton University Press: Princeton, NJ, USA, 2011. [Google Scholar]
- Gantmacher, F.P.; Krein, M.G. Oscillation Matrices and Kernels and Small Vibrations of Mechanical Systems, Revised ed.; AMS Chelsea Publishing: Providence, RI, USA, 2002. [Google Scholar]
- Gasca, M.; Micchelli, C.A. Total Positivity and Its Applications; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1996. [Google Scholar]
- Karlin, S. Total Positivity; Stanford University Press: Stanford, CA, USA, 1968; Volume 1. [Google Scholar]
- Koev, P. Accurate eigenvalues and SVDs of totally nonnegative matrices. SIAM J. Matrix Anal. Appl. 2005, 27, 1–23. [Google Scholar] [CrossRef]
- Koev, P. Accurate computations with totally nonnegative matrices. SIAM J. Matrix Anal. Appl. 2007, 29, 731–751. [Google Scholar] [CrossRef]
- Gasca, M.; Peña, J.M. Total positivity and Neville elimination. Linear Algebra Appl. 1992, 165, 25–44. [Google Scholar] [CrossRef]
- Gasca, M.; Peña, J.M. On Factorizations of Totally Positive Matrices. In Total Positivity and Its Applications; Gasca, M., Micchelli, C.A., Eds.; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1996; pp. 109–130. [Google Scholar]
- Koev, P. TNTool. Available online: https://math.mit.edu/~plamen/software/TNTool.html (accessed on 10 March 2023).
- Marco, A.; Martínez, J.J. Accurate computation of the Moore–Penrose inverse of strictly totally positive matrices. J. Comput. Appl. Math. 2019, 350, 299–308. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).