Consider a linear system of complex-valued equations of the kind , where
are complex square and rectangular matrices, respectively, and
is the unknown complex matrix.
To compute , a natural option is to use any algorithm available in the literature initially conceived for real systems, such as Gauss elimination, LU/Cholesky decomposition, and translate its operations to complex arithmetic.
However, there may exist a couple of scenarios where we must or should do otherwise:
- Our favorite software is not complex-friendly. For instance, the IEEE-754 standard for floating-point arithmetic does not natively support complex numbers. Also, TensorFlow comes has limited capabilities with complex numbers in Graph XLA mode;
- The matrix of coefficients
is ill-conditioned but its real and complex part
, respectively, are individually well-conditioned.
In such cases, one 1) must or 2) should rather first rewrite the problem in real arithmetics and then apply popular numerical algebra techniques operating in the real field.
1. From complex to real systems of equations
As a warm up, we start considering the simple case with just one (complex) unknown :
or equivalently,
which, by equating the real and imaginary parts of the two terms, leads to the real system of equations:
A similar expression applies to the general case with multiple variables and equations. In fact, if we rewrite
as:
and we express the real and complex part of each term:
we then obtain:
which, rewritten in matrix form, takes on the shape of a real-valued linear system:
2. Expressing the unknown
To find an expression for we must invert the relation (1). In other words, we want to find those matrices
for which:
The notation above is not misleading: are indeed the real and imaginary part of
! To convince ourselves, it is sufficient to compare (2) with (1).
Next, it is instructive, although a bit tedious, to find the expression of ourselves. First, we express
as a function of
via the first block of equations in (1):
We then replace (3) into the second block of equations in (1) and obtain:
or equivalently, in matrix form:
where is the so-called Schur complement of block
.
A reader may wonder why we did not care about filling the dots. The answer is that we simply do not need to! In fact, by comparing (4) with (2), it is already clear that:
We are finally ready to derive the solution . By equating the real and imaginary part of expression
we obtain:
where and
are defined in (5) and (6), respectively. The formulae above are generally referred to as Frobenius inverse.
3. How to actually compute ?
The first method that may come to our mind to derive is to compute explicitly all the terms in (7), involving the (costly!) inversion of matrices
and
. Yet, it is common numerical algebra knowledge that matrix inversion is to be avoided whenever possible, and replaced by more efficient and accurate methods originally developed for…solving linear system, once again! In other words, instead of explicitly computing terms like
, one should rather solve the linear system
for the unknown
.
But hey… wasn’t the solution to linear systems our problem in the first place? The answer is positive, but with a caveat: We have now succeeded in converting a problem in complex arithmetics, that we have troubles with, to one in real arithmetics, that we can solve by hypothesis.
For instance, a popular method for the solution of in the unknown real variable
is the so-called LU decomposition with partial pivoting, that we recall here below.
- i) Decompose
as
, where
is a permutation matrix,
is lower diagonal and
is upper triangular
- ii) Solve
for the unknown
. This can be achieved for every column
of matrix
by iteratively forward-substituting the result
obtained in the
-th equation into the (
)-th equation (note that
is already available!)
- iii) Solve
for the unknown
by backward-substitution (here, the last element of each column of
is known from the start).
We conveniently call a method, e.g., LU, for solving a linear system
in the unknown
.
With this in mind, we are now ready to detail the algorithm to efficiently compute the solution in real arithmetics. One should compare the steps below with expressions (7),(8).
Procedure.
- 1) Compute
as
- 2) Compute
, involving only matrix addition and multiplication
- 3) Compute
as
- 4) Compute
as
- 5) Compute
by multiplying the results produced in 1) and 3)
- 6) Compute
by multiplying the results produced in 1) and 4)
- 7) Return
and
which coincide with expressions (7),(8).
For further results on the complexity analysis of the solution above we refer to the comprehensive work in [2].
References
[1] L. Tornheim. Inversion of a complex matrix. Comm. ACM, 4:398, 1961.
[2] Z. Dai, L. H. Lim, K. Ye. (2023). Complex matrix inversion via real matrix inversions. arXiv preprint arXiv:2208.01239, 170.
Leave a comment