The determinant of a square submatrix of a matrix is called a minor. A matrix is totally positive if every minor is positive. It is totally nonnegative if every minor is nonnegative. These definitions require, in particular, that all the matrix elements must be nonnegative or positive, as must .
An important property is that total nonnegativity is preserved under matrix multiplication and hence under taking positive integer powers.
Theorem 1. If are totally nonnegative then so is .
Theorem 1 is a direct consequence of the Binet–Cauchy theorem on determinants (also known as the Cauchy–Binet theorem). To state it, we need a way of specifying submatrices. We say the vector is an index vector of order if its components are integers from the set satisfying . If and are index vectors of order and , respectively, then denotes the matrix with () element .
Theorem 2. (Binet–Cauchy) Let , , and . If and are index vectors of order and then
where the sum is over all index vectors of order .
Note than when , (1) reduces to the well-known relation , while when , (1) reduces to the definition of matrix multiplication.
Totally nonnegative matrices have many interesting determinantal properties. For example, they satisfy Fischer’s inequality, first proved for symmetric positive definite matrices.
Theorem 3. (Fischer) If is totally nonnegative then for any index vector ,
where comprises the indices not in .
By repeatedly applying (2) with containing just one element, we obtain Hadamard’s inequality for totally nonnegative :
Examples
We give some examples of totally positive matrices, showing how they can be generated in MATLAB. We use the Anymatrix toolbox.
A matrix well known to be positive definite, but which is also totally positive, is the Hilbert matrix , with . The Hilbert matrix is a particular case of a Cauchy matrix , with for given vectors . A Cauchy matrix is totally positive if and , which follows from the formula
In MATLAB, the Hilbert matrix is hilb(n)
and the Cauchy matrix can be generated by gallery('cauchy',x,y)
(or anymatrix('gallery/cauchy',x,y)
).
is totally positive if the points satisfy . As a partial check, the general formula
shows that every leading principal minor is positive. In MATLAB, a Vandermonde matrix can be generated by anymatrix('core/vand',x)
.
The Pascal matrix is defined by
For example, in MATLAB:
>> P = pascal(5) P = 1 1 1 1 1 1 2 3 4 5 1 3 6 10 15 1 4 10 20 35 1 5 15 35 70
The Pascal matrix is totally positive for all (see the section below on bidiagonal factorizations).
The one-parameter correlation matrix with off-diagonal elements given by with , illustrated by
is not totally positive because while the principal minors are all positive, the submatrix has nonpositive determinant. However, the Kac–Murdock–Szegö matrix , with , illustrated by
is totally positive thanks to the decay of the elements way from the diagonal. In MATLAB, the Kac–Murdock–Szegö matrix can be generated by gallery('kms',n,rho)
.
The lower Hessenberg Toeplitz matrix with all elements on and below the superdiagonal, illustrated for by
is totally nonnegative. It has zero eigenvalues, which appear in a single Jordan block, and its largest eigenvalue is . In MATLAB, this matrix can be generated by anymatrix('core/hessfull01',n)
. This and other binary totally nonnegative matrices are studied by Brualdi and Kirkland (2010).
Finally, consider a nonnegative bidiagonal matrix factorized into a product of elementary nonnegative bidiagonal matrices (nonnegative means that the elements of the matrix are nonnegative):
It is easy to see by inspection that , , and are totally nonnegative, so is totally nonnegative by Theorem 1. With , we have
which is a product of totally nonnegative matrices and hence is totally nonnegative by Theorem 1. This example clearly generalizes to show that an nonnegative bidiagonal matrix is totally nonnegative.
Inverse
Recall that the inverse of a nonsingular is given by , where
and denotes the submatrix of obtained by deleting row and column . If is nonsingular and totally nonnegative then it follows that has a checkerboard (alternating) sign pattern. Indeed, we can write , where and has nonnegative elements, and in fact it can be shown that is totally nonnegative using Theorem 1, Theorem 6, and (3). For example, here is the inverse of the Pascal matrix:
>> inv(sym(pascal(5))) ans = [ 5, -10, 10, -5, 1] [-10, 30, -35, 19, -4] [ 10, -35, 46, -27, 6] [ -5, 19, -27, 17, -4] [ 1, -4, 6, -4, 1]
Eigensystem
A totally nonnegative matrix has nonnegative trace and determinant, so the sum and product of its eigenvalues are both nonnegative. In fact, all the eigenvalues are real and nonnegative. Since a Jordan block corresponding to a nonnegative eigenvalue is totally nonnegative any Jordan form with nonnegative eigenvalues is possible. More can be said of is irreducible. Recall that a matrix is irreducible if there does not exist a permutation matrix such that
where and are square, nonempty submatrices.
Theorem 4. If is totally nonnegative then its eigenvalues are all real and nonnegative. If is also irreducible then the positive eigenvalues are distinct.
If is nonsingular and totally nonnegative and irreducible then by the theorem we can write the eigenvalues as . It is known that the eigenvector associated with has sign changes, that is, and ( have opposite signs for values of (any zero elements are deleted before counting sign changes). Note that for , we already know from Perron–Frobenius theory that there is a positive eigenvector . This result is illustrated by the Pascal matrix above:
>> A = pascal(5); [V,d] = eig(A,'vector'); [~,k] = sort(d,'descend'); >> evals = d', evecs = V(:,k) evals = 1.0835e-02 1.8124e-01 1.0000e+00 5.5175e+00 9.2290e+01 evecs = 1.7491e-02 2.4293e-01 -7.6605e-01 -5.7063e-01 1.6803e-01 7.4918e-02 4.8079e-01 -3.8302e-01 5.5872e-01 -5.5168e-01 2.0547e-01 6.1098e-01 1.6415e-01 2.5292e-01 7.0255e-01 4.5154e-01 4.1303e-01 4.3774e-01 -5.1785e-01 -4.0710e-01 8.6486e-01 -4.0736e-01 -2.1887e-01 1.7342e-01 9.0025e-02
Note that the number of sign changes (but not the number of negative elements) increases by as we go from one column to the next
The class of nonsingular totally nonnegative irreducible matrices is known as the oscillatory matrices, because such matrices arise in the analysis of small oscillations of elastic systems. An equivalent definition (in fact, the usual definition) is that an oscillatory matrix is a totally nonnegative matrix for which is totally positive for some positive integer .
LU Factorization
The next result shows that a totally nonnegative matrix has an LU factorization with special properties. We will need the following special case of Fischer’s inequality (Theorem 3):
Theorem 5. If is nonsingular and totally nonnegative then it has an LU factorization with and totally nonnegative and the growth factor .
Proof. Since is nonsingular and every minor is nonnegative, (4) shows that for , which guarantees the existence of an LU factorization. That the elements of and are nonnegative follows from explicit determinantal formulas for the elements of and . The total nonnegativity of and is proved by Cryer (1976). Gaussian elimination starts with and computes , since . Thus , . For , ; for , . Thus for all and hence . But , so .
Theorem 5 implies that it is safe to compute the LU factorization without pivoting of a nonsingular totally nonnegativity matrix: the factorization does not break down and it is numerically stable. In fact, the computed LU factors have a strong componentwise form of stability. As shown by De Boor and Pinkus (1977), for small enough unit roundoff the computed factors and will have nonnegative elements and so from the standard backward error result for LU factorization,
we have
which gives and hence
which is about as strong a backward error result as we could hope for. The significance of this result is reduced, however, by the fact that for some important classes of totally nonnegative matrices, including Vandermonde matrices and Cauchy matrices, structure-exploiting linear system solvers exist that are substantially faster, and potentially more accurate, than LU factorization.
Factorization into a Product of Bidiagonal Matrices
We showed above that any nonnegative bidiagonal matrix is totally nonnegative. The next result shows that any nonsingular totally nonnegative matrix has an LU factorization in which and can be factorized into a product of nonnegative bidiagonal matrices.
Theorem 6. (Gasca and Peña, 1996) A nonsingular matrix is totally nonnegative if and only if it it can be factorized as
where is a diagonal matrix with positive diagonal entries and and are unit lower and unit upper bidiagonal matrices, respectively, with the first entries along the subdiagonal of and zero and the rest nonnegative.
An analogue of Theorem 6 holds for totally positive matrices, the only difference being that the last subdiagonal entries of and are positive.
The factorization (5) can be computed by Neville elimination, which is a version of Gaussian elimination in which the eliminations are between adjacent rows, working from the bottom of each column upwards.
This factorization into bidiagonal factors can be used to obtain simple proofs of various properties of totally nonnegative matrices and totally positive matrices (Fallat, 2001). It also provides an efficient way to generates such matrices. If all the parameters in and the and are set to then the Pascal matrix is generated.
Testing for Total Positivity
An matrix has principal minors (ones based on submatrices centred on the diagonal) and minors in total. However, it is not necessary to check all these minors to test for total positivity.
Theorem 7. (Gasca and Peña, 1996) The matrix is totally positive if and only if for all index vectors and such that one of and is and the entries of the other are consecutive integers.
Theorem 7 shows that only minors need to be tested. Gasca and Peña have also show that total nonnegativity can be tested by checking about minors. A more efficient way to test for total nonnegativity is to compute the factorization in Theorem 6 and check the signs of the entries.
Notes
The results we have described show that totally nonnegative and totally positive matrices are analogous in many ways to symmetric positive (semi)definite matrices. The analogies go further because totally nonnegative and totally positive matrices also satisfy eigenvalue interlacing inequalities (albeit weaker than for symmetric matrices) and the eigenvalues of an oscillatory matrix majorize the diagonal elements. See Fallat and Johnson (2011) or Fallat (2014) for details.
References
This is a minimal set of references, which contain further useful references within.
- Richard A. Brualdi and Steve Kirkland, Totally Nonnegative (0,1)-Matrices, Linear Algebra Appl. 432, 1650–1662, 2010.
- Colin W. Cryer, Some Properties of Totally Positive Matrices, Linear Algebra Appl. 15, 1–25, 1976.
- Carl de Boor and Allan Pinkus, Backward Error Analysis for Totally Positive Linear Systems, 27, 485–490, 1977.
- Mariano Gasca and Juan M. Peña, On Factorizations of Totally Positive Matrices, in Mariano Gasca and Charles Micchelli, eds, Total Positivity and Its Applications, 109–130, Springer, 1996.
- Shaun M. Fallat, Bidiagonal Factorizations of Totally Nonnegative Matrices, Amer. Math. Monthly 108 (6), 697–712, 2001.
- Shaun M. Fallat, Totally Positive and Totally Nonnegative Matrices, in Handbook of Linear Algebra, Leslie Hogben, ed, 29.1–29.17, Chapman and Hall/CRC, 2014.
- Shaun M. Fallat and Charles R. Johnson, Totally Nonnegative Matrices, Princeton University Press, Princeton, NJ, USA, 2011.
Related Blog Posts
- What Is a Vandermonde Matrix? (2021)
- What Is an LU Factorization? (2021)
- What Is the Adjugate of a Matrix? (2020)
- What Is the Growth Factor for Gaussian Elimination? (2020)
- What Is the Hilbert Matrix? (2020)
- WHat Is the Kac–Murdock–Szegö Matrix? (2021)
- What Is the Perron–Frobenius Theorem? (2021)
This article is part of the “What Is” series, available from https://nhigham.com/category/what-is and in PDF form from the GitHub repository https://github.com/higham/what-is.
Dear Professor Higham:
I am glad to see your new interesting post, with important references. However, your sentence “structure-exploiting linear system solvers exist that are substantially faster, and potentially more accurate” suggests a new one (useful not only for solving linear systems, but also for the computation of eigenvalues and singular values), a paper which has inspired a lot of work in this field:
-Plamen Koev: Accurate computations with totally nonnegative matrices. SIAM J. Matrix Anal. Appl. 29(3), pp. 731-751 (2007).
https://epubs.siam.org/doi/abs/10.1137/04061903X
Thank you for your wonderful work, and thank you also for giving the readers this freedom to add comments/complements.