F07 Chapter Contents
F07 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF07JDF (DPTTRF)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F07JDF (DPTTRF) computes the modified Cholesky factorization of a real $n$ by $n$ symmetric positive definite tridiagonal matrix $A$.

## 2  Specification

 SUBROUTINE F07JDF ( N, D, E, INFO)
 INTEGER N, INFO REAL (KIND=nag_wp) D(*), E(*)
The routine may be called by its LAPACK name dpttrf.

## 3  Description

F07JDF (DPTTRF) factorizes the matrix $A$ as
 $A=LDLT ,$
where $L$ is a unit lower bidiagonal matrix and $D$ is a diagonal matrix with positive diagonal elements. The factorization may also be regarded as having the form ${U}^{\mathrm{T}}DU$, where $U$ is a unit upper bidiagonal matrix.

None.

## 5  Parameters

1:     $\mathrm{N}$ – INTEGERInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{N}}\ge 0$.
2:     $\mathrm{D}\left(*\right)$ – REAL (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array D must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: must contain the $n$ diagonal elements of the matrix $A$.
On exit: is overwritten by the $n$ diagonal elements of the diagonal matrix $D$ from the $LD{L}^{\mathrm{T}}$ factorization of $A$.
3:     $\mathrm{E}\left(*\right)$ – REAL (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array E must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}-1\right)$.
On entry: must contain the $\left(n-1\right)$ subdiagonal elements of the matrix $A$.
On exit: is overwritten by the $\left(n-1\right)$ subdiagonal elements of the lower bidiagonal matrix $L$. (E can also be regarded as containing the $\left(n-1\right)$ superdiagonal elements of the upper bidiagonal matrix $U$.)
4:     $\mathrm{INFO}$ – INTEGEROutput
On exit: ${\mathbf{INFO}}=0$ unless the routine detects an error (see Section 6).

## 6  Error 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.
${\mathbf{INFO}}>0 \text{and} {\mathbf{INFO}}<{\mathbf{N}}$
The leading minor of order $〈\mathit{\text{value}}〉$ is not positive definite, the factorization could not be completed.
${\mathbf{INFO}}>0 \text{and} {\mathbf{INFO}}={\mathbf{N}}$
The leading minor of order $n$ is not positive definite, the factorization was completed, but ${\mathbf{D}}\left({\mathbf{N}}\right)\le 0$.

## 7  Accuracy

The computed factorization satisfies an equation of the form
 $A+E=LDLT ,$
where
 $E∞=OεA∞$
and $\epsilon$ is the machine precision.
Following the use of this routine, F07JEF (DPTTRS) can be used to solve systems of equations $AX=B$, and F07JGF (DPTCON) can be used to estimate the condition number of $A$.

## 8  Parallelism and Performance

Not applicable.

The total number of floating-point operations required to factorize the matrix $A$ is proportional to $n$.
The complex analogue of this routine is F07JRF (ZPTTRF).

## 10  Example

This example factorizes the symmetric positive definite tridiagonal matrix $A$ given by
 $A = 4.0 -2.0 0.0 0.0 0.0 -2.0 10.0 -6.0 0.0 0.0 0.0 -6.0 29.0 15.0 0.0 0.0 0.0 15.0 25.0 8.0 0.0 0.0 0.0 8.0 5.0 .$

### 10.1  Program Text

Program Text (f07jdfe.f90)

### 10.2  Program Data

Program Data (f07jdfe.d)

### 10.3  Program Results

Program Results (f07jdfe.r)