# NAG FL Interfacef08wjf (dggbak)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f08wjf forms the right or left eigenvectors of the real generalized eigenvalue problem $Ax=\lambda Bx$, by backward transformation on the computed eigenvectors given by f08ykf. It is necessary to call this routine only if the optional balancing routine f08whf was previously called to balance the matrix pair $\left(A,B\right)$.

## 2Specification

Fortran Interface
 Subroutine f08wjf ( job, side, n, ilo, ihi, m, v, ldv, info)
 Integer, Intent (In) :: n, ilo, ihi, m, ldv Integer, Intent (Out) :: info Real (Kind=nag_wp), Intent (In) :: lscale(*), rscale(*) Real (Kind=nag_wp), Intent (Inout) :: v(ldv,*) Character (1), Intent (In) :: job, side
#include <nag.h>
 void f08wjf_ (const char *job, const char *side, const Integer *n, const Integer *ilo, const Integer *ihi, const double lscale[], const double rscale[], const Integer *m, double v[], const Integer *ldv, Integer *info, const Charlen length_job, const Charlen length_side)
The routine may be called by the names f08wjf, nagf_lapackeig_dggbak or its LAPACK name dggbak.

## 3Description

If the matrix pair has been previously balanced using the routine f08whf then f08wjf backtransforms the eigenvector solution given by f08ykf. This is usually the sixth and last step in the solution of the generalized eigenvalue problem.
For a description of balancing, see the document for f08whf.
Ward R C (1981) Balancing the generalized eigenvalue problem SIAM J. Sci. Stat. Comp. 2 141–152

## 5Arguments

1: $\mathbf{job}$Character(1) Input
On entry: specifies the backward transformation step required.
${\mathbf{job}}=\text{'N'}$
No transformations are done.
${\mathbf{job}}=\text{'P'}$
Only do backward transformations based on permutations.
${\mathbf{job}}=\text{'S'}$
Only do backward transformations based on scaling.
${\mathbf{job}}=\text{'B'}$
Do backward transformations for both permutations and scaling.
Note:  this must be the same argument job as supplied to f08whf.
Constraint: ${\mathbf{job}}=\text{'N'}$, $\text{'P'}$, $\text{'S'}$ or $\text{'B'}$.
2: $\mathbf{side}$Character(1) Input
On entry: indicates whether left or right eigenvectors are to be transformed.
${\mathbf{side}}=\text{'L'}$
The left eigenvectors are transformed.
${\mathbf{side}}=\text{'R'}$
The right eigenvectors are transformed.
Constraint: ${\mathbf{side}}=\text{'L'}$ or $\text{'R'}$.
3: $\mathbf{n}$Integer Input
On entry: $n$, the order of the matrices $A$ and $B$ of the generalized eigenvalue problem.
Constraint: ${\mathbf{n}}\ge 0$.
4: $\mathbf{ilo}$Integer Input
5: $\mathbf{ihi}$Integer Input
On entry: ${i}_{\mathrm{lo}}$ and ${i}_{\mathrm{hi}}$ as determined by a previous call to f08whf.
Constraints:
• if ${\mathbf{n}}>0$, $1\le {\mathbf{ilo}}\le {\mathbf{ihi}}\le {\mathbf{n}}$;
• if ${\mathbf{n}}=0$, ${\mathbf{ilo}}=1$ and ${\mathbf{ihi}}=0$.
6: $\mathbf{lscale}\left(*\right)$Real (Kind=nag_wp) array Input
Note: the dimension of the array lscale must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: details of the permutations and scaling factors applied to the left side of the matrices $A$ and $B$, as returned by a previous call to f08whf.
7: $\mathbf{rscale}\left(*\right)$Real (Kind=nag_wp) array Input
Note: the dimension of the array rscale must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: details of the permutations and scaling factors applied to the right side of the matrices $A$ and $B$, as returned by a previous call to f08whf.
8: $\mathbf{m}$Integer Input
On entry: $m$, the required number of left or right eigenvectors.
Constraint: $0\le {\mathbf{m}}\le {\mathbf{n}}$.
9: $\mathbf{v}\left({\mathbf{ldv}},*\right)$Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array v must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.
On entry: the matrix of right or left eigenvectors, as returned by f08whf.
On exit: the transformed right or left eigenvectors.
10: $\mathbf{ldv}$Integer Input
On entry: the first dimension of the array v as declared in the (sub)program from which f08wjf is called.
Constraint: ${\mathbf{ldv}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
11: $\mathbf{info}$Integer Output
On exit: ${\mathbf{info}}=0$ unless the routine detects an error (see Section 6).

## 6Error Indicators and Warnings

${\mathbf{info}}<0$
If ${\mathbf{info}}=-i$, argument $i$ had an illegal value. An explanatory message is output, and execution of the program is terminated.

## 7Accuracy

The errors are negligible, compared with the previous computations.

## 8Parallelism and Performance

The number of operations is proportional to ${n}^{2}$.