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.


icon

Inputs/Outputs

  • c2ddbl.png Input Matrix

    Input Matrix is the real general matrix to balance.

  • cu16.png job

    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)
  • i2ddbl.png Balanced Matrix

    Balanced Matrix contains the same eigenvalues as Input Matrix.

  • ii32.png index low

    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.

  • ii32.png index high

    index high indicates the form of Balanced Matrix.

    Balanced Matrix(i, j) = 0 if i > j and index high < in – 1. If you set job to neither permuted nor scaled or scaled but not permuted, index high equals n – 1.

  • ii32.png error

    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.

  • i1ddbl.png Scale

    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.

  • 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:

    • Permute matrix A to block upper triangular form.
    • Scale matrix A' to reduce the norm of matrix A'22.

    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:

    • A'22 is the whole of A.
    • index low = 0.
    • index high = n – 1.

    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.