class="resources"
Balances the general matrix Input Matrix to improve the accuracy of computed eigenvalues and eigenvectors. You can use this polymorphic VI to balance a real matrix or a complex matrix. The data type you wire to the Input Matrix input determines the polymorphic instance to use. You can use the EigenValues and Vectors VI to obtain the eigenvalues and eigenvectors of Balanced Matrix. Details

![]() |
Input Matrix is the real general matrix to balance. | ||||||||
![]() |
job specifies the type of matrix balance operation.
|
||||||||
![]() |
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 job is set to neither permuted nor scaled or scaled but not permuted, index low = 0.
|
||||||||
![]() |
index high indicates the form of Balanced Matrix.
Balanced Matrix(i, j) = 0 if i > j and index high < i n 1. if job is set to neither permuted nor scaled or scaled but not permuted, index high = 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 = p_j for j = 1, 2, , ilo 1, ihi + 1, , n Scalej = d_j for j = ilo, ilo + 1, , ihi where ilo is index low and ihi is index high. |

![]() |
Input Matrix is the complex general matrix to balance. | ||||||||
![]() |
job specifies the type of matrix balance operation.
|
||||||||
![]() |
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 job is set to neither permuted nor scaled or scaled but not permuted, index low = 0.
|
||||||||
![]() |
index high indicates the form of Balanced Matrix.
Balanced Matrix(i, j) = 0 if i > j and index high < i n 1. if job is set to neither permuted nor scaled or scaled but not permuted, index high = 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 = p_j for j = 1, 2, , ilo 1, ihi + 1, , n Scalej = d_j for j = ilo, ilo + 1, , ihi where ilo is index low and ihi is index high. |
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:
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:
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 in a VI that computes the eigenvalues and eigenvectors of matrix A.
