# NAG FL Interfacef07jdf (dpttrf)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f07jdf computes the modified Cholesky factorization of a real $n×n$ symmetric positive definite tridiagonal matrix $A$.

## 2Specification

Fortran Interface
 Subroutine f07jdf ( n, d, e, info)
 Integer, Intent (In) :: n Integer, Intent (Out) :: info Real (Kind=nag_wp), Intent (Inout) :: d(*), e(*)
#include <nag.h>
 void f07jdf_ (const Integer *n, double d[], double e[], Integer *info)
The routine may be called by the names f07jdf, nagf_lapacklin_dpttrf or its LAPACK name dpttrf.

## 3Description

f07jdf 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.

## 5Arguments

1: $\mathbf{n}$Integer Input
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
2: $\mathbf{d}\left(*\right)$Real (Kind=nag_wp) array Input/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: $\mathbf{e}\left(*\right)$Real (Kind=nag_wp) array Input/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: $\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.
${\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$.

## 7Accuracy

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 can be used to solve systems of equations $AX=B$, and f07jgf can be used to estimate the condition number of $A$.

## 8Parallelism and Performance

f07jdf is not threaded in any implementation.

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.

## 10Example

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.1Program Text

Program Text (f07jdfe.f90)

### 10.2Program Data

Program Data (f07jdfe.d)

### 10.3Program Results

Program Results (f07jdfe.r)