# NAG FL Interfacef06chf (zrot2)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06chf applies a complex similarity rotation having real cosine and complex sine to a $2×2$ complex Hermitian matrix.

## 2Specification

Fortran Interface
 Subroutine f06chf ( x, y, z, c, s)
 Real (Kind=nag_wp), Intent (In) :: c Complex (Kind=nag_wp), Intent (In) :: s Complex (Kind=nag_wp), Intent (Inout) :: x, y, z
#include <nag.h>
 void f06chf_ (Complex *x, Complex *y, Complex *z, const double *c, const Complex *s)
The routine may be called by the names f06chf or nagf_blas_zrot2.

## 3Description

f06chf applies a complex similarity rotation, with parameters $c$ (real) and $s$ (complex), to a given $2×2$ complex Hermitian matrix; that is, it performs the operation:
 $( x y y¯ z ) ← ( c s¯ -s c ) ( x y y¯ z ) ( c -s¯ s c ) ,$
where $x$ and $z$ are real.
The argument x and z which hold $x$ and $z$ are declared complex for convenience when using the routine to operate on submatrices of larger Hermitian matrices.
Note that:
 $( z y¯ y x ) ← ( c w¯ -w c ) ( z y¯ y x ) ( c -w¯ w c ) ,$
where $w=-\overline{s}$, so to use f06chf when $y$ is the $\left(2,1\right)$ element of the matrix, you can make the call
`  Call f06chf(z, y, x, c, -conjg(s))`
None.

## 5Arguments

1: $\mathbf{x}$Complex (Kind=nag_wp) Input/Output
On entry: the value $x$, the $\left(1,1\right)$ element of the input matrix.
On exit: the transformed value $x$.
2: $\mathbf{y}$Complex (Kind=nag_wp) Input/Output
On entry: the value $y$, the $\left(1,2\right)$ element of the input matrix.
On exit: the transformed value $y$.
3: $\mathbf{z}$Complex (Kind=nag_wp) Input/Output
On entry: the value $z$, the $\left(2,2\right)$ element of the input matrix.
On exit: the transformed value $z$.
4: $\mathbf{c}$Real (Kind=nag_wp) Input
On entry: the value $c$, the cosine of the rotation.
5: $\mathbf{s}$Complex (Kind=nag_wp) Input
On entry: the value $s$, the sine of the rotation.

None.

Not applicable.