Matrix Balance VI

Owning Palette: Linear Algebra VIs

Requires: Full Development System

Balances the general matrix Input Matrix to improve the accuracy of computed eigenvalues and eigenvectors. Wire data to the Input Matrix input to determine the polymorphic instance to use or manually select the instance.

You can use the Eigenvalues and Vectors VI to obtain the eigenvalues and eigenvectors of Balanced Matrix.

Details  

Use the pull-down menu to select an instance of this VI.

 Add to the block diagram  Find on the palette

Real Matrix Balance

Input Matrix is the real general matrix to balance.
job specifies the type of matrix balance operation.

0Neither Permuted nor Scaled
1Permuted but not Scaled
2Scaled but not Permuted
3Both Permuted and Scaled (default)
Balanced Matrix contains the same eigenvalues as Input Matrix.
index low indicates the form of Balanced Matrix. Balanced Matrix(i, j) = 0 if i > j and 0 j < index low. If you set job to neither permuted nor scaled or scaled but not permuted, index low equals 0.
index high indicates the form of Balanced Matrix. Balanced Matrix(i, j) = 0 if i > j and index high < i n – 1. If you set job to neither permuted nor scaled or scaled but not permuted, index high equals n – 1.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.
Scale returns details about the permutations and scaling factors. If p_j is the index of the row and column interchanged with row and column j and d_j is the scaling factor used to balance row and column j, the following equations define how the VI computes the values of Scale.

Scalej = pj for j = 0, 1, …, ilo – 1, ihi + 1, …, n – 1

Scalej = dj for j = ilo, ilo + 1, …, ihi

where ilo is index low and ihi is index high.

Complex Matrix Balance

Input Matrix is the complex general matrix to balance.
job specifies the type of matrix balance operation.

0Neither Permuted nor Scaled
1Permuted but not Scaled
2Scaled but not Permuted
3Both Permuted and Scaled (default)
Balanced Matrix contains the same eigenvalues as Input Matrix.
index low indicates the form of Balanced Matrix. Balanced Matrix(i, j) = 0 if i > j and 0 j < index low. If you set job to neither permuted nor scaled or scaled but not permuted, index low equals 0.
index high indicates the form of Balanced Matrix. Balanced Matrix(i, j) = 0 if i > j and index high < i n – 1. If you set job to neither permuted nor scaled or scaled but not permuted, index high equals n – 1.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.
Scale returns details about the permutations and scaling factors. If p_j is the index of the row and column interchanged with row and column j and d_j is the scaling factor used to balance row and column j, the following equations define how the VI computes the values of Scale.

Scalej = pj for j = 0, 1, …, ilo – 1, ihi + 1, …, n – 1

Scalej = dj for j = ilo, ilo + 1, …, ihi

where ilo is index low and ihi is index high.

Matrix Balance Details

You can use one or both of the following similarity transformations to balance a matrix A and improve the accuracy of computed eigenvalues and eigenvectors:

Permuting Matrix A

The following expression defines the permutation of matrix A to block upper triangular form.

where P is a permutation matrix, A'11 and A'33 are upper triangular, and PT is the transpose of matrix P.

The diagonal elements of A'11 and A'33 are eigenvalues of A. The central diagonal block A'22 starts from column(row) index low and ends in column(row) index high of A'. If no suitable permutation of A exists, the following conditions are true:

Scaling Matrix A'

The following expression defines the scaling of matrix A' to reduce the norm of matrix A'22.

so that ||A"22|| < ||A'22||, which reduces the effect of rounding errors on the accuracy of computed eigenvalues and eigenvectors.

The following block diagram illustrates using the Matrix Balance VI and the Back Transform Eigenvectors VI in a VI that computes the eigenvalues and eigenvectors of matrix A.