appears in a 1946 paper by Morris, in which it is described as having been “devised by Mr. T. S. Wilson.” The matrix is symmetric positive definite with determinant 1 and inverse
W−1=68−41−1710−412510−6−17105−310−6−32,
so it is moderately ill conditioned with κ2(W)=∥W∥2∥W−1∥2≈2.98409×103. This little matrix has been used as an example and for test purposes in many research papers and books over the years, in particular by John Todd, who described it as “the notorious matrix W of T. S. Wilson”.
Rutishauser (1968) stated that “the famous Wilson matrix is not a very striking example of an ill-conditioned matrix”, on the basis that κ2(A)≤40,000 for a “positive definite symmetric 4×4 matrix with integer elements not exceeding 10” and he gave the positive definite matrix
for which κ2(A0)=3.57924×104. The matrix A0 is therefore a factor 12 more ill conditioned than W. Rutishauser did not give a proof of the stated bound.
Moler (2018) asked how ill-conditioned W is relative to matrices in the set
He generated one million random matrices from S and found that about 0.21 percent of them had a larger condition number than W. The matrix with the largest condition number was the indefinite matrix
We first consider bounds on κ2(A) for A∈S. It is possible to obtain a bound from first principles by using the relation A−1=adj(A)/det(A), where adj(A) is the adjugate matrix, along with the fact that ∣det(A)∣≥1 since A has integer entries. Higham and Lettington (2021) found that the smallest bound they could obtain came from a bound of Merikoski et al. (1997): for nonsingular B∈Rn×n,
κ2(B)≤(1−x1+x)1/2,x=1−(n/∥B∥F2)n∣det(B)∣2.
Applying this bound to A∈S, using the fact that (1+x)/(1−x) is monotonically increasing for x∈(0,1), gives
κ2(A)≤2.97606⋯×105=:βS,A∈S.(1)
Another result from Merikoski et al. (1997) gives, for symmetric positive definite C∈∈Rn×n,
κ2(C)≤1−x1+x,x=1−(n/trace(C))ndet(C).
For A∈P, since det(A)≥1 we have x≤1−(1/10)4, and hence
κ2(A)≤3.99980×104=:βP,A∈P.(2)
Recall that Rutishauser’s bound is 4×104. The bounds (1) and (2) remain valid if we modify the definitions of S and P to allow zero elements (note that Rutishauser’s matrix A0 has a zero element).
Experiment
The sets S and P are large: S has on the order of 1010 elements. Exhaustively searching over the sets in reasonable time is possible with a carefully optimized code. Higham and Lettington (2021) use a MATLAB code that loops over all symmetric matrices with integer elements between 1 and 10 and
evaluates det(A) from an explicit expression (exactly computed for such matrices) and discards A if the matrix is singular;
computes the eigenvalues λi of A and obtains the condition number as κ2(A)=maxi∣λi∣/mini∣λi∣ (since A is symmetric); and
for P, checks whether A is positive definite by checking whether the smallest eigenvalue is positive.
which has κ2(A3)≈3.5529×104 and determinant 1. Obviously, symmetric permutations of these matrices are also optimal.
The following table summarizes the condition numbers of the matrices discussed and how close they are to the bounds.
Matrix A
Comment
κ2(A)
βS/κ2(A)
βP/κ2(A)
W
Wilson matrix
2.98409×103
99.73
13.40
A9
Rutishauser’s matrix
3.57924×104
8.31
1.12
A1
By random sampling
4.80867×104
6.19
—
A2
Optimal matrices in S
7.61190×104
3.91
—
A3
Optimal matrices in P
3.55286×104
8.38
1.13
Clearly, the bounds are reasonably sharp.
We do not know how Wilson constructed his matrix or to what extent he tried to maximize the condition number subject to the matrix entries being small integers. One possibility is that he constructed it via the factorization in the next section.
Apart from the zero (2,4) element, it is unremarkable. If we factor out the diagonal then we obtain the LDLT factorization, which has rational elements:
Suppose we drop the requirement of triangularity and ask whether the Wilson matrix has a factorization W=ZTZ with a 4×4 matrix Z of integers. It is known that every symmetric positive definite n×n matrix A of integers with determinant 1 has a factorization A=ZTZ with Z an n×n matrix of integers as long as n≤7, but examples are known for n=8 for which the factorization does not exist. This result is mentioned by Taussky (1961) and goes back to Hermite, Minkowski, and Mordell. Higham and Lettington (2021) found the integer factor
Z0=2100310022112121
of W, which is block upper triangular so can be thought of as a block Cholesky factor. Higham, Lettington, and Schmidt (2021) draw on recent research that links the existence of such factorizations to number-theoretic considerations of quadratic forms to show that for the existence of an integer solution Z to A=ZTZ it is necessary that a certain quadratic equation in n variables has an integer solution. In the case of the Wilson matrix the equation is
2w2+x12+x1x2+x1x3+x22+x2x3+x32=952.
The authors solve this equation computationally and find Z1 and two rational factors:
They show that these matrices are the only factors Z∈161Z of W up to left multiplication by integer orthogonal matrices.
Conclusions
The Wilson matrix has provided sterling service throughout the digital computer era as a convenient symmetric positive definite matrix for use in textbook examples and for testing algorithms. The recent discovery of its integer factorization has led to the development of new theory on when general n×n integer matrices A can be factored as A=ZTZ (when A is symmetric positive definite) or A=Z2 (a problem also considered in Higham, Lettington, and Schmidt (2021)), with integer Z.
Olga Taussky Todd wrote in 1961 that “matrices with integral elements have been studied for a very long time and an enormous number of problems arise, both theoretical and practical.” We wonder what else can be learned from the Wilson matrix and other integer test matrices.
References
This is a minimal set of references, which contain further useful references within.
H. Rutishauser, On Test Matrices, 7 (no. 165), 349-365, in: Programmation en Mathematiques Numeriques, Besancon, 1968.
Olga Taussky, Some Computational Problems Involving Integral Matrices, Journal of Research of the National Bureau of Standards Section B—Mathematical Sciences 65(1), 15–17, 1961.