F16 Chapter Contents
NAG Library Manual

# NAG Library Chapter IntroductionF16 – Further Linear Algebra Support Routines

## 1  Scope of the Chapter

This chapter is concerned with basic linear algebra routines which perform elementary algebraic operations involving vectors and matrices. Other routines for such operations are available in Chapter F06.

## 2  Background to the Problems

The routines in this chapter follow the specification of Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001). They are called extensively by routines in other chapters of the NAG Library, especially in the linear algebra chapters. They are intended to be useful building-blocks for users of the Library who are developing their own applications.
The routines fall into three main groups:
1. scalar and vector operations, also referred to as Level 1 BLAS;
2. matrix-vector operations or Level 2 BLAS;
3. matrix operations which includes single matrix operations (Level 2 BLAS), matrix-matrix operations (Level 3 BLAS) and data movement operations on matrices.
The terminology reflects the number of operations involved, so for example a Level 2 routine involves $O\left({n}^{2}\right)$ operations, for vectors and matrices of order $n$.
In many implementations of the NAG Library, the routines in this chapter serve as interfaces to an efficient machine-specific implementation of the BLAS, usually provided by the vendor of the machine. Such implementations are stringently tested before being used with the NAG Library, to ensure that they correctly meet the specifications of the BLAS, and that they return the desired accuracy.
Because of the overlap of functionality with Chapter F06, only a subset of routines defined by the Technical Forum are implemented in this chapter.

## 3  Recommendations on Choice and Use of Available Routines

The routines in this chapter make available only some of the Basic Linear Algebra Subprograms which carry out the low level operations required by linear algebra applications.
It should be noted that, in some cases, Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001) extends the functionality of earlier BLAS specifications. For example, F06ECF (DAXPY) carrying out the operation
 $y←αx+y$
is extended by F16ECF (BLAS_DAXPBY), which performs the operation
 $y←α x+β y.$
In addition F16EHF (BLAS_DWAXPBY) is provided to allow for the storage of the sum of the two scaled vectors in a different vector, $w$, in order to preserve the input.
Routines in this chapter do not use the usual NAG Library error-handling mechanism, involving the parameter IFAIL.
If one of the BLAS routines is called with an invalid value of one of its arguments, then an error message is output on the error message unit (see X04AAF), giving the name of the routine and the number of the first invalid argument, and execution of the program is terminated. The following values of arguments are invalid:
• – any value of the operator arguments whose meaning is not specified;
• – a negative value of any problem dimension or bandwidth;
• – too small a value for any of the leading dimension arguments;
• – a zero value for the increment arguments.
Zero values for the matrix dimensions are considered valid.

## 4  Functionality Index

 Matrix-vector operations,
 complex matrix and vector(s),
 compute a norm or the element of largest absolute value,
 band matrix F16UBF
 real matrix and vector(s),
 compute a norm or the element of largest absolute value,
 band matrix F16RBF
 Scalar and vector operations,
 complex vector(s),
 maximum absolute value and location F16JSF (BLAS_ZAMAX_VAL)
 minimum absolute value and location F16JTF (BLAS_ZAMIN_VAL)
 sum of elements F16GLF (BLAS_ZSUM)
 sum of two scaled vectors F16GCF (BLAS_ZAXPBY)
 sum of two scaled vectors preserving input F16GHF (BLAS_ZWAXPBY)
 integer vector(s),
 maximum absolute value and location F16DQF
 maximum value and location F16DNF
 minimum absolute value and location F16DRF
 minimum value and location F16DPF
 sum of elements F16DLF
 real vector(s),
 maximum absolute value and location F16JQF (BLAS_DAMAX_VAL)
 maximum value and location F16JNF (BLAS_DMAX_VAL)
 minimum absolute value and location F16JRF (BLAS_DAMIN_VAL)
 minimum value and location F16JPF (BLAS_DMIN_VAL)
 sum of elements F16ELF (BLAS_DSUM)
 sum of two scaled vectors F16ECF (BLAS_DAXPBY)
 sum of two scaled vectors preserving input F16EHF (BLAS_DWAXPBY)

None.

None.

## 7  References

Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001) Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard University of Tennessee, Knoxville, Tennessee http://www.netlib.org/blas/blast-forum/blas-report.pdf

F16 Chapter Contents