# Module extendr_api::prelude::modules::core::householder

## Expand description

Block Householder transformations.

A Householder reflection is linear transformation that describes a reflection about a hyperplane that crosses the origin of the space.

Let $v$ be a unit vector that is orthogonal to the hyperplane. Then the corresponding Householder transformation in matrix form is $I - 2vv^H$, where $I$ is the identity matrix.

In practice, a non unit vector $v$ is used, so the transformation is written as $$H = I - \frac{vv^H}{\tau}.$$

A block Householder transformation is a sequence of such transformations $H_0, H_1, \dots, H_{b -1 }$ applied one after the other, with the restriction that the first $i$ components of the vector $v_i$ of the $i$-th transformation are zero, and the component at index $i$ is one.

The matrix $V = [v_0\ v_1\ \dots\ v_{b-1}]$ is thus a lower trapezoidal matrix with unit diagonal. We call it the Householder basis.

There exists a unique upper triangular matrix $T$, that we call the Householder factor, such that $$H_0 \times \dots \times H_{b-1} = I - VT^{-1}V^H.$$

A block Householder sequence is a sequence of such transformations, composed of two matrices:

- a lower trapezoidal matrix with unit diagonal, which is the horizontal concatenation of the bases of each block Householder transformation,
- a horizontal concatenation of the Householder factors.

Examples on how to create and manipulate block Householder sequences are provided in the documentation of the QR module.

## Functionsยง

- Computes the size and alignment of required workspace for applying a block Householder transformation to a right-hand-side matrix in place.
- Computes the product of the given block Householder transformation, multiplied by
`matrix`

, and stores the result in`matrix`

. - Computes the size and alignment of required workspace for applying a block Householder transformation to a left-hand-side matrix in place.
- Computes the product of the matrix, multiplied by the given block Householder transformation, and stores the result in
`matrix`

. - Computes the size and alignment of required workspace for applying a sequence of block Householder transformations to a right-hand-side matrix in place.
- Computes the product of a sequence of block Householder transformations given by
`householder_basis`

and`householder_factor`

, multiplied by`matrix`

, and stores the result in`matrix`

. - Computes the size and alignment of required workspace for applying a sequence of block Householder transformations to a left-hand-side matrix in place.
- Computes the product of
`matrix`

, multiplied by a sequence of block Householder transformations given by`householder_basis`

and`householder_factor`

, and stores the result in`matrix`

. - Computes the size and alignment of required workspace for applying the transpose of a sequence of block Householder transformations to a right-hand-side matrix in place.
- Computes the product of the transpose of a sequence block Householder transformations given by
`householder_basis`

and`householder_factor`

, multiplied by`matrix`

, and stores the result in`matrix`

. - Computes the size and alignment of required workspace for applying the transpose of a sequence of block Householder transformations to a left-hand-side matrix in place.
- Computes the product of
`matrix`

, multiplied by the transpose of a sequence of block Householder transformations given by`householder_basis`

and`householder_factor`

, and stores the result in`matrix`

. - Computes the size and alignment of required workspace for applying the transpose of a block Householder transformation to a right-hand-side matrix in place.
- Computes the product of the transpose of the given block Householder transformation, multiplied by
`matrix`

, and stores the result in`matrix`

. - Computes the size and alignment of required workspace for applying the transpose of a block Householder transformation to a left-hand-side matrix in place.
- Computes the product of the matrix, multiplied by the transpose of the given block Householder transformation, and stores the result in
`matrix`

. - Computes the Householder reflection $I - \frac{v v^H}{\tau}$ such that when multiplied by $x$ from the left, The result is $\beta e_0$. $\tau$ and $\beta$ are returned and $\tau$ is real-valued.