In
numerical mathematics, hierarchical matrices (H-matrices)
are used as data-sparse approximations of non-sparse matrices. While a
sparse matrix
In numerical analysis and scientific computing, a sparse matrix or sparse array is a matrix in which most of the elements are zero. There is no strict definition regarding the proportion of zero-value elements for a matrix to qualify as sparse b ...
of dimension
can be represented efficiently in
units of storage by storing only its non-zero entries, a non-sparse matrix would require
units of storage, and using this type of matrices for large problems would therefore be prohibitively expensive in terms of storage and computing time. Hierarchical matrices provide an approximation requiring only
units of storage, where
is a parameter controlling the accuracy of the approximation. In typical applications, e.g., when discretizing integral equations,
preconditioning the resulting systems of linear equations,
or solving elliptic partial differential equations,
a rank proportional to
with a small constant
is sufficient to ensure an accuracy of
. Compared to many other data-sparse representations of non-sparse matrices, hierarchical matrices offer a major advantage: the results of matrix arithmetic operations like matrix multiplication, factorization or inversion can be approximated in
operations, where
Basic idea
Hierarchical matrices rely on local low-rank approximations:
let
be index sets, and let
denote the matrix we have to approximate.
In many applications (see above), we can find subsets
such that
can be approximated by a rank-
matrix. This approximation can be represented in factorized form
with factors
.
While the standard representation of the matrix
requires
units of storage,
the factorized representation requires only
units. If
is not too large, the storage requirements are reduced significantly.
In order to approximate the entire matrix
, it is split into a family of submatrices. Large submatrices are stored in factorized representation, while small submatrices are stored in standard representation in order to improve efficiency.
Low-rank matrices are closely related to degenerate expansions used in
panel clustering and the
fast multipole method __NOTOC__
The fast multipole method (FMM) is a numerical technique that was developed to speed up the calculation of long-ranged forces in the ''n''-body problem. It does this by expanding the system Green's function using a multipole expansion, w ...
to approximate integral operators. In this sense, hierarchical matrices can be considered the algebraic counterparts of these techniques.
Application to integral operators
Hierarchical matrices are successfully used to treat integral equations, e.g., the single and double layer potential operators
appearing in the
boundary element method
The boundary element method (BEM) is a numerical computational method of solving linear partial differential equations which have been formulated as integral equations (i.e. in ''boundary integral'' form), including fluid mechanics, acoustics, e ...
. A typical operator has the form
:
The
Galerkin method
In mathematics, in the area of numerical analysis, Galerkin methods, named after the Russian mathematician Boris Galerkin, convert a continuous operator problem, such as a differential equation, commonly in a weak formulation, to a discrete prob ...
leads to matrix entries of the form
:
where
and
are families of finite element basis functions.
If the kernel function
is sufficiently smooth, we can approximate it by
polynomial interpolation
In numerical analysis, polynomial interpolation is the interpolation of a given data set by the polynomial of lowest possible degree that passes through the points of the dataset.
Given a set of data points (x_0,y_0), \ldots, (x_n,y_n), with n ...
to obtain
:
where
is the family of interpolation points and
is the corresponding family of
Lagrange polynomial
In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data.
Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
s.
Replacing
by
yields an approximation
:
with the coefficients
:
:
If we choose
and use the same interpolation points for all
, we obtain
.
Obviously, any other approximation separating the variables
and
, e.g., the multipole expansion,
would also allow us to split the double integral into two single integrals and thus arrive at a similar factorized low-rank matrix.
Of particular interest are cross approximation techniques
that use only the entries of the original matrix
to construct a
low-rank approximation.
Application to elliptic partial differential equations
Since the solution operator of an elliptic partial differential equation can be expressed as an integral operator involving
Green's function
In mathematics, a Green's function is the impulse response of an inhomogeneous linear differential operator defined on a domain with specified initial conditions or boundary conditions.
This means that if \operatorname is the linear differenti ...
, it is not surprising that the inverse of the stiffness matrix arising from the
finite element method
The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat ...
and
spectral method can be approximated by a hierarchical matrix.
Green's function depends on the shape of the computational domain, therefore it is usually not known. Nevertheless, approximate arithmetic operations can be employed to compute an approximate inverse without knowing the
function explicitly.
Surprisingly, it is possible to prove
that the inverse can be approximated even if the differential operator involves non-smooth coefficients and Green's function is therefore not smooth.
Arithmetic operations
The most important innovation of the hierarchical matrix method is the development of efficient algorithms for performing (approximate) matrix arithmetic operations on non-sparse matrices, e.g., to compute approximate inverses,
LU decomposition
In numerical analysis and linear algebra, lower–upper (LU) decomposition or factorization factors a matrix as the product of a lower triangular matrix and an upper triangular matrix (see matrix decomposition). The product sometimes includes a ...
s and solutions to matrix equations.
The central algorithm is the efficient matrix-matrix multiplication, i.e., the computation of
for hierarchical matrices
and a scalar factor
.
The algorithm requires the submatrices of the hierarchical matrices to be organized in a block tree structure and takes advantage of the properties of factorized low-rank matrices to compute the updated
in
operations.
Taking advantage of the block structure, the inverse can be computed by using recursion to compute inverses and
Schur complement In linear algebra and the theory of matrices, the Schur complement of a block matrix is defined as follows.
Suppose ''p'', ''q'' are nonnegative integers, and suppose ''A'', ''B'', ''C'', ''D'' are respectively ''p'' × ''p'', ''p'' × ''q'', ''q'' ...
s of diagonal blocks and combining both using the matrix-matrix multiplication. In a similar way, the
LU decomposition
In numerical analysis and linear algebra, lower–upper (LU) decomposition or factorization factors a matrix as the product of a lower triangular matrix and an upper triangular matrix (see matrix decomposition). The product sometimes includes a ...
can be constructed using only recursion and multiplication.
Both operations also require
operations.
H2-matrices
In order to treat very large problems, the structure of hierarchical matrices can be improved:
H
2-matrices
replace the general low-rank structure of the blocks by a hierarchical representation closely related to the
fast multipole method __NOTOC__
The fast multipole method (FMM) is a numerical technique that was developed to speed up the calculation of long-ranged forces in the ''n''-body problem. It does this by expanding the system Green's function using a multipole expansion, w ...
in order to reduce the storage complexity to
.
In the context of boundary integral operators, replacing the fixed rank
by block-dependent ranks leads to approximations that preserve the rate of convergence of the underlying boundary element method at a complexity of
Arithmetic operations like multiplication, inversion, and Cholesky or LR factorization of H
2-matrices
can be implemented based on two fundamental operations: the matrix-vector multiplication with submatrices
and the low-rank update of submatrices. While the matrix-vector multiplication is straightforward, implementing efficient low-rank updates with adaptively optimized cluster bases poses a significant challenge.
Literature
Software
HLibis a C software library implementing the most important algorithms for hierarchical and
-matrices.
AHMEDis a C++ software library that can be downloaded for educational purposes.
HLIBprois an implementation of the core hierarchical matrix algorithms for commercial applications.
H2Libis an open source implementation of hierarchical matrix algorithms intended for research and teaching.
awesome-hierarchical-matricesis a repository containing a list of other H-Matrices implementations.
HierarchicalMatrices.jlis a Julia package implementing hierarchical matrices.
Matrices