1SGEBAL(1)                LAPACK routine (version 3.1)                SGEBAL(1)
2
3
4

NAME

6       SGEBAL - a general real matrix A
7

SYNOPSIS

9       SUBROUTINE SGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
10
11           CHARACTER      JOB
12
13           INTEGER        IHI, ILO, INFO, LDA, N
14
15           REAL           A( LDA, * ), SCALE( * )
16

PURPOSE

18       SGEBAL balances a general real matrix A.  This involves, first, permut‐
19       ing A by a similarity transformation  to  isolate  eigenvalues  in  the
20       first 1 to ILO-1 and last IHI+1 to N elements on the diagonal; and sec‐
21       ond, applying a diagonal similarity transformation to rows and  columns
22       ILO  to  IHI to make the rows and columns as close in norm as possible.
23       Both steps are optional.
24
25       Balancing may reduce the 1-norm of the matrix, and improve the accuracy
26       of the computed eigenvalues and/or eigenvectors.
27
28

ARGUMENTS

30       JOB     (input) CHARACTER*1
31               Specifies the operations to be performed on A:
32               =  'N':  none:  simply set ILO = 1, IHI = N, SCALE(I) = 1.0 for
33               i = 1,...,N; = 'P':  permute only;
34               = 'S':  scale only;
35               = 'B':  both permute and scale.
36
37       N       (input) INTEGER
38               The order of the matrix A.  N >= 0.
39
40       A       (input/output) REAL array, dimension (LDA,N)
41               On entry, the input matrix A.  On exit,  A  is  overwritten  by
42               the  balanced  matrix.  If JOB = 'N', A is not referenced.  See
43               Further Details.  LDA     (input) INTEGER The leading dimension
44               of the array A.  LDA >= max(1,N).
45
46       ILO     (output) INTEGER
47               IHI      (output)  INTEGER ILO and IHI are set to integers such
48               that on exit A(i,j) = 0 if i > j and j =  1,...,ILO-1  or  I  =
49               IHI+1,...,N.  If JOB = 'N' or 'S', ILO = 1 and IHI = N.
50
51       SCALE   (output) REAL array, dimension (N)
52               Details  of  the permutations and scaling factors applied to A.
53               If P(j) is the index of the row and  column  interchanged  with
54               row  and column j and D(j) is the scaling factor applied to row
55               and column j, then SCALE(j) = P(j)    for  j  =  1,...,ILO-1  =
56               D(j)    for j = ILO,...,IHI = P(j)    for j = IHI+1,...,N.  The
57               order in which the interchanges are made is N to IHI+1, then  1
58               to ILO-1.
59
60       INFO    (output) INTEGER
61               = 0:  successful exit.
62               < 0:  if INFO = -i, the i-th argument had an illegal value.
63

FURTHER DETAILS

65       The  permutations  consist of row and column interchanges which put the
66       matrix in the form
67
68                  ( T1   X   Y  )
69          P A P = (  0   B   Z  )
70                  (  0   0   T2 )
71
72       where T1 and T2 are upper triangular  matrices  whose  eigenvalues  lie
73       along  the  diagonal.  The column indices ILO and IHI mark the starting
74       and ending columns of the submatrix B. Balancing consists of applying a
75       diagonal  similarity  transformation inv(D) * B * D to make the 1-norms
76       of each row of B and its corresponding column nearly equal.  The output
77       matrix is
78
79          ( T1     X*D          Y    )
80          (  0  inv(D)*B*D  inv(D)*Z ).
81          (  0      0           T2   )
82
83       Information  about  the  permutations  P  and  the diagonal matrix D is
84       returned in the vector SCALE.
85
86       This subroutine is based on the EISPACK routine BALANC.
87
88       Modified by Tzu-Yi Chen, Computer Science Division, University of
89         California at Berkeley, USA
90
91
92
93
94 LAPACK routine (version 3.1)    November 2006                       SGEBAL(1)
Impressum