A Fast Recursive Algorithm for Constructing Matrices with Prescribed Eigenvalues and Singular Values by Moody T. Chu North Carolina State University
Outline Background Schur-Horn Theorem Mirsky Theorem Sing-Thompson Theorem Weyl-Horn Theorem A Recursive Algorithm The Building Block Case The Original Proof by Induction An Innocent Mistake A Recursive Clause in Programming The Matrix Structure A Modied Proof A Symbolic Example Numerical Experiment
Schur-Horn Theorem Given arbitrary Hermitian matrix H, Let = [ i ] = eigenvalues. Let a = [a i ] = diagonal entries. Assume Then kx i=1 nx i=1 a j1 mi k X ::: a jn m1 ::: mn : i=1 mi = n X i=1 a ji a ji :. Known as a majorizing. Given vectors a R n, Assume a majorizes. for k = 1 :::n Then a Hermitian matrix H with eigenvalues and diagonal entries a exists. How to solve the inverse eigenvalue problem numerically?
Mirsky Theorem Any similar connection between eigenvalues and diagonal entries of a general matrix? A matrix with eigenvalues 1 ::: n and main diagonal elements a 1 ::: a n exists if and only if nx i=1 a i = n X i=1 i :
Sing-Thompson Theorem Any connection between singular values and diagonal entries of a general matrix? Given vectors d s R n, Assume s 1 s :::s n jd 1 j jd j :::jd n j: Then a real matrix with singular values s and main diagonal entries d (possibly in dierent order) exists if and only if 0 B @ n;1 X i=1 kx jd i j 1 i=1 C jd i ja ; jd n j k X i=1 s i 0 B @ n;1 X i=1 for k = 1 ::: n s i 1 C A ; s n : How to solve the inverse singular value problem numerically?
Weyl-Horn Theorem Any connection between singular values and eigenvalues of a general matrix? singular value = jeigenvaluej for Hermitian matrices. Given vectors C n and R n, Assume j 1 j ::: j n j 1 ::: n : Then a matrix with eigenvalues 1 ::: n and singular values 1 ::: n exists if and only if ky j=1 ny j=1 j j j j j j = k Y j=1 Y n j=1 j j : k = 1 ::: n; 1. If j n j > 0, then log majorizes log jj. How to solve the inverse eigenvalue (singular value) problem numerically?
The Case The Weyl-Horn Condition: j 1 j 1 j 1 jj j = 1 : + j j j 1 j 1 j 1 j + j j 1 + : The building block A triangular matrix A = 1 0 has singular value f 1 g if and only if = r 1 + ; j 1j ; j j : A is complex-valued when eigenvalues are complex. A stable way of computing : = 0 if j( 1 ; ) ;(j 1 j;j j) j r j(1 ; ) ;(j 1 j;j j) j otherwise.
Ideas in Horn's Proof Reduce the original inverse problem to two problems of smaller sizes. Problems of smaller sizes are guaranteed to be solvable by the induction hypothesis. The subproblems are axed together by working on a suitable corner. The problem has an explicit solution.
Key to the Algorithmic Success 9 The eigenvalues and singular values of each of the two subproblems can be derived explicitly. Each of the two subproblems can further be down-sized. The original problem is divided into subproblems of size or 1 1. The smaller problems can be conquered to build up the original size. In an environment that allows a subprogram to invoke itself recursively, only one-step of the divide-and-conquer procedure will be enough. Very similar to the radix- FFT =) fast algorithm.
10 Outline of Proof Suppose i > 0 for all i = 1 ::: n. So i = 0 for all i. The case of zero singular values can be handled in a similar way. Dene 1 i := 1 := i i;1 for i = j i ::: n; 1: j Assume := min 1in;1 i occurs at the index j. Dene := j 1 n j : The following three sets of inequalities are true. The numbers satisfy the Weyl-Horn conditions. j 1 j j n j : j j ::: j j j 1 ::: j : j j+1 j ::: j n;1 j j+1 ::: n;1 n :
By induction hypothesis, There exist unitary matrices U 1, V 1 C jj and triangular matrices A 1 such that U 1 1 0 ::: 0 0 0.... 0 0 ::: j V 1 = A 1 = ::: 0.... 0 0 j There exist unitary matrices U, V C (n;j)(n;j), and triangular matrix A such that U j+1 0 :::0 0 j+ 0.... 0 0 ::: n V = A = j+1 ::: 0 j+..... n;1 0 0 ::: 0 11 : :
1 Horn's claim: The block matrix A 1 A can be permuted to the triangular matrix ::: 0..... j 0 ::: 0 0 0 0 ::: 0 0 ::: j+1.... ::: 0 0 n;1 The corner can now be glued together by U 0 0 0 V 0 = A 0 = 1 0 n : How to do the permutation, or is it a mistake? It takes more than permutation to rearrange the diagonals of a triangular matrix.
A MATLAB Program 1 function [A]=svd_eig(alpha,lambda) n = length(alpha) if n == 1 % The 1 by 1 case A = [lambda(1)] elseif n == % The by case [U,V,A] = two_by_two(alpha,lambda) else % Check zero singular values tol = n*alpha(1)*eps k = sum(alpha > tol) m = sum(abs(lambda) > tol) if k == n % Nonzero singular values j = 1 s = alpha(1) temp = s for i = :n-1 temp = temp*alpha(i)/abs(lambda(i)) if temp < s, j = i s = temp end end rho = abs(lambda(1)*lambda(n))/s [U0,V0,A0] = two_by_two([s rho],[lambda(1) lambda(n)]) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [A1] = svd_eig(alpha(1:j),[s lambda(:j)]) % RECURSIVE % [A] = svd_eig(alpha(j+1:n),[lambda(j+1:n-1) rho]) % CALLING % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A = [A1,zeros(j,n-j) zeros(n-j,j),a] Temp = A A(1,:)=U0(1,1)*Temp(1,:)+U0(1,)*Temp(n,:) A(n,:)=U0(,1)*Temp(1,:)+U0(,)*Temp(n,:) Temp = A A(:,1)=V0(1,1)*Temp(:,1)+V0(1,)*Temp(:,n) A(:,n)=V0(,1)*Temp(:,1)+V0(,)*Temp(:,n) else % Zero singular values beta = prod(abs(lambda(1:m)))/prod(alpha(1:m-1)) [U,V,A] = svd_eig([alpha(1:m-1) beta],lambda(1:m)) A = zeros(n) A(1:m,1:m) = V'*A*V for i = m+1:k, A(i,i+1) = alpha(i) end A(m,m+1) = sqrt(abs(alpha(m)^-beta^)) end end
1 Correct that \Mistake" Horn's requirement: Both intermediate matrices A 1 and A are upper triangular matrices. Diagonal entries are arranged in a certain order.. Valid from the Schur decomposition theorem.. More than permutation, not easy for computation.. To rearrange diagonal entries via unitary similarity transformations while maintaining the upper triangular structure is expensive. Our contribution: The triangular structure is entirely unnecessary. The matrix A produced from our algorithm is generally not triangular. Do not need to rearrange the diagonal entries Modifying the rst and the last rows and columns of the block diagonal matrix A 1, as if nothing A happened, is enough.
Algorithm: Denote U 0 = [u 0 st ] and V 0 = [v 0 st ]. Then u 0 11 0 u 0 1 0 I n;1 0 u 0 1 0 u 0 U 1 0 0 U is the desired matrix. A has the structure A = 1 0 ::: 0 0 0.... 0 n V 1 0 0 V v 0 11 0 v 0 1 0 I n;1 0 v 0 1 0 v 0 1 ::: 0 0..... j;1 ::: j 0 ::: 0 0 j+1 ::: 0 j+.... 0 ::: n = unchanged, original entries from A 1 or A. = entries of A 1 or A that are modied by scalar multiplications. = possible new entries that were originally zero. : 1
1 A Variation of Horn's Proof Does the algorithm really works? Clearly, A has singular values f 1 ::: n g. Need to show that A has eigenvalues f 1 ::: n g. What has been changed? (P1) Diagonal entries of A 1 and A are in xed orders, ::: j and j+1 ::: n;1, respectively. (P) Each A i is similar through permutations, which need not to be known, to a lower triangular matrix whose diagonal entries constitute the same set as the diagonal entries of A i. (Thus, each A i has precisely its own diagonal entries as its eigenvalues.) (P) The rst row and the last row have the same zero pattern except that the lower-left corner is always zero. (P) The rst column and the last column have the same zero pattern except that the lower-left corner is always zero. Use graph theory to show that the axed matrix A has exactly the same properties.
A Symbolic Example 1 Dividing process: 1 1 1 j 1 = + 1 1 j = + j = 1 + 1 1 1 1 1
1 Conquering process: j 1 = * 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 j = * 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 j = 1 * h i 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 h 1 i
Computational Cost 19 The divide-and-conquer feature brings on fast computation. The overall cost is estimated at the order of O(n ). A numerical experiment: 10 10 flops 10 10 10 10 0 10 1 10 10 size of problem Figure 1: log-log plot of computational ops versus problem sizes
0 Rosser Test Rosser matrix R: R = 11 19 ;19 0 ; ; ;9 9 19 99 11 ;19 ;1 ; ; ; ;19 11 99 19 1 9 0 ;19 19 11 9 ; ; ;1 1 11 ;99 0 0 ; ; 9 ;99 11 0 0 ;9 ; 9 0 0 99 ;911 9 ; ; 0 0 ;911 99 Has one double eigenvalue, three nearly equal eigenvalues, one zero eigenvalue, two dominant eigenvalues of opposite sign and one small nonzero eigenvalue. The computed eigenvalues and singular values of R are = ;1:000901999e+0 1:000901999e+0 1:00000000000000e+0 1:019901919e+0 1:000000000000001e+0 9:99999999999999e+0 9:00101e;0 :11190099e;1 = : 1:000901999e+0 1:000901999e+0 1:00000000000000e+0 1:0199019199e+0 1:000000000000000e+0 9:99999999999999e+0 9:001e;0 1:0009e;1 :
1 Using the above and, A nonsymmetric matrix is produced: 1:000e+0 0 0 0 0 0 0 0 0 ;1:000e+0 0 0 0 0 0 0 0 0 1:000e+0 0 0 0 0 0 0 0 0 1:0199e+0 0 0 1:e;09 0 0 0 0 0 1:0000e+0 0 0 0 0 0 0 0 0 1:0000e+0 0 0 0 0 0 ;1:e;0 0 0 9:09e;0 0 0 0 0 0 0 0 1:0e;0 0 : The re-computed eigenvalues and singular values of A are ^ = ;1:000901999e+0 1:000901999e+0 1:00000000000000e+0 1:019901919e+0 1:000000000000001e+0 9:99999999999999e+0 9:0011e;0 0 ^ = 1:000901999e+0 1:000901999e+0 1:00000000000000e+0 1:0199019199e+0 1:000000000000001e+0 9:99999999999999e+0 9:001e;0 The re-computed eigenvalues and singular values agree with those of R up to the machine accuracy. 0 :
Wilkinson Test Wilkinson's matrices: All are symmetric and tridiagonal. Have nearly, but not exactly, equal eigenvalue pairs. Using these data: Discrepancy in eigenvalues and singular values between our constructed matrices and Wilkinson's matrices. 10 1 Discrepancy in Eigenvalues and Singular Values * = discrepancy in eigenvalues 10 1 o = discrepancy in singular values semilog on nomr of discrepancy 10 1 10 1 10 1 0 10 1 1 1 1 0 size of Wilkinson matrix Figure : L norm of discrepancy in eigenvalues and singular values.
Matrices constructed are nearly but not symmetric. Wilkinson Matrix of Size 1 10 0 0 1 10 0 0 10 1 0 Constructed Matrix 0 10 0 10 0 1 10 0 0 10 1 0 Figure : -D mesh representation of 1 1 matrices
Conclusion Weyl-Horn Theorem completely characterizes the relationship between eigenvalues and singular values of a general matrix. The original proof has been modied. With the aid of programming languages that allow a subprogram to invoke itself recursively, an induction proof can be implemented as a recursive algorithm. The resulting algorithm is fast. The cost of construction is approximately O(n ). The matrix being constructed usually is not symmetric and is complex-valued, if complex eigenvalues are present. Numerical experiment on some very challenging problems suggests that our method is quite robust.